/* ========================================
   蜜糖漫画 - 全局样式与变量
   ======================================== */
:root {
    /* 主色调 - 蜜糖甜橙渐变 */
    --primary: #FF6B6B;
    --primary-light: #FF8E8E;
    --primary-dark: #E84545;
    --secondary: #FFD93D;
    --accent: #6C5CE7;
    --accent-light: #A29BFE;

    /* 渐变 */
    --gradient-main: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 50%, #FFD93D 100%);
    --gradient-banner: linear-gradient(135deg, rgba(255, 107, 107, 0.95) 0%, rgba(255, 142, 142, 0.9) 40%, rgba(108, 92, 231, 0.9) 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);

    /* 文字 */
    --text-primary: #2D3436;
    --text-secondary: #636E72;
    --text-light: #B2BEC3;
    --text-white: #FFFFFF;

    /* 背景 */
    --bg-main: #FFF5F5;
    --bg-secondary: #FFE8E8;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.6);

    /* 毛玻璃 */
    --glass-blur: blur(20px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(255, 107, 107, 0.3);

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 50px;

    /* 间距 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* 过渡 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* 字体 */
    --font-main: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    --font-title: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 暗色模式 */
[data-theme="dark"] {
    --text-primary: #ECF0F1;
    --text-secondary: #BDC3C7;
    --text-light: #7F8C8D;
    --bg-main: #1A1A2E;
    --bg-secondary: #16213E;
    --bg-card: rgba(26, 26, 46, 0.85);
    --bg-glass: rgba(26, 26, 46, 0.6);
    --gradient-card: linear-gradient(145deg, rgba(26, 26, 46, 0.9) 0%, rgba(22, 33, 62, 0.7) 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ========================================
   基础样式重置
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

/* 滚动动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-main);
    border-radius: 5px;
}

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

/* ========================================
   头部导航
   ======================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: var(--glass-border);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

header:hover {
    box-shadow: var(--shadow-md);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: transform var(--transition-fast);
    letter-spacing: 2px;
}

.logo h1:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-menu li a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    transition: width var(--transition-normal);
}

.nav-menu li a:hover {
    color: var(--primary);
    background: rgba(255, 107, 107, 0.1);
}

.nav-menu li a:hover::after {
    width: 60%;
}

/* ========================================
   主体内容区域
   ======================================== */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 90px var(--space-lg) var(--space-2xl);
    position: relative;
}

/* 区块通用样式 */
section {
    margin-bottom: var(--space-2xl);
    animation: fadeInUp 0.8s ease both;
}

section:nth-child(even) {
    animation-name: slideInRight;
}

section:nth-child(odd) {
    animation-name: slideInLeft;
}

section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-xl);
    position: relative;
    display: inline-block;
    padding-bottom: var(--space-sm);
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 3px;
    background: var(--gradient-main);
    border-radius: var(--radius-full);
    animation: shimmer 2s infinite linear;
}

/* ========================================
   热门漫画区域
   ======================================== */
.hot-section {
    background: var(--gradient-banner);
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hot-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.hot-section h2 {
    color: var(--text-white);
}

.hot-section h2::after {
    background: rgba(255, 255, 255, 0.8);
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-lg);
    position: relative;
    z-index: 1;
}

.comic-item {
    background: var(--gradient-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.comic-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.comic-item:hover::before {
    left: 100%;
}

.comic-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.comic-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    transition: transform var(--transition-normal);
}

.comic-item:hover img {
    transform: scale(1.05);
}

.comic-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.comic-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    line-height: 1.4;
}

.comic-item p:last-child {
    display: inline-block;
    padding: 4px 12px;
    background: var(--gradient-main);
    color: var(--text-white);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: var(--space-sm);
}

/* ========================================
   精品推荐区域
   ======================================== */
.recommend-section {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.recommend-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.recommend-item::after {
    content: '推荐';
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: var(--gradient-main);
    color: var(--text-white);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
}

.recommend-item:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.recommend-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.recommend-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.recommend-item:hover img {
    transform: scale(1.1);
}

.recommend-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    padding: var(--space-md) var(--space-md) var(--space-xs);
    color: var(--text-primary);
}

.recommend-item p {
    padding: 0 var(--space-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.recommend-item p:first-of-type {
    font-style: italic;
    line-height: 1.5;
}

/* ========================================
   漫画详细介绍区域
   ======================================== */
.detail-section {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
}

.comic-detail {
    max-width: 800px;
    margin: 0 auto;
}

.comic-detail h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.comic-detail img {
    width: 400px;
    height: 550px;
    object-fit: cover;
    margin: 0 auto var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-normal);
}

.comic-detail img:hover {
    transform: scale(1.02);
}

.comic-detail h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: var(--space-lg) 0 var(--space-md);
    color: var(--primary);
    position: relative;
    padding-left: var(--space-md);
}

.comic-detail h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--gradient-main);
    border-radius: var(--radius-full);
}

