/* ==========================================
   香蕉视频影院 - 主样式表
   风格：暗色科技感 + 霓虹渐变
   ========================================== */

/* ---------- CSS 变量与主题 ---------- */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-hover: rgba(255, 255, 255, 0.1);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-primary: #f0f0f5;
    --text-secondary: #a0a4b8;
    --text-muted: #6b7280;
    --accent: #f5c518;
    --accent-secondary: #ff6b6b;
    --gradient-main: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-gold: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
    --gradient-banner: linear-gradient(135deg, #0a0e1a 0%, #1a1a2e 50%, #16213e 100%);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 12px 48px rgba(102, 126, 234, 0.3);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* 亮色模式 */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #f5f7fa;
        --bg-secondary: #ffffff;
        --bg-card: rgba(255, 255, 255, 0.85);
        --bg-glass: rgba(0, 0, 0, 0.03);
        --bg-glass-hover: rgba(0, 0, 0, 0.06);
        --border-glass: rgba(0, 0, 0, 0.08);
        --text-primary: #1a1a2e;
        --text-secondary: #4a5568;
        --text-muted: #718096;
        --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
        --shadow-hover: 0 8px 32px rgba(102, 126, 234, 0.15);
        --gradient-banner: linear-gradient(135deg, #e0e7ff 0%, #f0e6ff 50%, #e6f0ff 100%);
    }
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
}

h1 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
}

h2 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 3px;
}

h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

section {
    padding: 3rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    scroll-margin-top: 80px;
}

/* ---------- 滚动动画 ---------- */
@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 pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 0 40px rgba(102, 126, 234, 0.6); }
}

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

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

/* 滚动动画应用 */
section {
    animation: fadeInUp 0.8s ease 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 (prefers-reduced-motion: no-preference) {
    .movie-grid article,
    .featured-grid article,
    .cast-grid article,
    .comments-list article {
        opacity: 0;
        animation: fadeInUp 0.6s ease forwards;
    }

    .movie-grid article:nth-child(1), .featured-grid article:nth-child(1), .cast-grid article:nth-child(1) { animation-delay: 0.05s; }
    .movie-grid article:nth-child(2), .featured-grid article:nth-child(2), .cast-grid article:nth-child(2) { animation-delay: 0.1s; }
    .movie-grid article:nth-child(3), .featured-grid article:nth-child(3), .cast-grid article:nth-child(3) { animation-delay: 0.15s; }
    .movie-grid article:nth-child(4), .featured-grid article:nth-child(4), .cast-grid article:nth-child(4) { animation-delay: 0.2s; }
    .movie-grid article:nth-child(5) { animation-delay: 0.25s; }
    .movie-grid article:nth-child(6) { animation-delay: 0.3s; }
    .movie-grid article:nth-child(7) { animation-delay: 0.35s; }
    .movie-grid article:nth-child(8) { animation-delay: 0.4s; }
    .movie-grid article:nth-child(9) { animation-delay: 0.45s; }
    .movie-grid article:nth-child(10) { animation-delay: 0.5s; }
    .movie-grid article:nth-child(11) { animation-delay: 0.55s; }
    .movie-grid article:nth-child(12) { animation-delay: 0.6s; }

    .comments-list article:nth-child(1) { animation-delay: 0.02s; }
    .comments-list article:nth-child(2) { animation-delay: 0.04s; }
    .comments-list article:nth-child(3) { animation-delay: 0.06s; }
    .comments-list article:nth-child(4) { animation-delay: 0.08s; }
    .comments-list article:nth-child(5) { animation-delay: 0.1s; }
    .comments-list article:nth-child(6) { animation-delay: 0.12s; }
    .comments-list article:nth-child(7) { animation-delay: 0.14s; }
    .comments-list article:nth-child(8) { animation-delay: 0.16s; }
}

/* ---------- 头部导航 ---------- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 5%;
    gap: 2rem;
}

nav h1 {
    margin: 0;
    white-space: nowrap;
}

nav h1 a {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    transition: transform var(--transition-normal);
    display: inline-block;
}

nav h1 a:hover {
    transform: scale(1.05);
    text-shadow: 0 0 30px rgba(240, 147, 251, 0.5);
}

nav ul {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

nav ul li a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
    background: transparent;
}

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

nav ul li a:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
}

nav ul li a:hover::after {
    width: 70%;
}

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

/* ---------- 热门影视区 ---------- */
#hot-movies {
    background: var(--gradient-banner);
}

