
:root {
    --color-primary: #7e80ff;
    --color-primary-dark: #5f61d6;
    --color-primary-light: #a5a6ff;
    --color-secondary: #ebc6ff;
    --color-bg-light: #fbeeff;
    --color-accent: #c7ffff;
    --color-white: #ffffff;
    --color-text: #2d2d3a;
    --color-text-secondary: #5a5a6e;
    --color-text-light: #7a7a8e;
    --color-border: #e8e0f0;
    --color-card-bg: #ffffff;
    --color-star: #ff9f43;
    --color-rank-gold: #ffb347;
    --color-rank-silver: #a0a8b8;
    --color-rank-bronze: #c8946c;
    --shadow-sm: 0 1px 3px rgba(126, 128, 255, 0.08);
    --shadow-md: 0 4px 16px rgba(126, 128, 255, 0.1);
    --shadow-lg: 0 8px 32px rgba(126, 128, 255, 0.14);
    --shadow-xl: 0 16px 48px rgba(126, 128, 255, 0.18);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    --font-body: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    --max-width: 1400px;
    --nav-height: 64px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: #faf7fc;
    background-image:
        radial-gradient(ellipse at 15% 20%, rgba(235, 198, 255, 0.25) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 60%, rgba(199, 255, 255, 0.2) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 85%, rgba(251, 238, 255, 0.3) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.top-nav {
    width: 100%;
    height: var(--nav-height);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92);
    transition: box-shadow var(--transition-smooth);
}
.top-nav.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--color-text);
}
.nav-brand .logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-primary), #9b7eff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -1px;
    box-shadow: 0 3px 10px rgba(126, 128, 255, 0.35);
    flex-shrink: 0;
}
.nav-brand .brand-text {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--color-text);
}
.nav-brand .brand-text span {
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}
.nav-links li a {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.nav-links li a:hover,
.nav-links li a.active {
    background: var(--color-bg-light);
    color: var(--color-primary);
}
.nav-links li a.active {
    font-weight: 600;
    background: rgba(126, 128, 255, 0.08);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.nav-user .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.nav-user .user-avatar:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(126, 128, 255, 0.12);
}
.nav-user .login-btn {
    padding: 8px 20px;
    border-radius: 22px;
    border: 2px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    white-space: nowrap;
    font-family: var(--font-body);
}
.nav-user .login-btn:hover {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(126, 128, 255, 0.35);
}
.nav-user .user-status {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    white-space: nowrap;
}
.nav-user .vip-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #5c3d00;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}
.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    border-radius: 3px;
    background: var(--color-text);
    transition: all var(--transition-fast);
}

.main-container {
    flex: 1;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.hero-section {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 40%, #1a1a2e 100%);
    min-height: 340px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    transition: transform var(--transition-smooth);
}
.hero-section:hover {
    transform: translateY(-2px);
}
.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    filter: blur(1px);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(26, 26, 46, 0.3) 0%,
            rgba(26, 26, 46, 0.75) 60%,
            rgba(26, 26, 46, 0.95) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 40px 48px;
    display: flex;
    gap: 32px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.hero-poster {
    width: 160px;
    height: 220px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: transform var(--transition-smooth);
}
.hero-section:hover .hero-poster {
    transform: scale(1.03);
}
.hero-info {
    color: #fff;
    flex: 1;
    min-width: 200px;
}
.hero-info .hero-tag {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 14px;
    background: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.hero-info h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 1px;
}
.hero-info .hero-meta {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 12px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.hero-info .hero-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    max-width: 500px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-play-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 10px 28px;
    border-radius: 24px;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all var(--transition-fast);
    box-shadow: 0 6px 20px rgba(126, 128, 255, 0.4);
}
.hero-play-btn:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 8px 28px rgba(126, 128, 255, 0.55);
    transform: translateY(-1px);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}
.section-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    border-radius: 3px;
    background: var(--color-primary);
    flex-shrink: 0;
}
.section-more {
    font-size: 0.9rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    padding: 6px 14px;
    border-radius: 16px;
}
.section-more:hover {
    background: rgba(126, 128, 255, 0.07);
    color: var(--color-primary-dark);
}

