:root {
    /* 品牌色系 */
    --color-purple: #cabbe9;
    --color-pink: #ffcef3;
    --color-white: #fdfdfd;
    --color-blue: #a1eafb;
    --color-bg: #f5f3f8;

    /* 文字色系 */
    --text-dark: #2c2c2c;
    --text-gray: #555;
    --text-light: #777;
    --text-muted: #aaa;
    --text-brand: #3a2d5c;
    --text-brand-light: #5a4b8a;

    /* 阴影层级 */
    --shadow-sm: 0 1px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 6px 20px rgba(0, 0, 0, 0.12);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-pill: 20px;

    /* 过渡 */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.25s ease;

    /* 尺寸 */
    --nav-height: 60px;
    --footer-nav-height: 50px;
    --max-width: 1400px;
    --sidebar-width: 310px;
}

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background-color: var(--color-bg);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: var(--nav-height);
    padding-bottom: calc(var(--footer-nav-height) + 40px);
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ============================================
    2. 顶部导航
    ============================================ */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--color-white);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: var(--shadow-sm);
    border-bottom: 2px solid var(--color-purple);
}

/* 导航左侧 - 品牌名 */
.top-nav .nav-left h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-brand-light);
    letter-spacing: 1px;
    margin: 0;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition-normal);
}
.top-nav .nav-left h1:hover {
    color: #40356b;
    transform: scale(1.02);
}

/* 导航中间 - 分类链接 */
.top-nav .nav-center {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 0 16px;
}
.top-nav .nav-center a {
    color: var(--text-dark);
    font-size: 0.88rem;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    transition: var(--transition-normal);
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.top-nav .nav-center a:hover,
.top-nav .nav-center a:focus-visible {
    background: var(--color-purple);
    color: var(--text-brand);
    font-weight: 600;
    outline: none;
}

/* 导航右侧 - 用户区 */
.top-nav .nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.nav-right .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #4a3b6e;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-normal);
    flex-shrink: 0;
}
.nav-right .user-avatar:hover {
    background: #b8a5dc;
    transform: scale(1.08);
}
.nav-right .login-text {
    font-size: 0.85rem;
    color: var(--text-dark);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-normal);
}
.nav-right .login-text:hover {
    color: var(--text-brand-light);
    text-decoration: underline;
}
.nav-right .vip-badge {
    background: linear-gradient(135deg, #f9ca24, #f0932b);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
    animation: pulse-badge 2s ease-in-out infinite;
}
@keyframes pulse-badge {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(249, 202, 36, 0.5);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(249, 202, 36, 0);
    }
}

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

/* ============================================
    4. 通用区块样式
    ============================================ */
.section-block {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 22px 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid #eee;
    transition: var(--transition-normal);
}
.section-block:hover {
    box-shadow: var(--shadow-lg);
}
.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--color-purple);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-brand);
    letter-spacing: 0.5px;
}
.section-title .icon-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-pink);
    display: inline-block;
    flex-shrink: 0;
}
.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 14px;
    font-weight: 400;
}

/* ============================================
    5. 热门影视网格 (6列)
    ============================================ */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}
.movie-card {
    background: #fafafa;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition-normal);
    cursor: pointer;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}
.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-purple);
}
.movie-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #e8e4f0;
    flex-shrink: 0;
    transition: opacity 0.3s;
}
.movie-card img[loading="lazy"] {
    opacity: 0;
}
.movie-card img.loaded {
    opacity: 1;
}
.movie-card .card-info {
    padding: 8px 10px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.movie-card .card-info .movie-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #2c2c2c;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.movie-card .card-info .movie-meta {
    font-size: 0.7rem;
    color: #777;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.movie-card .card-info .movie-type-tag {
    display: inline-block;
    background: var(--color-blue);
    color: #1a5c6e;
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 500;
    align-self: flex-start;
    margin-top: 2px;
}
.movie-card .card-info .movie-detail-row {
    font-size: 0.68rem;
    color: #888;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
    6. 明星介绍 (4列)
    ============================================ */
.stars-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.star-card {
    text-align: center;
    background: #fdfdff;
    border-radius: var(--radius-sm);
    padding: 16px 10px;
    border: 1px solid #eee;
    transition: var(--transition-normal);
    cursor: pointer;
}
.star-card:hover {
    border-color: var(--color-pink);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.star-card img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: block;
    border: 3px solid var(--color-purple);
    background: #e8e4f0;
    transition: var(--transition-normal);
}
.star-card:hover img {
    border-color: var(--color-pink);
    transform: scale(1.06);
}
.star-card .star-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-brand);
}
.star-card .star-works {
    font-size: 0.72rem;
    color: #888;
    margin-top: 2px;
}