.comic-detail p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-md);
    text-indent: 2em;
}

.comic-detail p:last-child {
    background: var(--bg-secondary);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    font-weight: 500;
    text-indent: 0;
}

/* ========================================
   角色介绍区域
   ======================================== */
.characters-section {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-xl);
}

.character-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    position: relative;
}

.character-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: var(--radius-md);
    background: var(--gradient-main);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-normal);
}

.character-item:hover::before {
    opacity: 0.2;
}

.character-item:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.character-item img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto var(--space-md);
    border: 4px solid var(--bg-secondary);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.character-item:hover img {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.character-item h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.character-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-xs);
}

.character-item p:first-of-type {
    font-weight: 600;
    color: var(--primary);
}

/* ========================================
   平台介绍区域
   ======================================== */
.platform-section {
    background: var(--gradient-banner);
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    color: var(--text-white);
    position: relative;
    overflow: hidden;
}

.platform-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.platform-section article {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.platform-section h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.platform-section p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: var(--space-lg);
    opacity: 0.9;
}

/* ========================================
   APP下载区域
   ======================================== */
.app-section {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.app-section::before {
    content: '📱';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 120px;
    opacity: 0.1;
    transform: rotate(15deg);
}

.app-section article {
    max-width: 600px;
    margin: 0 auto;
}

.app-section h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
}

.app-section button {
    padding: var(--space-md) var(--space-2xl);
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin: 0 var(--space-sm);
    position: relative;
    overflow: hidden;
}

.app-section button:nth-child(2) {
    background: var(--gradient-main);
    color: var(--text-white);
}

.app-section button:nth-child(3) {
    background: var(--accent);
    color: var(--text-white);
}

.app-section button:nth-child(4) {
    background: var(--secondary);
    color: var(--text-primary);
}

.app-section button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.app-section button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.app-section button:hover::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   用户评论区域
   ======================================== */
.reviews-section {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
}

.review-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.review-list article {
    background: var(--bg-main);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: all var(--transition-normal);
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.review-list article:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--secondary);
}

.review-list article p:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.review-list article strong {
    color: var(--primary);
    font-size: 1.1rem;
}

.review-list article span {
    color: var(--text-light);
    font-size: 0.8rem;
}

.review-list article p:last-child {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ========================================
   侧边栏
   ======================================== */
.sidebar {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--primary);
    color: var(--primary);
}

.sidebar ul {
    margin-bottom: var(--space-xl);
}

.sidebar ul li {
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: var(--space-xl);
}

.sidebar ul li::before {
    content: attr(data-rank);
    position: absolute;
    left: var(--space-sm);
    font-weight: 700;
    color: var(--primary);
}

.sidebar ul li:hover {
    background: var(--bg-secondary);
    color: var(--primary);
    padding-left: var(--space-2xl);
    transform: translateX(4px);
}

