/* HiveThink 增强版像素风格 - 支持暗黑/白色主题 */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* ========== CSS变量定义 - 支持主题切换 ========== */
:root {
    /* 浅色主题 */
    --bg-primary: #FAFBFC;
    --bg-secondary: #F0F2F5;
    --bg-card: #FFFFFF;
    --bg-hover: #E8EAED;
    
    /* 深色主题 */
    --dark-bg-primary: #1A1D21;
    --dark-bg-secondary: #25282C;
    --dark-bg-card: #2A2D31;
    --dark-bg-hover: #303337;
    
    /* 像素风格色彩 */
    --pixel-primary: #4A90E2;
    --pixel-secondary: #7ED321;
    --pixel-accent: #F5A623;
    --pixel-warning: #D0021B;
    --pixel-purple: #9013FE;
    --pixel-cyan: #50E3C2;
    --pixel-pink: #FF6B9D;
    --pixel-orange: #FF8C00;
    --pixel-green: #00C896;
    --pixel-blue: #007AFF;
    
    /* 文本颜色 */
    --text-primary: #2C3E50;
    --text-secondary: #5A6C7D;
    --text-muted: #8B949E;
    --text-inverse: #FFFFFF;
    
    /* 深色文本 */
    --dark-text-primary: #E8E9EA;
    --dark-text-secondary: #B8BCC8;
    --dark-text-muted: #8B949E;
    
    /* 边框颜色 */
    --border-light: #E1E4E8;
    --border-medium: #D0D7DE;
    --border-dark: #B8C4CE;
    
    /* 深色边框 */
    --dark-border-light: #3A3D41;
    --dark-border-medium: #4A4D51;
    --dark-border-dark: #5A5D61;
    
    /* 像素尺寸 */
    --pixel-size: 2px;
    --pixel-border: 2px;
    
    /* 动画时长 */
    --anim-fast: 0.15s;
    --anim-normal: 0.3s;
    --anim-slow: 0.5s;
    
    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-pixel: 4px 4px 0px rgba(0,0,0,0.1);
    
    /* 深色阴影 */
    --dark-shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --dark-shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --dark-shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
    --dark-shadow-pixel: 4px 4px 0px rgba(0,0,0,0.3);
}

/* 深色主题类 */
[data-theme="dark"] {
    --bg-primary: var(--dark-bg-primary);
    --bg-secondary: var(--dark-bg-secondary);
    --bg-card: var(--dark-bg-card);
    --bg-hover: var(--dark-bg-hover);
    
    --text-primary: var(--dark-text-primary);
    --text-secondary: var(--dark-text-secondary);
    --text-muted: var(--dark-text-muted);
    
    --border-light: var(--dark-border-light);
    --border-medium: var(--dark-border-medium);
    --border-dark: var(--dark-border-dark);
    
    --shadow-sm: var(--dark-shadow-sm);
    --shadow-md: var(--dark-shadow-md);
    --shadow-lg: var(--dark-shadow-lg);
    --shadow-pixel: var(--dark-shadow-pixel);
}

/* ========== 全局样式 ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', 'Rajdhani', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
    overflow-x: hidden;
    transition: all var(--anim-slow) ease;
    -webkit-text-size-adjust: 100%; /* 防止iPhone横屏时文字放大 */
    -webkit-tap-highlight-color: transparent; /* 移除点击高亮 */
}

/* 像素化图像渲染 */
img {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* ========== Favicon背景增强 ========== */
/* 为浏览器标签页的favicon提供更好的背景对比 */
link[rel="icon"] {
    background: #ffffff;
    border-radius: 4px;
    padding: 2px;
}

/* 确保favicon在各种背景下都清晰可见 */
@media (prefers-color-scheme: dark) {
    link[rel="icon"] {
        background: #ffffff;
        box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
    }
}

/* ========== 主题切换器 - 集成到导航栏 ========== */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: var(--bg-card);
    border: var(--pixel-border) solid var(--border-medium);
    border-radius: 8px;
    padding: 0.25rem;
    box-shadow: var(--shadow-md);
    transition: all var(--anim-normal) ease;
}

/* 导航栏内的主题切换按钮 */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle-btn-nav {
    background: none;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--anim-normal) ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-family: 'Orbitron', monospace;
    font-weight: 500;
    min-width: 60px;
    height: 36px;
}

.theme-toggle-btn-nav:hover {
    background: var(--bg-hover);
    transform: translateY(-1px);
}

.theme-toggle-btn-nav:active {
    transform: translateY(0);
}

