/* 强制主题覆盖 - 最高优先级 */
html[data-theme="dark"] body,
body[data-theme="dark"] {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
}

html[data-theme="light"] body,
body[data-theme="light"] {
    background-color: #ffffff !important;
    color: #1e293b !important;
}

/* 强制覆盖style.css中的body样式 */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* CSS变量定义 */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

/* 深色主题变量 */
[data-theme="dark"] {
    --primary-color: #60a5fa;
    --primary-hover: #3b82f6;
    --secondary-color: #94a3b8;
    --accent-color: #fbbf24;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --border-color: #334155;
    --border-hover: #475569;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 导航栏 */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-btn,
.theme-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.search-btn:hover,
.theme-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* 主题切换按钮图标样式 */
.theme-btn .sun-icon,
.theme-btn .moon-icon {
    transition: all 0.3s ease;
    width: 20px;
    height: 20px;
}

/* 默认状态：显示太阳图标，隐藏月亮图标 */
.theme-btn .sun-icon {
    display: block;
}

.theme-btn .moon-icon {
    display: none;
}

/* 使用CSS类控制图标显示 */
.theme-btn.dark-theme .sun-icon {
    display: none !important;
}

.theme-btn.dark-theme .moon-icon {
    display: block !important;
}

.theme-btn.light-theme .sun-icon {
    display: block !important;
}

.theme-btn.light-theme .moon-icon {
    display: none !important;
}

/* 深色主题下的图标显示 */
html[data-theme="dark"] .theme-btn .sun-icon,
body[data-theme="dark"] .theme-btn .sun-icon {
    display: none;
}

html[data-theme="dark"] .theme-btn .moon-icon,
body[data-theme="dark"] .theme-btn .moon-icon {
    display: block;
}

/* 浅色主题下的图标显示 */
html[data-theme="light"] .theme-btn .sun-icon,
body[data-theme="light"] .theme-btn .sun-icon {
    display: block;
}

html[data-theme="light"] .theme-btn .moon-icon,
body[data-theme="light"] .theme-btn .moon-icon {
    display: none;
}

/* 移动端菜单按钮 */
.menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-btn span {
    width: 100%;
    height: 2px;
    background-color: var(--text-secondary);
    transition: all 0.3s ease;
}

.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 主要内容 */
.main-content {
    min-height: calc(100vh - 64px - 200px);
}

/* 首页横幅 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 4rem 0 !important; /* 稍微增高内边距 */
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    min-height: 420px !important; /* 稍微提高高度 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 轮播横幅样式 */
.hero-carousel {
    background: none !important;
    padding: 0 !important;
    min-height: 440px !important; /* 稍微提高高度 */
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    min-height: 440px !important; /* 稍微提高高度 */
}

.hero-slide.active {
    opacity: 1;
}

/* 横幅内容容器 */
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 当有背景图片时的样式 */
.hero-section[style*="background-image"] {
    background: none !important;
    position: relative;
    min-height: 440px !important; /* 稍微提高高度 */
}

.hero-section[style*="background-image"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-section[style*="background-image"] .hero-content {
    position: relative;
    z-index: 2;
}

/* 轮播指示器 */
.hero-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 3;
}

.hero-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.hero-indicator.active {
    background-color: white;
    transform: scale(1.2);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 响应式横幅设计 */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
        padding: 4rem 0;
    }
    
    .hero-carousel {
        min-height: 450px;
    }
    
    .hero-slide {
        min-height: 450px;
    }
    
    .hero-section[style*="background-image"] {
        min-height: 450px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 350px;
        padding: 3rem 0;
    }
    
    .hero-carousel {
        min-height: 400px;
    }
    
    .hero-slide {
        min-height: 400px;
    }
    
    .hero-section[style*="background-image"] {
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
        flex-direction: column;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .hero-indicators {
        bottom: 1rem;
    }
}

/* 内容布局 */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-bottom: 3rem;
}

.main-area {
    min-width: 0;
}

.section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* 侧边栏 */
.sidebar {
    min-width: 0;
}