#hot-movies h2 {
    color: var(--text-primary);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.movie-grid article {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    transition: all var(--transition-normal);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-card);
}

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

.movie-grid article:hover::before {
    left: 100%;
}

.movie-grid article:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(240, 147, 251, 0.3);
    box-shadow: var(--shadow-hover);
}

.movie-grid img {
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    transition: transform var(--transition-normal);
    aspect-ratio: 5/7;
    object-fit: cover;
}

.movie-grid article:hover img {
    transform: scale(1.03);
}

.movie-grid h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    position: relative;
    display: inline-block;
}

.movie-grid h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.movie-grid article:hover h3::after {
    transform: scaleX(1);
}

.movie-grid p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    line-height: 1.5;
}

.movie-grid p:last-child {
    color: var(--accent);
    font-weight: 600;
    margin-top: 0.5rem;
    display: inline-block;
    padding: 0.2rem 0.8rem;
    background: rgba(245, 197, 24, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
}

/* ---------- 精品推荐 ---------- */
#featured {
    background: var(--bg-secondary);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.featured-grid article {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.featured-grid article::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.featured-grid article:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.featured-grid article:hover::after {
    opacity: 1;
}

.featured-grid img {
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    aspect-ratio: 5/7;
    object-fit: cover;
}

.featured-grid h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.featured-grid p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.featured-grid p:nth-of-type(1) {
    color: var(--text-muted);
    font-style: italic;
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
}

.featured-grid p:last-child {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
}

/* ---------- 影视详细介绍 ---------- */
#movie-detail {
    background: var(--bg-primary);
}

#movie-detail article {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
    max-width: 900px;
    margin: 0 auto;
}

#movie-detail h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

#movie-detail img {
    border-radius: var(--radius-md);
    margin: 1.5rem auto;
    max-width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

#movie-detail h3 {
    color: var(--accent);
    font-size: 1.2rem;
    margin: 1.5rem 0 0.8rem;
    padding-left: 1rem;
    border-left: 4px solid var(--accent);
}

#movie-detail p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    text-align: justify;
}

#movie-detail p:last-child {
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--bg-glass);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    display: inline-block;
}

/* ---------- 演员介绍 ---------- */
#cast {
    background: var(--bg-secondary);
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.cast-grid article {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-card);
}

.cast-grid article:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: rgba(240, 147, 251, 0.3);
}

.cast-grid img {
    border-radius: 50%;
    margin: 0 auto 1rem;
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 3px solid transparent;
    background: var(--gradient-accent);
    padding: 3px;
    transition: transform var(--transition-normal);
}

.cast-grid article:hover img {
    transform: scale(1.05);
    animation: pulseGlow 2s infinite;
}

.cast-grid h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.cast-grid p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

.cast-grid p:first-of-type {
    color: var(--accent);
    font-weight: 600;
}

/* ---------- 平台介绍 ---------- */
#platform-intro {
    background: var(--bg-primary);
}

#platform-intro p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.2rem;
    max-width: 900px;
    text-align: justify;
}

#platform-intro p:first-of-type {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ---------- APP下载 ---------- */
#app-download {
    background: var(--gradient-banner);
    text-align: center;
}

#app-download h2 {
    text-align: center;
}

#app-download h2::after {
    left: 50%;
    transform: translateX(-50%);
}

#app-download h3 {
    color: var(--accent);
    margin: 1.5rem 0 1rem;
}

#app-download p {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 1.5rem;
    line-height: 1.8;
}

.download-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.download-buttons a {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.download-buttons a:nth-child(1) {
    background: var(--gradient-accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(240, 147, 251, 0.3);
}

.download-buttons a:nth-child(1)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.download-buttons a:nth-child(1):hover::before {
    left: 100%;
}

.download-buttons a:nth-child(2) {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.download-buttons a:nth-child(3) {
    background: var(--gradient-gold);
    color: #fff;
    box-shadow: 0 4px 20px rgba(245, 175, 25, 0.3);
}

.download-buttons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* ---------- 用户评论 ---------- */
#comments {
    background: var(--bg-secondary);
}

.comments-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.comments-list article {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.5rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-card);
    position: relative;
}

.comments-list article::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.3;
    font-family: Georgia, serif;
}

