:root {
    --brand-amber: #f59e0b;
    --brand-rose: #e11d48;
    --brand-sky: #0284c7;
    --ink: #1f2937;
    --muted: #6b7280;
    --paper: #ffffff;
    --soft: #fff7ed;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(135deg, #fffbeb 0%, #fff1f2 48%, #f0f9ff 100%);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.94), rgba(255, 241, 242, 0.94), rgba(240, 249, 255, 0.94));
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.nav-inner {
    width: min(1200px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, #d97706, #e11d48, #0284c7);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.logo-mark {
    color: var(--brand-amber);
    -webkit-text-fill-color: var(--brand-amber);
    filter: drop-shadow(0 6px 16px rgba(245, 158, 11, 0.35));
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-rose);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    font-size: 28px;
    color: #374151;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.mobile-nav.open {
    display: grid;
    gap: 12px;
}

.page-main {
    padding-top: 64px;
}

.hero {
    position: relative;
    min-height: 640px;
    display: grid;
    align-items: center;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.94), rgba(136, 19, 55, 0.90), rgba(12, 74, 110, 0.90));
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: -2;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    text-align: center;
    padding: 80px 0 72px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    margin-bottom: 22px;
    background: rgba(255, 255, 255, 0.15);
    color: #fde68a;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.hero h1 {
    margin: 0 auto 24px;
    font-size: clamp(42px, 8vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.08em;
    font-weight: 950;
    text-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.hero p {
    margin: 0 auto 30px;
    max-width: 820px;
    color: #ffedd5;
    font-size: clamp(18px, 2.4vw, 26px);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-bottom: 28px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(90deg, #f59e0b, #e11d48);
    box-shadow: 0 22px 46px rgba(225, 29, 72, 0.35);
}

.btn-secondary {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-search {
    display: flex;
    width: min(620px, 100%);
    margin: 0 auto;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    padding: 0 18px;
    font-size: 16px;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.hero-search button {
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(90deg, #0284c7, #e11d48);
    padding: 11px 20px;
    font-weight: 800;
    cursor: pointer;
}

.hero-dots {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 22px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dot.active {
    width: 30px;
    background: #fbbf24;
}

.section {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0;
}

.section-wide {
    padding: 64px 0;
    background: linear-gradient(90deg, rgba(255, 228, 230, 0.75), rgba(254, 243, 199, 0.85));
}

.section-wide > .section {
    padding-top: 0;
    padding-bottom: 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-head h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -0.05em;
    background: linear-gradient(90deg, #d97706, #e11d48, #0284c7);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.section-head p,
.page-title p {
    color: var(--muted);
    line-height: 1.8;
    margin: 10px 0 0;
}

.section-more {
    color: var(--brand-rose);
    font-weight: 800;
    white-space: nowrap;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.movie-grid.compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
    min-width: 0;
}

.movie-card-link {
    display: block;
    height: 100%;
    background: var(--paper);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.movie-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #fde68a, #fecdd3);
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card-link:hover .movie-cover img {
    transform: scale(1.08);
}

.movie-score {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    min-width: 42px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: #f59e0b;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.32);
}

.movie-card-body {
    padding: 16px;
}

.movie-card-body h3 {
    min-height: 46px;
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 850;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-body p {
    min-height: 48px;
    margin: 0 0 14px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
}

.movie-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f8fafc;
}

.rank-panel {
    display: grid;
    gap: 12px;
    padding: 22px;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
}

.rank-item {
    display: grid;
    grid-template-columns: 42px 120px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 18px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: linear-gradient(90deg, #fff7ed, #fff1f2);
    transform: translateX(4px);
}

.rank-index {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    background: #e5e7eb;
    font-weight: 900;
}

.rank-one {
    color: #fff;
    background: #f59e0b;
}

.rank-two {
    color: #fff;
    background: #94a3b8;
}

.rank-three {
    color: #fff;
    background: #ea580c;
}

.rank-item img {
    width: 120px;
    height: 72px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-info {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.rank-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info em {
    color: #64748b;
    font-size: 13px;
    font-style: normal;
}

.rank-score {
    color: #f59e0b;
    font-weight: 900;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px;
}

.category-card {
    min-height: 170px;
    padding: 24px;
    border-radius: 26px;
    color: #fff;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #d97706, #e11d48, #0284c7);
    box-shadow: 0 22px 48px rgba(225, 29, 72, 0.22);
}

.category-card::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: -38px;
    bottom: -44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 950;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

.page-title {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 116px 0 34px;
}

.filter-panel {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 26px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
}

.filter-panel input {
    min-height: 46px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 0 18px;
    outline: 0;
    font-size: 15px;
}

.filter-panel input:focus {
    border-color: #fb7185;
    box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.16);
}

.filter-panel button {
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    color: #fff;
    background: linear-gradient(90deg, #f59e0b, #e11d48);
    font-weight: 850;
    cursor: pointer;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: #e11d48;
    font-weight: 800;
}

.detail-layout {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 92px 0 64px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 32px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
    object-fit: contain;
    cursor: pointer;
}

.player-controls {
    position: absolute;
    inset: auto 0 0 0;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.80), rgba(0, 0, 0, 0));
    pointer-events: none;
}

.player-controls button {
    pointer-events: auto;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.player-controls button:hover {
    background: #f59e0b;
    transform: scale(1.05);
}

.player-title {
    color: #fff;
    font-weight: 850;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.5);
}

.detail-card {
    margin-top: 24px;
    padding: 28px;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.10);
}

.detail-card h1 {
    margin: 0 0 18px;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 950;
    letter-spacing: -0.04em;
    color: #111827;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #475569;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 700;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
}

.tag-list a,
.tag-list span {
    padding: 6px 11px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffedd5, #ffe4e6);
    color: #be123c;
    font-size: 13px;
    font-weight: 800;
}

.detail-card h2 {
    margin: 26px 0 12px;
    font-size: 22px;
    font-weight: 900;
}

.detail-card p {
    color: #4b5563;
    line-height: 1.9;
    font-size: 16px;
}

.side-card {
    padding: 22px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.10);
    position: sticky;
    top: 88px;
}

.side-card h2 {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 950;
}

.related-list {
    display: grid;
    gap: 14px;
}

.related-list a {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 12px;
    padding: 9px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.related-list a:hover {
    background: linear-gradient(90deg, #fff7ed, #fff1f2);
}

.related-list img {
    width: 116px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}

.related-list strong {
    display: block;
    color: #111827;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
}

.related-list span {
    color: #64748b;
    font-size: 12px;
}

.site-footer {
    background: linear-gradient(135deg, #111827, #1e293b, #0f172a);
    color: #d1d5db;
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0 40px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 36px;
}

.footer-logo {
    color: #fff;
    font-size: 22px;
    font-weight: 950;
    margin-bottom: 12px;
}

.footer-brand p {
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer h3 {
    color: #fff;
    margin: 0 0 14px;
    font-size: 16px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.site-footer a {
    color: #cbd5e1;
    font-size: 14px;
}

.site-footer a:hover {
    color: #fbbf24;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    padding: 22px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.empty-state {
    display: none;
    padding: 24px;
    text-align: center;
    color: #64748b;
    background: #fff;
    border-radius: 18px;
}

@media (max-width: 1100px) {
    .movie-grid,
    .movie-grid.compact,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .side-card {
        position: static;
    }
}

@media (max-width: 820px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 580px;
    }

    .hero-content {
        padding-top: 72px;
    }

    .movie-grid,
    .movie-grid.compact,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .rank-item {
        grid-template-columns: 34px 88px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }

    .rank-item img {
        width: 88px;
        height: 58px;
    }
}

@media (max-width: 520px) {
    .site-logo {
        font-size: 20px;
    }

    .hero-actions {
        display: grid;
    }

    .hero-search {
        border-radius: 22px;
        display: grid;
    }

    .hero-search input {
        min-height: 44px;
    }

    .movie-grid,
    .movie-grid.compact,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .detail-card,
    .side-card {
        padding: 20px;
    }

    .related-list a {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .related-list img {
        width: 96px;
        height: 64px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}