/* ============================================
    7. 剧情介绍 (2列)
    ============================================ */
.plot-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.plot-card {
    background: linear-gradient(135deg, #fdfdff 0%, #f9f6fc 100%);
    border-radius: var(--radius-sm);
    padding: 16px;
    border-left: 4px solid var(--color-purple);
    transition: var(--transition-normal);
    cursor: pointer;
}
.plot-card:hover {
    border-left-color: var(--color-pink);
    box-shadow: var(--shadow-lg);
    transform: translateX(3px);
}
.plot-card h4 {
    font-size: 0.95rem;
    color: var(--text-brand);
    margin-bottom: 6px;
    font-weight: 700;
}
.plot-card p {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
    8. 电影详细介绍 (2列)
    ============================================ */
.detail-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.detail-card {
    display: flex;
    gap: 12px;
    background: #fdfdff;
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid #eee;
    transition: var(--transition-normal);
    cursor: pointer;
    align-items: flex-start;
}
.detail-card:hover {
    border-color: var(--color-blue);
    box-shadow: var(--shadow-lg);
}
.detail-card img {
    width: 110px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #e8e4f0;
}
.detail-card .detail-info h4 {
    font-weight: 700;
    font-size: 0.9rem;
    color: #2c2c2c;
    margin-bottom: 4px;
}
.detail-card .detail-info .detail-meta {
    font-size: 0.72rem;
    color: #777;
    line-height: 1.5;
}
.detail-card .detail-info .detail-desc {
    font-size: 0.75rem;
    color: #555;
    line-height: 1.5;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
    9. 侧边栏
    ============================================ */
/* 电影总阅读卡片 */
.sidebar .reading-card {
    background: linear-gradient(180deg, var(--color-purple) 0%, #d5c8f0 100%);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    text-align: center;
    color: var(--text-brand);
    border: none;
}
.sidebar .reading-card .reading-number {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #2c1f4a;
    word-break: break-word;
}
.sidebar .reading-card .reading-label {
    font-size: 0.85rem;
    margin-top: 2px;
    font-weight: 500;
}
.sidebar .reading-card .reading-time {
    font-size: 0.7rem;
    color: #5a4b7a;
    margin-top: 6px;
}

/* 数据统计 */
.sidebar .stats-row-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.sidebar .stat-item-sidebar {
    background: linear-gradient(180deg, #fdfdff 0%, #f5f1fb 100%);
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    text-align: center;
    border: 1px solid #e8e4f0;
}
.sidebar .stat-item-sidebar .stat-num {
    font-size: 1.4rem;
    font-weight: 800;
    color: #4a3b6e;
}
.sidebar .stat-item-sidebar .stat-label {
    font-size: 0.72rem;
    color: #888;
    margin-top: 2px;
}

/* 周榜推荐 */
.sidebar .week-rank-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed #e8e4f0;
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 0.85rem;
}
.sidebar .week-rank-list li:hover {
    color: var(--text-brand-light);
    padding-left: 4px;
}
.sidebar .week-rank-list .rank-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    color: #fff;
}
.rank-1 {
    background: #e74c3c;
}
.rank-2 {
    background: #f39c12;
}
.rank-3 {
    background: #e67e22;
}
.rank-other {
    background: #b0a8c9;
}

/* 热门明星标签 */
.sidebar .hot-stars-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sidebar .hot-stars-mini .mini-star-tag {
    background: var(--color-pink);
    color: #5a3a4a;
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-normal);
    font-weight: 500;
}
.sidebar .hot-stars-mini .mini-star-tag:hover {
    background: #fbb8d8;
    transform: scale(1.05);
}

/* 评论列表 */
.sidebar .comments-list-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sidebar .comment-item-sidebar {
    background: #fafafa;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    border: 1px solid #eee;
    transition: var(--transition-normal);
    cursor: pointer;
    font-size: 0.78rem;
}
.sidebar .comment-item-sidebar:hover {
    background: #fdfdff;
    border-color: #d5c8f0;
}
.sidebar .comment-item-sidebar .comment-user {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-brand);
    margin-bottom: 3px;
}
.sidebar .comment-item-sidebar .comment-text {
    color: #555;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sidebar .comment-item-sidebar .comment-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 3px;
    text-align: right;
}

/* ============================================
    10. 平台介绍
    ============================================ */
.platform-intro {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.8;
    text-align: justify;
}
.platform-intro strong {
    color: var(--text-brand);
}

/* ============================================
    11. 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: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    text-align: center;
}
.download-btn.android {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #a5d6a7;
}
.download-btn.android:hover {
    background: #c8e6c9;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.2);
}
.download-btn.ios {
    background: #e3f2fd;
    color: #1565c0;
    border-color: #90caf9;
}
.download-btn.ios:hover {
    background: #bbdefb;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(21, 101, 192, 0.2);
}
.download-btn.pc {
    background: #fff3e0;
    color: #e65100;
    border-color: #ffcc80;
}
.download-btn.pc:hover {
    background: #ffe0b2;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(230, 81, 0, 0.2);
}
.download-btn.mac {
    background: #f3e5f5;
    color: #7b1fa2;
    border-color: #ce93d8;
}
.download-btn.mac:hover {
    background: #e1bee7;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(123, 31, 162, 0.2);
}

/* ============================================
    12. 底部导航
    ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--color-white);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 10px 20px;
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.06);
    border-top: 2px solid var(--color-purple);
    flex-wrap: wrap;
    font-size: 0.8rem;
    min-height: var(--footer-nav-height);
}
.bottom-nav a {
    color: #555;
    transition: var(--transition-normal);
    font-weight: 500;
    white-space: nowrap;
}
.bottom-nav a:hover {
    color: var(--text-brand);
    text-decoration: underline;
}
.bottom-nav .mobile-link {
    background: var(--color-purple);
    color: var(--text-brand);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: var(--transition-normal);
}
.bottom-nav .mobile-link:hover {
    background: #b8a5dc;
    color: #1f1338;
    text-decoration: none;
    transform: scale(1.04);
}
.bottom-nav .copyright {
    color: var(--text-muted);
    font-size: 0.72rem;
}

/* ============================================
    13. 响应式布局
    ============================================ */

/* --- 1300px 以下 --- */
@media (max-width: 1300px) {
    .movie-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .sidebar {
        width: 280px;
    }
    .download-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .detail-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- 1024px 以下 (平板横屏) --- */
@media (max-width: 1024px) {
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .main-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }
    .sidebar .section-block {
        flex: 1;
        min-width: 220px;
    }
    .stars-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .plot-list {
        grid-template-columns: 1fr;
    }
    .detail-list {
        grid-template-columns: 1fr;
    }
    .download-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .top-nav .nav-center {
        gap: 2px;
    }
    .top-nav .nav-center a {
        font-size: 0.72rem;
        padding: 4px 7px;
    }
    .sidebar .stats-row-sidebar {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- 768px 以下 (平板竖屏 / 大屏手机) --- */
@media (max-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .movie-card img {
        height: 140px;
    }
    .movie-card .card-info .movie-name {
        font-size: 0.78rem;
    }
    .movie-card .card-info .movie-meta {
        font-size: 0.65rem;
    }
    .top-nav {
        padding: 0 10px;
        flex-wrap: wrap;
        height: auto;
        min-height: 50px;
        gap: 4px;
    }
    .top-nav .nav-left h1 {
        font-size: 1.1rem;
    }
    .top-nav .nav-center {
        order: 3;
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 4px 0;
        gap: 4px;
    }
    .top-nav .nav-center a {
        font-size: 0.7rem;
        padding: 3px 8px;
        flex-shrink: 0;
    }
    .top-nav .nav-right {
        font-size: 0.75rem;
        gap: 6px;
    }
    .sidebar {
        flex-direction: column;
        width: 100%;
    }
    .sidebar .section-block {
        min-width: auto;
    }
    .stars-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .download-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .download-btn {
        font-size: 0.75rem;
        padding: 10px 6px;
    }
    .detail-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .detail-card img {
        width: 100%;
        height: auto;
        max-height: 200px;
    }
    .bottom-nav {
        gap: 10px;
        font-size: 0.7rem;
        padding: 8px 10px;
    }
}

/* --- 480px 以下 (小屏手机) --- */
@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .movie-card img {
        height: 110px;
    }
    .movie-card .card-info {
        padding: 5px 6px 7px;
    }
    .movie-card .card-info .movie-name {
        font-size: 0.7rem;
    }
    .stars-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .star-card img {
        width: 60px;
        height: 60px;
    }
    .download-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .section-block {
        padding: 14px 10px;
    }
    .section-title {
        font-size: 1rem;
    }
    .sidebar .stats-row-sidebar {
        grid-template-columns: 1fr 1fr;
    }
}