.widget {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* 浮动操作按钮 */
.floating-actions {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.floating-actions .search-btn,
.floating-actions .theme-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-actions .search-btn:hover,
.floating-actions .theme-btn:hover {
    background-color: var(--bg-secondary);
    transform: translateY(-2px);
}

/* 页脚 */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section p,
.footer-section li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
} 

/* 全局标签字体大小限制 */
.tag,
.tag a,
.tag li,
.size-0,
.size-5,
.size-10,
.size-20,
.size-30 {
    font-size: 0.875rem !important;
    max-font-size: 0.875rem !important;
}

/* 确保标签云中的标签不会过大 */
.widget .tag,
.widget .size-0,
.widget .size-5,
.widget .size-10,
.widget .size-20,
.widget .size-30 {
    font-size: 0.875rem !important;
}

/* 强制覆盖所有可能的标签字体大小 */
* .size-0,
* .size-5,
* .size-10,
* .size-20,
* .size-30,
* a.size-0,
* a.size-5,
* a.size-10,
* a.size-20,
* a.size-30,
* li.size-0,
* li.size-5,
* li.size-10,
* li.size-20,
* li.size-30 {
    font-size: 0.875rem !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}

/* 特别针对侧边栏的强制限制 */
#secondary *,
#secondary .widget *,
#secondary .widget .tag,
#secondary .widget .size-0,
#secondary .widget .size-5,
#secondary .widget .size-10,
#secondary .widget .size-20,
#secondary .widget .size-30 {
    font-size: 0.875rem !important;
    font-size: 14px !important;
    max-font-size: 0.875rem !important;
}

/* 最高优先级强制覆盖 - 确保所有标签字体都被限制 */
html body .widget .size-0,
html body .widget .size-5,
html body .widget .size-10,
html body .widget .size-20,
html body .widget .size-30,
html body .widget a.size-0,
html body .widget a.size-5,
html body .widget a.size-10,
html body .widget a.size-20,
html body .widget a.size-30,
html body .widget li.size-0,
html body .widget li.size-5,
html body .widget li.size-10,
html body .widget li.size-20,
html body .widget li.size-30,
html body #secondary .widget .size-0,
html body #secondary .widget .size-5,
html body #secondary .widget .size-10,
html body #secondary .widget .size-20,
html body #secondary .widget .size-30 {
    font-size: 0.875rem !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    max-font-size: 0.875rem !important;
} 

/* 最高优先级横幅样式 - 确保不被覆盖 */
html body .hero-section {
    min-height: 420px !important;
    padding: 4rem 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

html body .hero-carousel {
    min-height: 440px !important;
    padding: 0 !important;
}

html body .hero-slide {
    min-height: 440px !important;
}

html body .hero-section[style*="background-image"] {
    min-height: 440px !important;
}

/* 响应式最高优先级 */
@media (max-width: 768px) {
    html body .hero-section {
        min-height: 340px !important;
        padding: 3rem 0 !important;
    }
    
    html body .hero-carousel {
        min-height: 360px !important;
    }
    
    html body .hero-slide {
        min-height: 360px !important;
    }
    
    html body .hero-section[style*="background-image"] {
        min-height: 360px !important;
    }
}

@media (max-width: 480px) {
    html body .hero-section {
        min-height: 320px !important;
        padding: 2.5rem 0 !important;
    }
    
    html body .hero-carousel {
        min-height: 340px !important;
    }
    
    html body .hero-slide {
        min-height: 340px !important;
    }
    
    html body .hero-section[style*="background-image"] {
        min-height: 340px !important;
    }
} 

@media (max-width: 1023px) {
  .hero-section { padding: 3.5rem 0 !important; min-height: 360px !important; }
  .hero-carousel, .hero-slide, .hero-section[style*="background-image"] { min-height: 400px !important; }
}

@media (max-width: 767px) {
  .hero-section { padding: 3rem 0 !important; min-height: 320px !important; }
  .hero-carousel, .hero-slide, .hero-section[style*="background-image"] { min-height: 340px !important; }
} 