/* ==========================================
   生活片 - asmall.net.cn 全站样式
   风格: 现代紫色系 + 毛玻璃 + 微光效
   ========================================== */

/* ---------- 基础重置与变量 ---------- */
:root {
    --primary: #7C5CFC;
    --primary-light: #9B8AFB;
    --primary-dark: #6B4CFF;
    --bg: #F8F4FF;
    --bg-card: #FFFFFF;
    --text-main: #1A1A2E;
    --text-secondary: #2D2D44;
    --text-muted: #6B6B8A;
    --border-light: rgba(124, 92, 252, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 40px rgba(124, 92, 252, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 30px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] {
    --bg: #0D0820;
    --bg-card: #1A1530;
    --text-main: #F0EBFF;
    --text-secondary: #C4B8E8;
    --text-muted: #8E84B8;
    --border-light: rgba(124, 92, 252, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(26, 21, 48, 0.7);
    --glass-border: rgba(124, 92, 252, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    min-height: 100vh;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
    border: 2px solid var(--bg);
}

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

::selection {
    background: var(--primary);
    color: #FFFFFF;
}

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

/* ---------- 动画关键帧 ---------- */
@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 float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* ---------- 滚动动画触发 ---------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---------- 头部导航 ---------- */
header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 20px;
}

.logo h1 {
    font-size: 1.6rem;
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
    transition: color 0.3s ease;
}

.logo h1 a {
    color: var(--text-main);
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

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

nav ul {
    display: flex;
    list-style: none;
    gap: 24px;
    margin: 0;
    padding: 0;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    padding: 6px 0;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--primary);
}

nav a:hover::after {
    width: 100%;
}

/* ---------- 主视觉 Hero ---------- */
.hero {
    background: linear-gradient(135deg, #7C5CFC 0%, #9B8AFB 100%);
    color: #FFFFFF;
    padding: 60px 0;
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}

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

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite reverse;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 2.2rem;
    margin-bottom: 16px;
    font-weight: 800;
    color: #FFFFFF;
    animation: fadeInUp 0.8s ease;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.1rem;
    max-width: 700px;
    color: #F0EBFF;
    animation: fadeInUp 0.8s ease 0.2s both;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
}

/* ---------- 区块标题 ---------- */
.section-title {
    font-size: 1.8rem;
    color: var(--text-main);
    margin: 48px 0 24px;
    font-weight: 700;
    position: relative;
    padding-left: 16px;
    transition: color 0.3s ease;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(124, 92, 252, 0.5);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 24px;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* ---------- 卡片网格 ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    position: relative;
    animation: fadeInUp 0.6s ease;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.card-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
    aspect-ratio: 5/7;
    object-fit: cover;
}

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

.card-body {
    padding: 16px;
    background: var(--bg-card);
    transition: background 0.3s ease;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
    transition: color 0.3s ease;
}

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

.card-text span {
    display: block;
    margin-bottom: 2px;
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, #F0EBFF 0%, #E8E0FF 100%);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(124, 92, 252, 0.2);
}

.card:hover .badge {
    background: var(--primary);
    color: #FFFFFF;
    transform: scale(1.05);
}

/* ---------- 精品推荐 ---------- */
.recommend-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.6s ease;
}

.recommend-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.recommend-item img {
    width: 160px;
    height: auto;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

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

.recommend-content {
    flex: 1;
}

.recommend-content h3 {
    color: var(--text-main);
    font-size: 1.3rem;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.recommend-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 6px;
    line-height: 1.6;
}

/* ---------- 详情区块 ---------- */
.detail-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 48px 0;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease;
}

.detail-section:hover {
    box-shadow: var(--shadow-md);
}

.detail-section h3 {
    color: var(--text-main);
    font-size: 1.5rem;
    margin-bottom: 16px;
    transition: color 0.3s ease;
}

.detail-section h4 {
    color: var(--text-main);
    font-size: 1.2rem;
    margin: 20px 0 10px;
    position: relative;
    padding-left: 12px;
}

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

.detail-section p {
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.8;
}

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

.character-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.6s ease;
}

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

.character-item img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 12px;
    object-fit: cover;
    border: 3px solid var(--primary);
    transition: all 0.3s ease;
}

.character-item:hover img {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(124, 92, 252, 0.3);
}

.character-item h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 6px;
    transition: color 0.3s ease;
}

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