.sidebar p {
    background: var(--bg-secondary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xs);
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ========================================
   页脚
   ======================================== */
footer {
    background: var(--gradient-banner);
    color: var(--text-white);
    padding: var(--space-2xl) var(--space-lg);
    margin-top: var(--space-2xl);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
    animation: shimmer 3s infinite linear;
}

footer h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    text-align: center;
}

footer ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

footer ul li a {
    font-size: 0.95rem;
    opacity: 0.9;
    transition: all var(--transition-fast);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
}

footer ul li a:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

footer p {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: var(--space-xs);
}

/* ========================================
   响应式布局
   ======================================== */
@media (max-width: 1200px) {
    main {
        padding: 90px var(--space-md) var(--space-2xl);
    }

    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .recommend-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 992px) {
    nav {
        flex-direction: column;
        height: auto;
        padding: var(--space-md);
    }

    .logo {
        margin-bottom: var(--space-md);
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-sm);
    }

    .nav-menu li a {
        font-size: 0.85rem;
        padding: var(--space-xs) var(--space-sm);
    }

    main {
        padding: 120px var(--space-md) var(--space-2xl);
    }

    .hot-section,
    .recommend-section,
    .detail-section,
    .characters-section,
    .platform-section,
    .app-section,
    .reviews-section {
        padding: var(--space-lg);
    }

    .sidebar {
        position: static;
        max-height: none;
        margin-top: var(--space-2xl);
    }

    .sidebar ul {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--space-xs);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    nav {
        padding: var(--space-sm);
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .nav-menu {
        gap: var(--space-xs);
    }

    .nav-menu li a {
        font-size: 0.8rem;
        padding: var(--space-xs);
    }

    main {
        padding: 100px var(--space-sm) var(--space-xl);
    }

    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: var(--space-sm);
    }

    .comic-item {
        padding: var(--space-sm);
    }

    .comic-item img {
        height: 200px;
    }

    .recommend-grid {
        grid-template-columns: 1fr;
    }

    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: var(--space-md);
    }

    .character-item img {
        width: 150px;
        height: 150px;
    }

    .comic-detail img {
        width: 100%;
        height: auto;
    }

    .review-list {
        grid-template-columns: 1fr;
    }

    .app-section button {
        display: block;
        width: 80%;
        margin: var(--space-sm) auto;
    }

    footer ul {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xs);
    }

    .comic-item p {
        font-size: 0.75rem;
    }

    .comic-item img {
        height: 160px;
    }

    section h2 {
        font-size: 1.5rem;
    }

    .hot-section,
    .recommend-section,
    .detail-section,
    .characters-section,
    .platform-section,
    .app-section,
    .reviews-section {
        padding: var(--space-md);
        border-radius: var(--radius-md);
    }

    .sidebar ul {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-menu {
        display: none;
    }
}

