:root {
    --color-light: #ceddef;
    --color-mid: #5893d4;
    --color-deep: #1f3c88;
    --color-darkest: #070d59;
    --bg-body: #f4f6f9;
    --bg-card: #ffffff;
    --text-primary: #070d59;
    --text-secondary: #1f3c88;
    --text-muted: #5a6c8a;
    --shadow-sm: 0 2px 8px rgba(7, 13, 89, 0.06);
    --shadow-md: 0 4px 16px rgba(7, 13, 89, 0.10);
    --shadow-lg: 0 8px 32px rgba(7, 13, 89, 0.14);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 64px;
    --max-width: 1400px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-width: 320px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== 顶部导航 ========== */
.top-nav {
    width: 100%;
    height: var(--nav-height);
    background: linear-gradient(135deg, #070d59 0%, #1f3c88 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(7, 13, 89, 0.25);
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.top-nav-inner {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
    white-space: nowrap;
    margin: 0;
    cursor: pointer;
    transition: var(--transition);
}
.nav-brand h1:hover {
    color: var(--color-light);
}
.nav-brand h1 span {
    color: #ffd966;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
}
.nav-links a {
    color: #d0d8f0;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 13px;
    border-radius: 20px;
    transition: var(--transition);
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.nav-links a:hover,
.nav-links a:focus {
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    outline: none;
}
.nav-links a.nav-hot {
    background: #ffd966;
    color: #070d59;
    font-weight: 700;
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 217, 102, 0.5);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 217, 102, 0);
    }
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-user .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffd966;
    color: #070d59;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.nav-user .user-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(255, 217, 102, 0.5);
}
.nav-user .login-text {
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}
.nav-user .login-text:hover {
    color: #ffd966;
}
.nav-user .vip-badge {
    background: #ff4757;
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    animation: vip-glow 1.8s infinite;
}
@keyframes vip-glow {
    0%,
    100% {
        box-shadow: 0 0 6px rgba(255, 71, 87, 0.4);
    }
    50% {
        box-shadow: 0 0 18px rgba(255, 71, 87, 0.8);
    }
}

/* 移动端导航汉堡按钮 */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
    z-index: 1001;
}
.nav-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: #fff;
    margin: 5px 0;
    border-radius: 3px;
    transition: var(--transition);
}

/* ========== 主布局 ========== */
.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 24px;
    padding: 20px;
}
.main-content {
    flex: 1;
    min-width: 0;
}
.sidebar {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ========== 通用区块 ========== */
.section-block {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e8ecf2;
    transition: var(--transition);
}
.section-block:hover {
    box-shadow: var(--shadow-md);
}
.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-darkest);
    margin-bottom: 18px;
    padding-left: 14px;
    border-left: 4px solid var(--color-mid);
    letter-spacing: 0.5px;
    position: relative;
}
.section-title .sub-tag {
    font-size: 0.75rem;
    background: #ffd966;
    color: #070d59;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 10px;
    font-weight: 600;
    vertical-align: middle;
    letter-spacing: 0;
}

/* ========== 热门影视网格 ========== */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.movie-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid #eef1f6;
    display: flex;
    flex-direction: column;
}
.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-mid);
}
.movie-card .poster-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e9ecf2;
    flex-shrink: 0;
}
.movie-card .poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}
.movie-card:hover .poster-wrap img {
    transform: scale(1.06);
}
.movie-card .rank-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ffd966;
    color: #070d59;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 4px 9px;
    border-radius: 6px;
    z-index: 2;
    letter-spacing: 0.5px;
}
.movie-card .type-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(7, 13, 89, 0.78);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
}
.movie-card .card-info {
    padding: 10px 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.movie-card .card-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-darkest);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.movie-card .card-info .meta {
    font-size: 0.73rem;
    color: #6b7d95;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2em;
}
.movie-card .card-info .meta span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 明星卡片 ========== */
.star-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.star-card {
    text-align: center;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 16px 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #eef1f6;
    cursor: pointer;
}
.star-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.star-card .star-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 10px;
    display: block;
    border: 3px solid var(--color-light);
    transition: var(--transition);
}
.star-card:hover .star-avatar {
    border-color: var(--color-mid);
    box-shadow: 0 0 20px rgba(88, 147, 212, 0.35);
}
.star-card h4 {
    font-size: 0.95rem;
    color: var(--color-darkest);
    font-weight: 700;
}
.star-card .star-works {
    font-size: 0.73rem;
    color: #6b7d95;
    margin-top: 2px;
}