#themeIconNav {
    font-size: 16px;
    transition: all var(--anim-normal) ease;
}

#themeTextNav {
    font-size: 12px;
    transition: all var(--anim-normal) ease;
}

/* 移动端主题切换按钮 */
.mobile-theme-toggle {
    padding: 1rem 0;
    border-top: 1px solid var(--border-light);
    margin-top: 1rem;
}

.theme-toggle-btn-mobile {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--anim-normal) ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-family: 'Orbitron', monospace;
    font-weight: 500;
    width: 100%;
    justify-content: center;
}

.theme-toggle-btn-mobile:hover {
    background: var(--bg-hover);
}

#themeIconMobile {
    font-size: 16px;
    transition: all var(--anim-normal) ease;
}

#themeTextMobile {
    font-size: 12px;
    transition: all var(--anim-normal) ease;
}

/* 原有的固定主题切换器（隐藏） */
.theme-switcher {
    display: none;
}

/* 响应式顶部边距调整 */
@media (max-width: 768px) {
    .theme-switcher {
        top: 8px;
        right: 8px;
        padding: 0.2rem;
    }
    
    .theme-toggle-btn {
        padding: 0.4rem;
        font-size: 12px;
        min-width: 50px;
    }
    
    #themeIcon {
        font-size: 14px;
    }
    
    #themeText {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .theme-switcher {
        top: 6px;
        right: 6px;
        padding: 0.15rem;
    }
    
    .theme-toggle-btn {
        padding: 0.3rem;
        font-size: 10px;
        min-width: 45px;
    }
    
    #themeIcon {
        font-size: 12px;
    }
    
    #themeText {
        font-size: 9px;
    }
}

/* ========== 增强像素装饰元素 ========== */
.pixel-decoration {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--pixel-primary);
    animation: pixel-twinkle 3s infinite;
    border-radius: 1px;
}

.pixel-decoration.secondary {
    background: var(--pixel-secondary);
}

.pixel-decoration.accent {
    background: var(--pixel-accent);
}

.pixel-decoration.purple {
    background: var(--pixel-purple);
}

.pixel-decoration.cyan {
    background: var(--pixel-cyan);
}

@keyframes pixel-twinkle {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* 像素网格背景 - 增强版 */
.pixel-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(74, 144, 226, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 144, 226, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: -1;
}

[data-theme="dark"] .pixel-grid {
    background-image: 
        linear-gradient(rgba(74, 144, 226, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 144, 226, 0.1) 1px, transparent 1px);
}

/* 像素边框装饰 */
.pixel-border-decor {
    position: relative;
}

.pixel-border-decor::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid var(--pixel-primary);
    border-radius: 8px;
    z-index: -1;
    opacity: 0.3;
}

/* 像素扫描线效果 */
.pixel-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(74, 144, 226, 0.03) 2px,
            rgba(74, 144, 226, 0.03) 4px
        );
    animation: scanlines 8s linear infinite;
}

[data-theme="dark"] .pixel-scanlines {
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(74, 144, 226, 0.08) 2px,
            rgba(74, 144, 226, 0.08) 4px
        );
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* 像素角落装饰 */
.pixel-corner-tl,
.pixel-corner-tr,
.pixel-corner-bl,
.pixel-corner-br {
    position: absolute;
    width: 8px;
    height: 8px;
    border: 2px solid var(--pixel-primary);
}

.pixel-corner-tl {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.pixel-corner-tr {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
}

.pixel-corner-bl {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
}

.pixel-corner-br {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

/* ========== 导航栏样式 - 像素增强 ========== */
.nav-container {
    background: var(--bg-card);
    border-bottom: var(--pixel-border) solid var(--border-medium);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari兼容性 */
    min-height: 60px;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    padding: 0.5rem 0;
    min-width: fit-content;
}

.logo-container {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.nav-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    padding: 2px;
    display: block;
    flex-shrink: 0;
}

[data-theme="dark"] .nav-logo img {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    filter: brightness(1.1) contrast(1.2);
}

.nav-logo-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 22px;
    color: var(--pixel-primary);
    text-shadow: 3px 3px 0px rgba(74, 144, 226, 0.2);
}

.nav-subtitle {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 6px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all var(--anim-normal) ease;
    position: relative;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--pixel-primary);
    background: var(--bg-hover);
    transform: translateY(-2px);
    border-color: var(--pixel-primary);
}