/* ---------- 平台特性 ---------- */
.platform-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.feature-item {
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.05) 0%, rgba(155, 138, 251, 0.1) 100%);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-item:hover::before {
    transform: scaleX(1);
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.feature-item h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ---------- APP下载区 ---------- */
.app-download {
    background: linear-gradient(135deg, #0D0820 0%, #2D2D44 100%);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    color: #FFFFFF;
    margin: 48px 0;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

.app-download::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(124, 92, 252, 0.2) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

.app-download h2 {
    font-size: 2rem;
    color: #FFFFFF;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.app-download p {
    color: #F0EBFF;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #FFFFFF;
    padding: 12px 32px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    margin: 0 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(124, 92, 252, 0.3);
}

.btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(124, 92, 252, 0.4);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-outline {
    background: transparent;
    border: 2px solid #FFFFFF;
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* ---------- 用户评论 ---------- */
.comments-list {
    list-style: none;
    padding: 0;
}

.comments-list li {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.6s ease;
}

.comments-list li:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.comment-user {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-user::before {
    content: '👤';
    font-size: 1.2em;
}

.comment-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.comment-content {
    color: var(--text-main);
    line-height: 1.7;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 24px 0;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
    height: fit-content;
    transition: all 0.3s ease;
}

.sidebar h3 {
    color: var(--text-main);
    font-size: 1.3rem;
    margin-bottom: 16px;
    position: relative;
    padding-left: 12px;
}

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

.ranking-list {
    list-style: none;
    padding: 0;
}

.ranking-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.ranking-list li:hover {
    padding-left: 10px;
    color: var(--primary);
    background: rgba(124, 92, 252, 0.05);
    border-radius: 6px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.stat-item {
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.05) 0%, rgba(155, 138, 251, 0.1) 100%);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.stat-item:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    transition: color 0.3s ease;
}

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

/* ---------- 友情链接 ---------- */
.friend-links {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 48px 0;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease;
}

.friend-links:hover {
    box-shadow: var(--shadow-md);
}

.friend-links ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.friend-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.friend-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.friend-links a:hover {
    color: var(--primary-dark);
}

.friend-links a:hover::after {
    width: 100%;
}

/* ---------- 页脚 ---------- */
footer {
    background: linear-gradient(135deg, #0D0820 0%, #1A1530 100%);
    color: #F0EBFF;
    padding: 48px 0 24px;
    margin-top: 48px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
    animation: shimmer 3s linear infinite;
    background-size: 1000px 100%;
}

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

.footer-grid h4 {
    color: #FFFFFF;
    font-size: 1.1rem;
    margin-bottom: 12px;
    position: relative;
    padding-bottom: 8px;
}

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

.footer-grid h4:hover::after {
    width: 60px;
}

.footer-grid p {
    font-size: 0.9rem;
    color: #F0EBFF;
    line-height: 1.6;
    opacity: 0.9;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.85rem;
    color: #F0EBFF;
    opacity: 0.8;
}

.footer-bottom a {
    color: #F0EBFF;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #FFFFFF;
}

/* ---------- 主内容区 ---------- */
main {
    min-height: 80vh;
}

.layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

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

/* ---------- 响应式布局 ---------- */
@media (max-width: 1200px) {
    .container {
        padding: 0 16px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        margin-top: 32px;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .detail-section {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .header-wrap {
        flex-direction: column;
        gap: 12px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    
    nav a {
        font-size: 0.9rem;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero h2 {
        font-size: 1.6rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .recommend-item {
        flex-direction: column;
    }
    
    .recommend-item img {
        width: 100%;
        height: auto;
        max-height: 300px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }
    
    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }
    
    .app-download {
        padding: 32px 20px;
    }
    
    .app-download h2 {
        font-size: 1.6rem;
    }
    
    .btn {
        display: block;
        margin: 12px auto;
        max-width: 280px;
        width: 100%;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .detail-section {
        padding: 20px;
        margin: 32px 0;
    }
    
    .platform-features {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-grid h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .comment-user::before {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .card-body {
        padding: 12px;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-text {
        font-size: 0.8rem;
    }
    
    .character-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .character-item {
        padding: 16px;
    }
    
    .character-item img {
        width: 100px;
        height: 100px;
    }
    
    .detail-section {
        padding: 16px;
    }
    
    .detail-section h3 {
        font-size: 1.3rem;
    }
    
    .detail-section h4 {
        font-size: 1.1rem;
    }
    
    .app-download {
        padding: 24px 16px;
    }
    
    .comment-content {
        font-size: 0.9rem;
    }
    
    .friend-links ul {
        gap: 12px;
    }
    
    .friend-links a {
        font-size: 0.85rem;
    }
}

/* ---------- 暗色模式适配 ---------- */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0D0820;
        --bg-card: #1A1530;
        --text-main: #F0EBFF;
        --text-secondary: #C4B8E8;
        --text-muted: #8E84B8;
        --border-light: rgba(124, 92, 252, 0.2);
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.4);
        --glass-bg: rgba(26, 21, 48, 0.7);
        --glass-border: rgba(124, 92, 252, 0.2);
    }
    
    .card, .detail-section, .recommend-item, .character-item, .comments-list li, .friend-links {
        background: var(--bg-card);
        border-color: var(--border-light);
    }
    
    .feature-item {
        background: linear-gradient(135deg, rgba(124, 92, 252, 0.1) 0%, rgba(155, 138, 251, 0.15) 100%);
    }
    
    .stat-item {
        background: linear-gradient(135deg, rgba(124, 92, 252, 0.1) 0%, rgba(155, 138, 251, 0.15) 100%);
    }
    
    .badge {
        background: rgba(124, 92, 252, 0.2);
        color: var(--primary-light);
    }
    
    .card:hover .badge {
        background: var(--primary);
        color: #FFFFFF;
    }
    
    .ranking-list li {
        border-color: var(--border-light);
    }
    
    .ranking-list li:hover {
        background: rgba(124, 92, 252, 0.1);
    }
}

/* ---------- 性能优化 ---------- */
.card-img, .recommend-item img, .character-item img {
    content-visibility: auto;
    contain-intrinsic-size: 300px 420px;
}

.card, .recommend-item, .character-item, .feature-item, .stat-item {
    will-change: transform;
}

/* ---------- 无障碍优化 ---------- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* ---------- 打印样式 ---------- */
@media print {
    header, .hero, .sidebar, .app-download, footer, .friend-links {
        display: none !important;
    }
    
    body {
        background: #FFFFFF;
        color: #000000;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .card, .detail-section, .recommend-item, .character-item, .comments-list li {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ---------- 暗色模式切换按钮 ---------- */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: #FFFFFF;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(124, 92, 252, 0.3);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(45deg);
    box-shadow: 0 8px 25px rgba(124, 92, 252, 0.5);
}

/* ---------- 加载动画占位 ---------- */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}