/* ============================================
   Tom影院 · 猫鼠大视界 — 完整样式表
   风格：暗夜紫金 · 毛玻璃 · 圆角卡片 · 响应式
   ============================================ */

/* ---------- 主题变量与暗色模式 ---------- */
:root {
    --primary: #6a0dad;
    --primary-light: #9b59b6;
    --primary-dark: #4a2d6a;
    --accent: #ffd700;
    --accent-secondary: #ff6b6b;
    --bg-gradient-start: #f5f0ff;
    --bg-gradient-mid: #e8e0f7;
    --bg-gradient-end: #faf7ff;
    --card-bg: #ffffff;
    --text-primary: #2d2d3a;
    --text-secondary: #5a4a7a;
    --text-muted: #7a6a8a;
    --text-light: #9b8aab;
    --shadow-color: rgba(106, 13, 173, 0.1);
    --shadow-hover: rgba(106, 13, 173, 0.2);
    --border-light: #f0e6ff;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.8);
    --footer-bg: #2d1f3d;
    --footer-text: #c0a8d0;
    --hero-bg-start: #f0e6ff;
    --hero-bg-end: #e0d4f5;
    --stat-bg: linear-gradient(135deg, #f8f4ff, #f0e6ff);
    --rank-bg: linear-gradient(135deg, #6a0dad, #9b59b6);
    --tag-bg: linear-gradient(135deg, #6a0dad, #9b59b6);
    --btn-primary-bg: linear-gradient(135deg, #6a0dad, #9b59b6);
    --btn-secondary-bg: linear-gradient(135deg, #ffd700, #ffb347);
    --platform-bg: linear-gradient(135deg, #6a0dad, #8e44ad);
    --feature-bg: rgba(255, 255, 255, 0.1);
    --feature-text: #e0d4f5;
    --header-bg: linear-gradient(135deg, #6a0dad 0%, #9b59b6 50%, #8e44ad 100%);
    --nav-hover: rgba(255, 255, 255, 0.2);
    --hero-title-shadow: rgba(106, 13, 173, 0.2);
    --scrollbar-thumb: #9b59b6;
    --scrollbar-track: #f0e6ff;
    --transition-fast: 0.3s;
    --transition-slow: 0.6s;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
    --border-radius-round: 50px;
    --font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-gradient-start: #1a1025;
        --bg-gradient-mid: #241536;
        --bg-gradient-end: #1e1230;
        --card-bg: #2a1b3d;
        --text-primary: #e8e0f7;
        --text-secondary: #c0a8d0;
        --text-muted: #9b8aab;
        --text-light: #7a6a8a;
        --shadow-color: rgba(0, 0, 0, 0.4);
        --shadow-hover: rgba(0, 0, 0, 0.6);
        --border-light: #3a2a50;
        --glass-bg: rgba(42, 27, 61, 0.7);
        --glass-border: rgba(255, 255, 255, 0.1);
        --footer-bg: #150d1f;
        --footer-text: #8a7a9a;
        --hero-bg-start: #241536;
        --hero-bg-end: #1e1230;
        --stat-bg: linear-gradient(135deg, #2a1b3d, #241536);
        --rank-bg: linear-gradient(135deg, #6a0dad, #9b59b6);
        --tag-bg: linear-gradient(135deg, #6a0dad, #9b59b6);
        --btn-primary-bg: linear-gradient(135deg, #6a0dad, #9b59b6);
        --btn-secondary-bg: linear-gradient(135deg, #ffd700, #ffb347);
        --platform-bg: linear-gradient(135deg, #4a1a6e, #6a0dad);
        --feature-bg: rgba(255, 255, 255, 0.08);
        --feature-text: #c0a8d0;
        --header-bg: linear-gradient(135deg, #4a1a6e 0%, #6a0dad 50%, #8e44ad 100%);
        --nav-hover: rgba(255, 255, 255, 0.1);
        --hero-title-shadow: rgba(0, 0, 0, 0.4);
        --scrollbar-thumb: #6a0dad;
        --scrollbar-track: #241536;
    }
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* ---------- 自定义滚动条 ---------- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 10px;
    transition: background 0.3s;
}

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

/* ---------- 容器 ---------- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ---------- 头部导航 ---------- */
.header {
    background: var(--header-bg);
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(106, 13, 173, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
    text-shadow: 2px 2px 8px rgba(255, 215, 0, 0.4);
}

.logo span {
    color: var(--accent);
    transition: color 0.3s;
}

.nav {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    align-items: center;
}

.nav a {
    color: #f0e6ff;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 25px;
    transition: all 0.3s;
    font-size: 0.95rem;
    position: relative;
    letter-spacing: 0.5px;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.nav a:hover {
    background: var(--nav-hover);
    transform: translateY(-2px);
    color: var(--accent);
}

.nav a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* ---------- Hero 区域 ---------- */
.hero {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(180deg, var(--hero-bg-start) 0%, var(--hero-bg-end) 100%);
    border-radius: 0 0 50px 50px;
    position: relative;
    overflow: hidden;
    transition: background 0.5s ease;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroGlow {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10%, -5%); }
    50% { transform: translate(-5%, 10%); }
    75% { transform: translate(-10%, -10%); }
}

.hero h2 {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px var(--hero-title-shadow);
    position: relative;
    z-index: 1;
    font-weight: 900;
    letter-spacing: 1px;
    transition: color 0.3s, text-shadow 0.3s;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    line-height: 1.8;
}

/* ---------- 通用区块 ---------- */
.section {
    padding: 60px 20px;
    animation: fadeInUp 0.8s ease-out both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 40px;
    position: relative;
    font-weight: 900;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    margin: 15px auto 0;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.section-title:hover::after {
    width: 120px;
}

/* ---------- 漫画网格 ---------- */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

.comic-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 8px 30px var(--shadow-color);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    cursor: pointer;
    position: relative;
    border: 1px solid transparent;
}

.comic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px var(--shadow-hover);
    border-color: var(--border-light);
}

.comic-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.05);
}

.comic-card img {
    height: 280px;
    width: 100%;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.comic-info {
    padding: 20px;
    transition: background 0.3s;
}

.comic-info h3 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
    font-weight: 800;
    transition: color 0.3s;
}

.comic-info h3:hover {
    color: var(--primary);
}

.comic-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 5px;
    line-height: 1.4;
}

.tag {
    display: inline-block;
    background: var(--tag-bg);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 10px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: default;
}

.tag:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(106, 13, 173, 0.3);
}

/* ---------- 精品推荐 ---------- */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.featured-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 8px 30px var(--shadow-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    border: 1px solid transparent;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px var(--shadow-hover);
    border-color: var(--border-light);
}

.featured-card:hover img {
    transform: scale(1.05);
}

.featured-card img {
    height: 220px;
    width: 100%;
    transition: transform 0.5s ease;
}

.featured-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.featured-info h3 {
    font-size: 1.4rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-weight: 800;
    transition: color 0.3s;
}

.featured-info h3:hover {
    color: var(--primary);
}

.featured-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    flex: 1;
    line-height: 1.7;
}

.featured-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    color: var(--text-light);
    font-size: 0.85rem;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

/* ---------- 详情区块 ---------- */
.detail-section {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: 0 8px 30px var(--shadow-color);
    transition: background 0.3s, box-shadow 0.3s;
    border: 1px solid transparent;
}

.detail-section:hover {
    box-shadow: 0 12px 35px var(--shadow-hover);
}

.detail-section h2 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-left: 5px solid var(--accent);
    padding-left: 15px;
    font-weight: 800;
    transition: color 0.3s;
}

.detail-section h3 {
    color: var(--primary-dark);
    font-size: 1.3rem;
    margin: 20px 0 10px;
    font-weight: 700;
    position: relative;
    padding-left: 12px;
}

.detail-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: var(--accent);
    border-radius: 2px;
}

.detail-section p {
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: 15px;
    text-align: justify;
}

.detail-section .tag {
    margin-right: 8px;
}

/* ---------- 角色网格 ---------- */
.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.character-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 20px var(--shadow-color);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    border: 1px solid transparent;
}

.character-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px var(--shadow-hover);
    border-color: var(--border-light);
}

.character-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 4px solid #e8d5f5;
    transition: border-color 0.3s, transform 0.3s;
}

.character-card:hover img {
    border-color: var(--accent);
    transform: scale(1.05);
}

.character-card h4 {
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin-bottom: 5px;
    font-weight: 800;
    transition: color 0.3s;
}

.character-card h4:hover {
    color: var(--primary);
}

.character-card .role {
    color: var(--primary-light);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.character-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---------- 平台介绍 ---------- */
.platform-section {
    background: var(--platform-bg);
    color: #fff;
    padding: 60px 20px;
    border-radius: var(--border-radius-xl);
    margin: 20px;
    position: relative;
    overflow: hidden;
    transition: background 0.5s ease;
}

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

@keyframes platformGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-10%, 10%) scale(1.1); }
}

.platform-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--accent);
    font-weight: 900;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.platform-section p {
    line-height: 1.9;
    margin-bottom: 15px;
    color: var(--feature-text);
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: justify;
}