.nav-link.active {
    color: var(--pixel-primary);
    background: rgba(74, 144, 226, 0.1);
    border-color: var(--pixel-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--pixel-primary);
    transition: all var(--anim-normal) ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

/* 移动端菜单 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all var(--anim-normal) ease;
    min-width: 44px; /* 移动端最小触摸目标尺寸 */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn:hover {
    background: var(--bg-hover);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: var(--pixel-border) solid var(--border-medium);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 1rem;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateY(-10px);
    opacity: 0;
    transition: all var(--anim-normal) ease;
    -webkit-transform: translateY(-10px); /* Safari兼容性 */
    -webkit-transition: all var(--anim-normal) ease; /* Safari兼容性 */
}

.mobile-menu.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu .nav-link {
    display: block;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 16px;
    font-weight: 500;
    transition: all var(--anim-fast) ease;
}

.mobile-menu .nav-link:hover {
    background: var(--bg-hover);
    padding-left: 1.25rem;
}

.mobile-menu .nav-link.active {
    background: rgba(74, 144, 226, 0.1);
    border-left: 3px solid var(--pixel-primary);
    padding-left: 1.25rem;
}

/* ========== 按钮样式 - 像素风增强 ========== */
.pixel-btn {
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 24px;
    border: var(--pixel-border) solid var(--pixel-primary);
    background: var(--bg-card);
    color: var(--pixel-primary);
    cursor: pointer;
    transition: all var(--anim-normal) ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
    position: relative;
    box-shadow: var(--shadow-pixel);
    border-radius: 4px;
}

.pixel-btn:hover {
    background: var(--pixel-primary);
    color: var(--text-inverse);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(74, 144, 226, 0.3);
}

.pixel-btn:active {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0px rgba(74, 144, 226, 0.3);
}

.pixel-btn.secondary {
    border-color: var(--pixel-secondary);
    color: var(--pixel-secondary);
}

.pixel-btn.secondary:hover {
    background: var(--pixel-secondary);
    box-shadow: 6px 6px 0px rgba(126, 211, 33, 0.3);
}

.pixel-btn.accent {
    border-color: var(--pixel-accent);
    color: var(--pixel-accent);
}

.pixel-btn.accent:hover {
    background: var(--pixel-accent);
    box-shadow: 6px 6px 0px rgba(245, 166, 35, 0.3);
}

.pixel-btn.purple {
    border-color: var(--pixel-purple);
    color: var(--pixel-purple);
}

.pixel-btn.purple:hover {
    background: var(--pixel-purple);
    box-shadow: 6px 6px 0px rgba(144, 19, 254, 0.3);
}

/* ========== 卡片样式 - 像素风增强 ========== */
.pixel-card {
    background: var(--bg-card);
    border: var(--pixel-border) solid var(--border-medium);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--anim-normal) ease;
    position: relative;
    overflow: hidden;
}

.pixel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--pixel-primary), var(--pixel-secondary), var(--pixel-accent));
}

.pixel-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--pixel-primary);
}

.pixel-card-title {
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.pixel-card-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========== 标题样式 - 像素风增强 ========== */
.page-title {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(24px, 5vw, 40px);
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 0px rgba(74, 144, 226, 0.1);
    position: relative;
    display: inline-block;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--pixel-primary), var(--pixel-secondary));
    border-radius: 2px;
}

.page-subtitle {
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    position: relative;
    padding-left: 1rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--pixel-primary);
    border-radius: 2px;
}

/* ========== 标签样式 - 像素风 ========== */
.pixel-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(74, 144, 226, 0.1);
    color: var(--pixel-primary);
    border: var(--pixel-border) solid var(--pixel-primary);
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0.25rem;
    border-radius: 4px;
}

.pixel-tag.green {
    background: rgba(126, 211, 33, 0.1);
    color: var(--pixel-secondary);
    border-color: var(--pixel-secondary);
}

.pixel-tag.orange {
    background: rgba(245, 166, 35, 0.1);
    color: var(--pixel-accent);
    border-color: var(--pixel-accent);
}

.pixel-tag.purple {
    background: rgba(144, 19, 254, 0.1);
    color: var(--pixel-purple);
    border-color: var(--pixel-purple);
}

.pixel-tag.cyan {
    background: rgba(80, 227, 194, 0.1);
    color: var(--pixel-cyan);
    border-color: var(--pixel-cyan);
}

/* ========== 页脚样式 - 像素风 ========== */
.footer {
    background: var(--bg-secondary);
    border-top: var(--pixel-border) solid var(--border-medium);
    padding: 4rem 0 3rem;
    margin-top: 5rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--pixel-primary), var(--pixel-secondary), var(--pixel-accent));
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: var(--pixel-primary);
}