.comments-list article:hover {
    transform: translateX(5px);
    border-color: rgba(240, 147, 251, 0.3);
    box-shadow: var(--shadow-hover);
}

.comments-list p {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.comments-list footer {
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ---------- 侧边栏 ---------- */
aside {
    padding: 3rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    background: var(--bg-primary);
}

aside h2 {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.8rem;
}

aside h2::after {
    left: 50%;
    transform: translateX(-50%);
}

aside section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-normal);
}

aside section:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

aside h3 {
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

aside ol, aside ul {
    counter-reset: rank;
}

aside ol li, aside ul li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all var(--transition-fast);
    cursor: pointer;
}

aside ol li::before {
    counter-increment: rank;
    content: counter(rank);
    width: 24px;
    height: 24px;
    background: var(--gradient-accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

aside ol li:nth-child(-n+3)::before {
    background: var(--gradient-gold);
}

aside ul li::before {
    content: '▸';
    color: var(--accent);
    font-size: 1.2rem;
}

aside li:hover {
    color: var(--text-primary);
    transform: translateX(5px);
}

aside section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.3rem 0;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed var(--border-glass);
}

aside section p:last-child {
    border-bottom: none;
}

aside section p span {
    color: var(--accent);
    font-weight: 600;
}

/* ---------- 页脚 ---------- */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-glass);
    padding: 3rem 5%;
    text-align: center;
}

footer h2 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

footer h2::after {
    left: 50%;
    transform: translateX(-50%);
}

footer ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

footer ul li a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    transition: all var(--transition-fast);
}

footer ul li a:hover {
    color: var(--accent);
    background: var(--bg-glass-hover);
    transform: translateY(-2px);
}

footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

footer p:last-of-type a {
    color: var(--text-secondary);
    margin: 0 0.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

footer p:last-of-type a:hover {
    color: var(--accent);
    background: var(--bg-glass-hover);
}

/* ---------- 响应式布局 ---------- */
@media (max-width: 1024px) {
    section {
        padding: 2.5rem 4%;
    }

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

    .featured-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

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

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem 4%;
    }

    nav ul {
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    nav ul li a {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
        white-space: nowrap;
    }

    section {
        padding: 2rem 4%;
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .movie-grid article {
        padding: 0.8rem;
    }

    .movie-grid h3 {
        font-size: 0.95rem;
    }

    .movie-grid p {
        font-size: 0.8rem;
    }

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

    .cast-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }

    .cast-grid img {
        width: 120px;
        height: 120px;
    }

    #movie-detail article {
        padding: 1.5rem;
    }

    #movie-detail h2 {
        font-size: 1.4rem;
    }

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

    aside {
        grid-template-columns: 1fr;
        padding: 2rem 4%;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .download-buttons a {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    footer {
        padding: 2rem 4%;
    }

    footer ul {
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .movie-grid article {
        padding: 0.6rem;
    }

    .movie-grid h3 {
        font-size: 0.85rem;
    }

    .movie-grid p {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .movie-grid p:last-child {
        font-size: 0.7rem;
        padding: 0.1rem 0.5rem;
    }

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

    .cast-grid article {
        padding: 1rem;
    }

    .cast-grid img {
        width: 100px;
        height: 100px;
    }

    .cast-grid h3 {
        font-size: 1rem;
    }

    .cast-grid p {
        font-size: 0.8rem;
    }

    #movie-detail article {
        padding: 1rem;
    }

    #movie-detail h2 {
        font-size: 1.2rem;
    }

    #movie-detail h3 {
        font-size: 1rem;
    }

    #movie-detail p {
        font-size: 0.9rem;
    }

    aside section {
        padding: 1rem;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* ---------- 选中文本样式 ---------- */
::selection {
    background: rgba(240, 147, 251, 0.3);
    color: var(--text-primary);
}

/* ---------- 焦点样式 ---------- */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---------- 减少动画偏好 ---------- */
@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, aside, .download-buttons {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
    }

    section {
        padding: 1rem 0;
        animation: none;
    }

    .movie-grid article, .featured-grid article, .cast-grid article, .comments-list article {
        opacity: 1;
        animation: none;
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}