.platform-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.feature-item {
    background: var(--feature-bg);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.feature-item h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--feature-text);
    margin: 0;
    text-align: center;
}

/* ---------- 下载区块 ---------- */
.download-section {
    text-align: center;
    padding: 60px 20px;
    position: relative;
}

.download-section h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 900;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.download-section p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: var(--border-radius-round);
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: #fff;
    box-shadow: 0 5px 20px rgba(106, 13, 173, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(106, 13, 173, 0.4);
}

.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--primary-dark);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 5px 20px rgba(106, 13, 173, 0.3);
}

/* ---------- 用户评论 ---------- */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.review-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 25px;
    box-shadow: 0 5px 20px var(--shadow-color);
    border-left: 4px solid var(--accent);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    border: 1px solid transparent;
}

.review-card:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px var(--shadow-hover);
    border-color: var(--border-light);
}

.review-card .user {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.review-card .avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--rank-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    margin-right: 12px;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(106, 13, 173, 0.2);
}

.review-card .username {
    font-weight: 700;
    color: var(--primary-dark);
    flex: 1;
}

.review-card .time {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-left: auto;
    white-space: nowrap;
}

.review-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: justify;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    box-shadow: 0 5px 20px var(--shadow-color);
    margin-top: 40px;
    width: 320px;
    flex-shrink: 0;
    transition: background 0.3s, box-shadow 0.3s;
    border: 1px solid transparent;
}