.footer-text {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 16px;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 15px;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

/* 页脚logo样式 - 与导航栏保持一致 */
.footer-logo img {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    padding: 2px;
}

/* 暗黑模式下页脚logo特殊样式 */
[data-theme="dark"] .footer-logo img {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    filter: brightness(1.1) contrast(1.2);
}

/* ========== 响应式设计 ========== */
@media (max-width: 900px) { /* 临时调整为900px以便测试 */
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex !important; /* 确保显示 */
        font-size: 28px;
        padding: 0.75rem;
        margin: -0.5rem;
        border-radius: 8px;
        background: rgba(128, 128, 128, 0.1); /* 添加背景便于调试 */
    }
    
    .nav-content {
        padding: 0 1rem;
        height: 60px;
    }
    
    .nav-logo img {
        width: 36px;
        height: 36px;
    }
    
    .nav-logo-text {
        font-size: 16px;
    }
    
    .nav-subtitle {
        font-size: 10px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .pixel-card {
        padding: 1.5rem;
    }
    
    .pixel-btn {
        padding: 10px 20px;
        font-size: 12px;
    }
    
    .theme-switcher {
        top: 8px;
        right: 8px;
        padding: 0.25rem;
    }
    
    .theme-btn {
        padding: 0.4rem;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .nav-content {
        padding: 0 0.75rem;
        height: 56px;
    }
    
    .nav-logo img {
        width: 32px;
        height: 32px;
    }
    
    .nav-logo-text {
        font-size: 14px;
    }
    
    .nav-subtitle {
        font-size: 9px;
    }
    
    .mobile-menu-btn {
        font-size: 24px;
        padding: 0.5rem;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    .pixel-card {
        padding: 1rem;
    }
    
    .mobile-menu {
        padding: 0.25rem 0.75rem;
    }
    
    .mobile-menu .nav-link {
        padding: 0.75rem 0.875rem;
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .nav-logo-text {
        font-size: 12px;
    }
    
    .nav-subtitle {
        display: none;
    }
    
    .mobile-menu-btn {
        font-size: 22px;
    }
}

/* 移动端特殊兼容性处理 */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari特殊处理 */
    .nav-container {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    body {
        padding-top: 0; /* 移除顶部内边距 */
    }
    
    main {
        padding-top: 80px; /* 确保内容不被导航栏遮挡 */
    }
}

/* Android Chrome特殊处理 */
@supports not (-webkit-touch-callout: none) {
    .nav-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }
}

/* 确保导航栏在最上层 */
.nav-container {
    will-change: transform; /* 启用硬件加速 */
    -webkit-transform: translateZ(0); /* iOS硬件加速 */
    transform: translateZ(0);
}

/* 防止导航栏被键盘遮挡 */
@media (max-height: 600px) {
    .nav-container {
        position: absolute;
        top: 0;
    }
}

/* ========== 滚动动画 ========== */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--anim-slow) ease;
}

.scroll-animate.show {
    opacity: 1;
    transform: translateY(0);
}

/* ========== 加载动画 ========== */
.pixel-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-top: 2px solid var(--pixel-primary);
    border-radius: 50%;
    animation: pixel-spin 1s linear infinite;
}

@keyframes pixel-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== 像素雨效果 ========== */
.pixel-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 998;
    opacity: 0.8;
}

/* 浅色主题下的像素雨 - 深色雨滴 */
.pixel-drop {
    position: absolute;
    width: 2px;
    height: 8px;
    background: #1a5490;
    box-shadow: 0 0 12px rgba(26, 84, 144, 0.8);
    animation: pixel-fall linear infinite;
    border-radius: 1px;
    opacity: 0.9;
}

.pixel-drop.accent {
    background: #b8860b;
    box-shadow: 0 0 12px rgba(184, 134, 11, 0.8);
}

.pixel-drop.purple {
    background: #6a0dad;
    box-shadow: 0 0 12px rgba(106, 13, 173, 0.8);
}

/* 不同颜色的像素雨滴 - 浅色主题深色版本 */
.pixel-drop.cyan {
    background: #008b8b;
    box-shadow: 0 0 12px rgba(0, 139, 139, 0.8);
}

.pixel-drop.primary {
    background: #1a5490;
    box-shadow: 0 0 12px rgba(26, 84, 144, 0.8);
}

.pixel-drop.secondary {
    background: #2d5016;
    box-shadow: 0 0 12px rgba(45, 80, 22, 0.8);
}

.pixel-drop.pink {
    background: #c71585;
    box-shadow: 0 0 12px rgba(199, 21, 133, 0.8);
}