/* ========================================
   滚动动画增强
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .comic-item,
    .recommend-item,
    .character-item,
    .review-list article {
        opacity: 0;
        animation: fadeInUp 0.6s ease forwards;
    }

    .comic-item:nth-child(1),
    .recommend-item:nth-child(1),
    .character-item:nth-child(1),
    .review-list article:nth-child(1) {
        animation-delay: 0.1s;
    }

    .comic-item:nth-child(2),
    .recommend-item:nth-child(2),
    .character-item:nth-child(2),
    .review-list article:nth-child(2) {
        animation-delay: 0.2s;
    }

    .comic-item:nth-child(3),
    .recommend-item:nth-child(3),
    .character-item:nth-child(3),
    .review-list article:nth-child(3) {
        animation-delay: 0.3s;
    }

    .comic-item:nth-child(4),
    .recommend-item:nth-child(4),
    .character-item:nth-child(4),
    .review-list article:nth-child(4) {
        animation-delay: 0.4s;
    }

    .comic-item:nth-child(5),
    .recommend-item:nth-child(5),
    .character-item:nth-child(5),
    .review-list article:nth-child(5) {
        animation-delay: 0.5s;
    }

    .comic-item:nth-child(6),
    .recommend-item:nth-child(6),
    .character-item:nth-child(6),
    .review-list article:nth-child(6) {
        animation-delay: 0.6s;
    }

    .comic-item:nth-child(7),
    .recommend-item:nth-child(7),
    .character-item:nth-child(7),
    .review-list article:nth-child(7) {
        animation-delay: 0.7s;
    }

    .comic-item:nth-child(8),
    .recommend-item:nth-child(8),
    .character-item:nth-child(8),
    .review-list article:nth-child(8) {
        animation-delay: 0.8s;
    }

    .comic-item:nth-child(9),
    .recommend-item:nth-child(9),
    .character-item:nth-child(9),
    .review-list article:nth-child(9) {
        animation-delay: 0.9s;
    }

    .comic-item:nth-child(10),
    .recommend-item:nth-child(10),
    .character-item:nth-child(10),
    .review-list article:nth-child(10) {
        animation-delay: 1s;
    }

    .comic-item:nth-child(11),
    .recommend-item:nth-child(11),
    .character-item:nth-child(11),
    .review-list article:nth-child(11) {
        animation-delay: 1.1s;
    }

    .comic-item:nth-child(12),
    .recommend-item:nth-child(12),
    .character-item:nth-child(12),
    .review-list article:nth-child(12) {
        animation-delay: 1.2s;
    }

    .comic-item:nth-child(13),
    .recommend-item:nth-child(13),
    .character-item:nth-child(13),
    .review-list article:nth-child(13) {
        animation-delay: 1.3s;
    }

    .comic-item:nth-child(14),
    .recommend-item:nth-child(14),
    .character-item:nth-child(14),
    .review-list article:nth-child(14) {
        animation-delay: 1.4s;
    }

    .comic-item:nth-child(15),
    .recommend-item:nth-child(15),
    .character-item:nth-child(15),
    .review-list article:nth-child(15) {
        animation-delay: 1.5s;
    }

    .comic-item:nth-child(16),
    .recommend-item:nth-child(16),
    .character-item:nth-child(16),
    .review-list article:nth-child(16) {
        animation-delay: 1.6s;
    }

    .comic-item:nth-child(17),
    .recommend-item:nth-child(17),
    .character-item:nth-child(17),
    .review-list article:nth-child(17) {
        animation-delay: 1.7s;
    }

    .comic-item:nth-child(18),
    .recommend-item:nth-child(18),
    .character-item:nth-child(18),
    .review-list article:nth-child(18) {
        animation-delay: 1.8s;
    }
}

/* ========================================
   暗色模式适配
   ======================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #ECF0F1;
        --text-secondary: #BDC3C7;
        --text-light: #7F8C8D;
        --bg-main: #1A1A2E;
        --bg-secondary: #16213E;
        --bg-card: rgba(26, 26, 46, 0.85);
        --bg-glass: rgba(26, 26, 46, 0.6);
        --gradient-card: linear-gradient(145deg, rgba(26, 26, 46, 0.9) 0%, rgba(22, 33, 62, 0.7) 100%);
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    }

    .hot-section,
    .platform-section,
    footer {
        background: linear-gradient(135deg, #2C3E50 0%, #34495E 50%, #2C3E50 100%);
    }

    .comic-item,
    .recommend-item,
    .character-item,
    .review-list article,
    .sidebar p {
        background: rgba(26, 26, 46, 0.9);
    }

    .comic-item:hover,
    .recommend-item:hover,
    .character-item:hover {
        border-color: var(--primary);
    }

    .app-section button:nth-child(4) {
        color: var(--text-white);
    }
}

/* ========================================
   无障碍与可访问性
   ======================================== */
:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   打印样式
   ======================================== */
@media print {
    header,
    footer,
    .sidebar,
    .app-section,
    .reviews-section {
        display: none;
    }

    main {
        padding: 0;
    }

    section {
        break-inside: avoid;
        animation: none;
    }

    body {
        background: white;
        color: black;
    }
}