.sidebar:hover {
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.sidebar h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-light);
    font-weight: 800;
    letter-spacing: 0.5px;
    position: relative;
}

.sidebar h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.sidebar h3:hover::after {
    width: 80px;
}

.rank-list {
    list-style: none;
}

.rank-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.3s, padding-left 0.3s;
    cursor: default;
}

.rank-list li:hover {
    background: rgba(106, 13, 173, 0.05);
    padding-left: 5px;
}

.rank-list li:last-child {
    border-bottom: none;
}

.rank-number {
    background: var(--rank-bg);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(106, 13, 173, 0.2);
}

.rank-title {
    flex: 1;
    margin-left: 15px;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s;
}

.rank-title:hover {
    color: var(--primary);
}

.rank-value {
    color: var(--primary-light);
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    background: var(--stat-bg);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: default;
}

.stat-item:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* ---------- 布局 ---------- */
.layout {
    display: flex;
    gap: 30px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

/* ---------- 页脚 ---------- */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 0 20px;
    margin-top: 60px;
    transition: background 0.5s ease;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary), var(--accent));
    background-size: 200% 100%;
    animation: footerGradient 5s linear infinite;
}

@keyframes footerGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h4 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.footer-col h4:hover::after {
    width: 50px;
}

.footer-col a {
    display: block;
    margin-bottom: 8px;
    color: var(--footer-text);
    font-size: 0.9rem;
    transition: color 0.3s, padding-left 0.3s;
    position: relative;
}