.pixel-drop.orange {
    background: #ff4500;
    box-shadow: 0 0 12px rgba(255, 69, 0, 0.8);
}

.pixel-drop.green {
    background: #006400;
    box-shadow: 0 0 12px rgba(0, 100, 0, 0.8);
}

.pixel-drop.blue {
    background: #00008b;
    box-shadow: 0 0 12px rgba(0, 0, 139, 0.8);
}

/* 深色主题下的像素雨 - 浅色雨滴 */
[data-theme="dark"] .pixel-drop {
    background: #87ceeb;
    box-shadow: 0 0 12px rgba(135, 206, 235, 0.8);
    opacity: 0.95;
}

[data-theme="dark"] .pixel-drop.accent {
    background: #ffd700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
}

[data-theme="dark"] .pixel-drop.purple {
    background: #da70d6;
    box-shadow: 0 0 12px rgba(218, 112, 214, 0.8);
}

[data-theme="dark"] .pixel-drop.cyan {
    background: #00ffff;
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.8);
}

[data-theme="dark"] .pixel-drop.primary {
    background: #87ceeb;
    box-shadow: 0 0 12px rgba(135, 206, 235, 0.8);
}

[data-theme="dark"] .pixel-drop.secondary {
    background: #90ee90;
    box-shadow: 0 0 12px rgba(144, 238, 144, 0.8);
}

[data-theme="dark"] .pixel-drop.pink {
    background: #ffb6c1;
    box-shadow: 0 0 12px rgba(255, 182, 193, 0.8);
}

[data-theme="dark"] .pixel-drop.orange {
    background: #ffa500;
    box-shadow: 0 0 12px rgba(255, 165, 0, 0.8);
}

[data-theme="dark"] .pixel-drop.green {
    background: #90ee90;
    box-shadow: 0 0 12px rgba(144, 238, 144, 0.8);
}

[data-theme="dark"] .pixel-drop.blue {
    background: #add8e6;
    box-shadow: 0 0 12px rgba(173, 216, 230, 0.8);
}

/* 不同大小的雨滴 */
.pixel-drop.small {
    width: 1px;
    height: 4px;
}

.pixel-drop.medium {
    width: 2px;
    height: 8px;
}

.pixel-drop.large {
    width: 3px;
    height: 12px;
}

/* 不同的坠落速度 */
.pixel-drop.slow {
    animation-duration: 8s;
}

.pixel-drop.normal {
    animation-duration: 5s;
}

.pixel-drop.fast {
    animation-duration: 3s;
}

.pixel-drop.very-fast {
    animation-duration: 2s;
}

/* 不同的透明度 - 增强版 */
.pixel-drop.dim {
    opacity: 0.6;
}

.pixel-drop.bright {
    opacity: 0.9;
}

.pixel-drop.ultra-bright {
    opacity: 1;
    filter: brightness(1.3);
}

/* 增强发光效果 */
.pixel-drop {
    filter: brightness(1.1) contrast(1.2);
}

.pixel-drop.ultra-bright {
    filter: brightness(1.5) contrast(1.3);
}

/* 添加脉冲动画效果 */
.pixel-drop.pulse {
    animation: pixel-fall linear infinite, pixel-pulse 2s ease-in-out infinite;
}

@keyframes pixel-pulse {
    0%, 100% {
        transform: scaleY(1);
        filter: brightness(1.1) contrast(1.2);
    }
    50% {
        transform: scaleY(1.2);
        filter: brightness(1.4) contrast(1.3);
    }
}

/* 添加闪烁效果 */
.pixel-drop.twinkle {
    animation: pixel-fall linear infinite, pixel-twinkle 1.5s ease-in-out infinite;
}

@keyframes pixel-twinkle {
    0%, 100% { opacity: 0.8; }
    25% { opacity: 1; }
    50% { opacity: 0.6; }
    75% { opacity: 1; }
}

.pixel-drop.ultra-bright {
    opacity: 1;
}

@keyframes pixel-fall {
    0% {
        transform: translateY(-100vh);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

@keyframes pixel-fall-slow {
    0% {
        transform: translateY(-100vh);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

@keyframes pixel-fall-fast {
    0% {
        transform: translateY(-100vh);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* ========== 工具类 ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.p-3 { padding: 3rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.hidden { display: none; }
.visible { display: block; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* 像素滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--pixel-primary);
    border-radius: 4px;
    border: 1px solid var(--border-medium);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--pixel-secondary);
}

/* 选择文本样式 */
::selection {
    background: var(--pixel-primary);
    color: white;
}

::-moz-selection {
    background: var(--pixel-primary);
    color: white;
}