.weekly-rank-section {
    background: var(--color-card-bg);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}
.weekly-rank-section::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(235, 198, 255, 0.2);
    pointer-events: none;
    z-index: 0;
}
.weekly-rank-section .section-header {
    position: relative;
    z-index: 1;
}
.rank-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 14px;
    position: relative;
    z-index: 1;
}
.rank-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--color-bg-light);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: inherit;
    position: relative;
    border: 1px solid transparent;
}
.rank-card:hover {
    background: #fff;
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.rank-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    color: #fff;
    background: var(--color-text-light);
}
.rank-card:nth-child(1) .rank-number {
    background: linear-gradient(135deg, #ff6b6b, #e74c3c);
    font-size: 1.2rem;
    box-shadow: 0 4px 14px rgba(231, 76, 60, 0.4);
}
.rank-card:nth-child(2) .rank-number {
    background: linear-gradient(135deg, #ff9f43, #e67e22);
    font-size: 1.1rem;
    box-shadow: 0 4px 14px rgba(230, 126, 34, 0.35);
}
.rank-card:nth-child(3) .rank-number {
    background: linear-gradient(135deg, #feca57, #f0a500);
    font-size: 1.05rem;
    box-shadow: 0 4px 14px rgba(240, 165, 0, 0.3);
}
.rank-card .rank-poster {
    width: 48px;
    height: 64px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.rank-card .rank-info {
    min-width: 0;
}
.rank-card .rank-title {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-card .rank-score {
    font-size: 0.78rem;
    color: var(--color-star);
    font-weight: 600;
}

.content-layout {
    display: flex;
    gap: 28px;
}
.content-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.content-sidebar {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hot-movies-section {
    background: var(--color-card-bg);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}
.movie-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.movie-card {
    cursor: pointer;
    transition: all var(--transition-smooth);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg-light);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    position: relative;
}
.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-secondary);
    z-index: 5;
}
.movie-card .poster-wrap {
    position: relative;
    width: 100%;
    padding-top: 140%;
    overflow: hidden;
    background: #e8e0f0;
}
.movie-card .poster-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}
.movie-card:hover .poster-wrap img {
    transform: scale(1.08);
}
.movie-card .movie-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
    background: var(--color-primary);
    color: #fff;
}
.movie-card .movie-tag.tv {
    background: #e67e22;
}
.movie-card .movie-tag.anime {
    background: #9b59b6;
}
.movie-card .movie-score {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    background: rgba(0, 0, 0, 0.7);
    color: #ffd700;
    letter-spacing: 0.5px;
}
.movie-card .card-info {
    padding: 10px 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.movie-card .card-title {
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.movie-card .card-meta {
    font-size: 0.75rem;
    color: var(--color-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-stars {
    background: var(--color-card-bg);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    position: sticky;
    top: calc(var(--nav-height) + 20px);
}
.star-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.star-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: inherit;
    background: var(--color-bg-light);
    border: 1px solid transparent;
}
.star-card:hover {
    background: #fff;
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-md);
    transform: translateX(3px);
}
.star-card .star-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--color-secondary);
    transition: all var(--transition-fast);
}
.star-card:hover .star-avatar {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 5px rgba(126, 128, 255, 0.1);
}
.star-card .star-info {
    min-width: 0;
}
.star-card .star-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.star-card .star-works {
    font-size: 0.78rem;
    color: var(--color-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.star-card .star-fans {
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 500;
}

.plot-section {
    background: var(--color-card-bg);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}
.plot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.plot-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--color-bg-light);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
}
.plot-card:hover {
    background: #fff;
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.plot-card .plot-img {
    width: 100px;
    height: 68px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}
.plot-card .plot-info {
    min-width: 0;
}
.plot-card .plot-title {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.plot-card .plot-excerpt {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.detail-section {
    background: var(--color-card-bg);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.detail-card {
    display: flex;
    gap: 16px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--color-bg-light);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
}
.detail-card:hover {
    background: #fff;
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.detail-card .detail-poster {
    width: 90px;
    height: 126px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.detail-card .detail-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.detail-card .detail-title {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.detail-card .detail-meta-row {
    font-size: 0.78rem;
    color: var(--color-text-light);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.detail-card .detail-desc {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.detail-card .detail-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-star);
}
.detail-card .detail-rating .stars-bar {
    display: flex;
    gap: 1px;
}
.detail-card .detail-rating .star-filled {
    width: 12px;
    height: 12px;
    background: var(--color-star);
    border-radius: 2px;
}
.detail-card .detail-rating .star-empty {
    width: 12px;
    height: 12px;
    background: #ddd;
    border-radius: 2px;
}

.comments-section {
    background: var(--color-card-bg);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.comment-item {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: var(--color-bg-light);
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}
.comment-item:hover {
    background: #fff;
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-sm);
}
.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--color-secondary);
}
.comment-body {
    min-width: 0;
    flex: 1;
}
.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.comment-user {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}
.comment-time {
    font-size: 0.75rem;
    color: var(--color-text-light);
}
.comment-rating {
    font-size: 0.75rem;
    color: var(--color-star);
    font-weight: 600;
}
.comment-text {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.comment-movie {
    font-size: 0.78rem;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 3px;
}
.comment-actions {
    display: flex;
    gap: 16px;
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--color-text-light);
}
.comment-actions span {
    cursor: pointer;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 3px;
}
.comment-actions span:hover {
    color: var(--color-primary);
}

.bottom-nav {
    width: 100%;
    background: #1a1a2e;
    color: #ccc;
    padding: 40px 32px 28px;
    margin-top: auto;
    border-top: 3px solid var(--color-primary);
}
.bottom-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 28px;
}
.bottom-nav-col h4 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 1rem;
    letter-spacing: 0.5px;
}
.bottom-nav-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bottom-nav-col ul li a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}
.bottom-nav-col ul li a:hover {
    color: var(--color-accent);
}
.bottom-copyright {
    text-align: center;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: #888;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1400px) {
    .movie-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
@media (max-width: 1200px) {
    .content-layout {
        flex-direction: column;
    }
    .content-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
    .content-sidebar>* {
        flex: 1;
        min-width: 280px;
    }
    .sidebar-stars {
        position: static;
    }
    .star-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    .star-card {
        flex: 1;
        min-width: 180px;
    }
    .movie-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .rank-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
@media (max-width: 900px) {
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .nav-links {
        display: none;
    }
    .mobile-menu-toggle {
        display: flex;
    }
    .hero-content {
        padding: 28px 20px;
        gap: 18px;
    }
    .hero-poster {
        width: 110px;
        height: 155px;
    }
    .hero-info h2 {
        font-size: 1.4rem;
    }
    .top-nav {
        padding: 0 16px;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .plot-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 600px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .rank-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .hero-info .hero-meta {
        justify-content: center;
    }
    .hero-info .hero-desc {
        max-width: 100%;
    }
    .plot-grid {
        grid-template-columns: 1fr;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-user .user-status {
        display: none;
    }
    .bottom-nav-inner {
        grid-template-columns: repeat(2, 1fr);
    }
    .hot-movies-section,
    .plot-section,
    .detail-section,
    .comments-section,
    .weekly-rank-section {
        padding: 16px 12px;
    }
}
@media (max-width: 380px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .movie-card .card-title {
        font-size: 0.75rem;
    }
    .movie-card .card-meta {
        font-size: 0.7rem;
    }
    .rank-list {
        grid-template-columns: 1fr 1fr;
    }
}

.nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #fff;
    padding: 16px;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    border-bottom: 2px solid var(--color-border);
}
.nav-links.mobile-open li a {
    display: block;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    text-align: center;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d0c8e0;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b8aed0;
}

img[loading="lazy"] {
    transition: opacity 0.4s ease;
}
img[loading="lazy"].loaded {
    opacity: 1;
}
img[loading="lazy"]:not(.loaded) {
    opacity: 0;
    background: #e8e0f0;
}

.tag-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.tag-hot {
    background: #ffe0e0;
    color: #c0392b;
}
.tag-new {
    background: #e0f0ff;
    color: #2471a3;
}
.tag-trending {
    background: #fff3e0;
    color: #e67e22;
}