.footer-col a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    font-size: 0.85rem;
    color: var(--footer-text);
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.copyright p {
    margin-bottom: 5px;
}

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

.section, .hero, .platform-section, .download-section, .sidebar, .footer {
    animation: fadeInUp 0.8s ease-out both;
}

/* 滚动时元素的动画延迟 */
.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.3s; }

/* ---------- 响应式设计 ---------- */
@media (max-width: 1200px) {
    .container {
        padding: 0 15px;
    }
    
    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .featured-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-top: 20px;
    }
    
    .nav {
        gap: 15px;
    }
    
    .hero h2 {
        font-size: 2.4rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .platform-section {
        margin: 10px;
        padding: 40px 15px;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        justify-content: center;
        gap: 10px;
    }
    
    .nav a {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    .logo {
        font-size: 1.6rem;
    }
    
    .hero {
        padding: 40px 15px;
        border-radius: 0 0 30px 30px;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section {
        padding: 40px 15px;
    }
    
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }
    
    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .comic-card img {
        height: 200px;
    }
    
    .comic-info {
        padding: 15px;
    }
    
    .comic-info h3 {
        font-size: 1.1rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-card img {
        height: 200px;
    }
    
    .detail-section {
        padding: 25px;
    }
    
    .detail-section h2 {
        font-size: 1.4rem;
    }
    
    .detail-section h3 {
        font-size: 1.1rem;
    }
    
    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .character-card {
        padding: 20px;
    }
    
    .character-card img {
        width: 90px;
        height: 90px;
    }
    
    .platform-section {
        padding: 30px 15px;
        border-radius: 20px;
    }
    
    .platform-section h2 {
        font-size: 1.5rem;
    }
    
    .platform-features {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .feature-item {
        padding: 15px;
    }
    
    .download-section {
        padding: 40px 15px;
    }
    
    .download-section h2 {
        font-size: 1.5rem;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
        padding: 12px 30px;
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .review-card {
        padding: 20px;
    }
    
    .footer .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-col {
        min-width: 100%;
    }
    
    .copyright {
        font-size: 0.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .comic-card img {
        height: 160px;
    }
    
    .comic-info {
        padding: 10px;
    }
    
    .comic-info h3 {
        font-size: 0.95rem;
    }
    
    .comic-info p {
        font-size: 0.8rem;
    }
    
    .tag {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .featured-card img {
        height: 180px;
    }
    
    .detail-section {
        padding: 20px;
    }
    
    .detail-section h2 {
        font-size: 1.2rem;
    }
    
    .character-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .character-card {
        padding: 15px;
    }
    
    .character-card img {
        width: 70px;
        height: 70px;
    }
    
    .character-card h4 {
        font-size: 1rem;
    }
    
    .character-card p {
        font-size: 0.8rem;
    }
    
    .platform-section p {
        font-size: 0.9rem;
    }
    
    .review-card .time {
        display: none;
    }
}

/* ---------- 无障碍与减少动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- 打印样式 ---------- */
@media print {
    .header, .footer, .nav, .download-section, .sidebar {
        display: none !important;
    }
    
    body {
        background: #fff;
        color: #000;
    }
    
    .section {
        padding: 20px 0;
        animation: none;
    }
    
    .comic-card, .featured-card, .review-card, .character-card, .detail-section {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}

/* ---------- 焦点可见性 ---------- */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- 选中文本样式 ---------- */
::selection {
    background: var(--primary);
    color: #fff;
    text-shadow: none;
}

/* ---------- 高DPI优化 ---------- */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .comic-card img, .featured-card img, .character-card img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}