/* ========== 剧情介绍卡片 ========== */
.plot-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.plot-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid var(--color-mid);
    cursor: pointer;
}
.plot-card:hover {
    box-shadow: var(--shadow-md);
    border-left-color: var(--color-deep);
}
.plot-card h4 {
    font-weight: 700;
    color: var(--color-darkest);
    margin-bottom: 6px;
    font-size: 1rem;
}
.plot-card p {
    font-size: 0.85rem;
    color: #4a5c75;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== 电影详情介绍卡片 ========== */
.detail-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.detail-card {
    display: flex;
    gap: 14px;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid #eef1f6;
}
.detail-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-mid);
}
.detail-card .detail-poster {
    width: 100px;
    height: 140px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e9ecf2;
}
.detail-card .detail-info h4 {
    font-weight: 700;
    color: var(--color-darkest);
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.detail-card .detail-info .d-meta {
    font-size: 0.75rem;
    color: #6b7d95;
    line-height: 1.6;
}

/* ========== 周榜推荐 ========== */
.weekly-rank {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0 4px;
    scroll-snap-type: x mandatory;
    -webkit-over-scrolling: touch;
}
.weekly-rank::-webkit-scrollbar {
    height: 4px;
}
.weekly-rank::-webkit-scrollbar-thumb {
    background: var(--color-light);
    border-radius: 4px;
}
.weekly-rank-item {
    flex: 0 0 auto;
    width: 140px;
    text-align: center;
    scroll-snap-align: start;
    cursor: pointer;
    transition: var(--transition);
}
.weekly-rank-item:hover {
    transform: translateY(-3px);
}
.weekly-rank-item img {
    width: 100px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin: 0 auto 8px;
    box-shadow: var(--shadow-sm);
}
.weekly-rank-item .rank-num {
    font-weight: 700;
    color: #ffd966;
    font-size: 0.8rem;
}
.weekly-rank-item h5 {
    font-size: 0.8rem;
    color: var(--color-darkest);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 评论区域 ========== */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.comment-item {
    background: #f9fafc;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    border: 1px solid #eef1f6;
    transition: var(--transition);
}
.comment-item:hover {
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.comment-item .comment-user {
    font-weight: 700;
    color: var(--color-deep);
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.comment-item .comment-text {
    font-size: 0.85rem;
    color: #4a5c75;
    line-height: 1.75;
}
.comment-item .comment-time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 6px;
}

/* ========== 侧边栏 ========== */
.sidebar .side-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 18px 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #eef1f6;
}
.sidebar .side-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-darkest);
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 3px solid var(--color-mid);
}
.comic-reading {
    text-align: center;
}
.comic-reading .comic-cover {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #e9ecf2;
}
.comic-reading .update-time {
    font-size: 0.75rem;
    color: #999;
    margin-top: 4px;
}
.stats-row {
    display: flex;
    gap: 12px;
    text-align: center;
}
.stats-row .stat-item {
    flex: 1;
    background: #f4f6f9;
    border-radius: 8px;
    padding: 12px 8px;
}
.stats-row .stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-deep);
}
.stats-row .stat-label {
    font-size: 0.7rem;
    color: #888;
    margin-top: 2px;
}

/* ========== APP下载区域 ========== */
.download-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 10px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    transition: var(--transition);
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    text-align: center;
}
.download-btn.android {
    background: #3ddc84;
    color: #000;
}
.download-btn.ios {
    background: #1c1c1e;
    color: #fff;
}
.download-btn.pc {
    background: var(--color-deep);
    color: #fff;
}
.download-btn.mac {
    background: #5856d6;
    color: #fff;
}
.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.08);
}

/* ========== 平台介绍 ========== */
.platform-intro {
    font-size: 0.9rem;
    color: #4a5c75;
    line-height: 1.9;
}
.platform-intro strong {
    color: var(--color-deep);
}

/* ========== 底部导航 ========== */
.bottom-nav {
    width: 100%;
    background: linear-gradient(135deg, #070d59 0%, #1f3c88 100%);
    color: #c8d4f0;
    padding: 28px 20px 20px;
    margin-top: 10px;
}
.bottom-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-between;
    align-items: flex-start;
}
.bottom-nav .footer-col h4 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.95rem;
}
.bottom-nav .footer-col a {
    color: #b0c4e0;
    text-decoration: none;
    font-size: 0.8rem;
    display: block;
    margin: 4px 0;
    transition: var(--transition);
}
.bottom-nav .footer-col a:hover {
    color: #ffd966;
}
.bottom-nav .copyright {
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: #8899bb;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.bottom-nav .mobile-link {
    display: inline-block;
    background: #ffd966;
    color: #070d59;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
    letter-spacing: 0.5px;
}
.bottom-nav .mobile-link:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 217, 102, 0.5);
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
    .movie-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .download-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sidebar {
        width: 280px;
    }
}
@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
        padding: 12px;
    }
    .sidebar {
        width: 100%;
        order: 10;
    }
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .star-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .plot-row,
    .detail-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .download-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: #1f3c88;
        flex-direction: column;
        padding: 12px 0;
        gap: 2px;
        z-index: 999;
        border-radius: 0 0 12px 12px;
        box-shadow: var(--shadow-lg);
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links a {
        padding: 10px 20px;
        border-radius: 0;
        font-size: 0.85rem;
    }
    .nav-toggle {
        display: block;
    }
    .nav-user .login-text {
        font-size: 0.78rem;
    }
    .weekly-rank-item {
        width: 110px;
    }
    .weekly-rank-item img {
        width: 80px;
        height: 110px;
    }
}
@media (max-width: 600px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .star-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .download-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .download-btn {
        font-size: 0.78rem;
        padding: 10px 6px;
    }
    .section-block {
        padding: 14px 10px;
    }
    .section-title {
        font-size: 1.1rem;
    }
    .nav-brand h1 {
        font-size: 1.2rem;
    }
    .detail-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .detail-card .detail-poster {
        width: 80px;
        height: 110px;
    }
    .comment-item .comment-text {
        font-size: 0.8rem;
    }
}
