:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --amber: #f59e0b;
    --orange: #ea580c;
    --blue: #2563eb;
    --radius: 18px;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--slate-800);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.98));
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.22);
    backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.35);
}

.brand-text strong {
    display: block;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text em {
    display: block;
    margin-top: 2px;
    color: #94a3b8;
    font-size: 12px;
    font-style: normal;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.mobile-link {
    padding: 10px 16px;
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
    color: #fff;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

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

.hero-carousel {
    position: relative;
    min-height: 620px;
    color: #fff;
    overflow: hidden;
    background: var(--slate-950);
}

.hero-track,
.hero-slide {
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.45fr);
    align-items: center;
    gap: 36px;
    padding: 86px max(32px, calc((100vw - 1180px) / 2)) 76px;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.75s ease, transform 1.2s ease;
    pointer-events: none;
}

.hero-slide.active {
    position: relative;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-copy {
    max-width: 760px;
}

.hero-kicker,
.section-heading span,
.intro-panel span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 14px;
    color: #fff;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 690px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 18px;
}

.hero-tags,
.tag-list,
.detail-tags,
.quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-list span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 12px;
}

.hero-actions,
.center-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 13px;
    padding: 0 20px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    box-shadow: 0 12px 26px rgba(234, 88, 12, 0.3);
}

.ghost-btn {
    color: #fff;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.ghost-btn.dark {
    color: var(--slate-800);
    background: #fff;
    border-color: var(--slate-200);
}

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.hero-poster,
.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    aspect-ratio: 2 / 3;
}

.hero-poster img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.hero-poster:hover img,
.detail-poster:hover img,
.movie-card:hover img,
.rank-card:hover img {
    transform: scale(1.08);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 3;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

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

.hero-dot.active {
    background: linear-gradient(90deg, var(--amber), var(--orange));
}

.intro-panel {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: -50px;
    padding: 30px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
}

.intro-panel h2 {
    margin: 12px 0 8px;
    font-size: clamp(24px, 4vw, 38px);
    line-height: 1.16;
}

.intro-panel p {
    max-width: 760px;
    margin: 0;
    color: var(--slate-600);
}

.section-block {
    padding: 58px 0;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading h2 {
    margin: 12px 0 8px;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.18;
    color: var(--slate-900);
}

.section-heading p {
    max-width: 760px;
    margin: 0;
    color: var(--slate-600);
}

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

.category-tile,
.category-card {
    display: block;
    min-height: 138px;
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(145deg, #fff, #f1f5f9);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--amber);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.category-tile span,
.category-card-head span {
    display: block;
    margin-bottom: 8px;
    color: var(--slate-900);
    font-size: 18px;
    font-weight: 900;
}

.category-tile p,
.category-card p {
    margin: 0;
    color: var(--slate-600);
    font-size: 14px;
}

.category-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-card {
    min-height: 220px;
}

.category-card-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.category-card-head strong {
    color: var(--amber);
}

.category-samples {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.category-samples a {
    color: var(--slate-700);
    font-size: 14px;
}

.category-samples a:hover {
    color: var(--orange);
}

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

.small-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, var(--slate-200), #cbd5e1);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.score,
.play-chip {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.score {
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    background: rgba(245, 158, 11, 0.95);
}

.play-chip {
    left: 10px;
    bottom: 10px;
    padding: 5px 10px;
    background: rgba(15, 23, 42, 0.76);
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 6px 0 8px;
    color: var(--slate-900);
    font-size: 18px;
    line-height: 1.28;
}

.movie-info h3 a:hover,
.rank-info h3 a:hover {
    color: var(--orange);
}

.movie-info p,
.rank-info p {
    margin: 0;
    color: var(--slate-600);
    font-size: 14px;
}

.movie-info .movie-meta,
.movie-meta {
    color: var(--slate-500);
    font-size: 12px;
    font-weight: 700;
}

.compact .movie-info {
    padding: 13px;
}

.compact .movie-info h3 {
    font-size: 15px;
}

.compact .movie-info p:not(.movie-meta),
.compact .tag-list {
    display: none;
}

.tag-list {
    margin-top: 12px;
}

.tag-list span {
    color: var(--slate-700);
    background: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.28);
}

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

.rank-card {
    display: grid;
    grid-template-columns: 64px 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 900;
}

.rank-thumb {
    overflow: hidden;
    width: 92px;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    background: var(--slate-200);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.rank-info h3 {
    margin: 0 0 4px;
    font-size: 17px;
    color: var(--slate-900);
}

.heat {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--orange);
    background: #fff7ed;
    font-size: 12px;
    font-weight: 900;
}

.page-hero,
.detail-hero {
    color: #fff;
    background-position: center;
    background-size: cover;
    background-color: var(--slate-950);
}

.page-hero {
    padding: 88px 0;
}

.compact-hero {
    background-image: radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.32), transparent 32%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero p,
.breadcrumb {
    margin: 0 0 12px;
    color: #fbbf24;
    font-weight: 800;
}

.page-hero h1,
.detail-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.06;
}

.page-hero span,
.detail-copy p:not(.breadcrumb) {
    display: block;
    max-width: 800px;
    color: #e2e8f0;
    font-size: 18px;
}

.filter-panel {
    margin-bottom: 26px;
    padding: 22px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.search-label {
    display: block;
    margin-bottom: 10px;
    color: var(--slate-900);
    font-weight: 900;
}

.search-input {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid var(--slate-200);
    border-radius: 15px;
    outline: none;
    background: #f8fafc;
    color: var(--slate-800);
}

.search-input:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.quick-filters {
    margin-top: 14px;
}

.quick-filters button {
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    color: var(--slate-700);
    background: #f1f5f9;
    cursor: pointer;
}

.quick-filters button:hover {
    color: #fff;
    background: linear-gradient(90deg, var(--amber), var(--orange));
}

.detail-hero {
    padding: 72px 0;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: center;
    gap: 42px;
}

.detail-poster span {
    position: absolute;
    left: 16px;
    bottom: 16px;
    border-radius: 999px;
    padding: 8px 13px;
    color: #fff;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    font-weight: 900;
}

.detail-copy h1 {
    font-size: clamp(36px, 6vw, 70px);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    padding: 44px 0 0;
}

.detail-main,
.detail-side {
    display: grid;
    align-content: start;
    gap: 22px;
}

.player-section,
.detail-panel,
.side-card {
    padding: 24px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.player-section h2,
.detail-panel h2,
.side-card h2 {
    margin: 0 0 16px;
    color: var(--slate-900);
    font-size: 24px;
}

.watch-player {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.watch-player video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.82));
    cursor: pointer;
}

.watch-player.playing .player-cover {
    display: none;
}

.player-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 38px rgba(245, 158, 11, 0.32);
    font-size: 28px;
}

.player-cover strong {
    font-size: 18px;
}

.detail-panel p {
    margin: 0 0 14px;
    color: var(--slate-700);
    font-size: 16px;
}

.detail-panel p:last-child {
    margin-bottom: 0;
}

.info-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--slate-200);
}

.info-list span {
    color: var(--slate-500);
}

.info-list strong {
    color: var(--slate-900);
    text-align: right;
}

.detail-tags {
    margin-top: 18px;
}

.detail-tags a {
    color: var(--slate-700);
    background: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.32);
}

.detail-tags a:hover {
    color: #fff;
    background: linear-gradient(90deg, var(--amber), var(--orange));
}

.site-footer {
    margin-top: 58px;
    padding: 44px 0 20px;
    color: #cbd5e1;
    background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    color: #fbbf24;
    font-size: 24px;
    font-weight: 900;
}

.site-footer p {
    max-width: 500px;
    margin: 12px 0 0;
    color: #94a3b8;
}

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

.footer-links {
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

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

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

    .small-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .menu-toggle {
        display: block;
    }

    .brand-text strong {
        font-size: 18px;
    }

    .hero-carousel,
    .hero-track,
    .hero-slide {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 56px 18px 78px;
    }

    .hero-poster {
        width: min(240px, 72vw);
        justify-self: center;
    }

    .intro-panel {
        align-items: flex-start;
        flex-direction: column;
        margin-top: -28px;
        padding: 22px;
    }

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

    .rank-card {
        grid-template-columns: 44px 74px minmax(0, 1fr);
    }

    .rank-number {
        width: 42px;
        height: 42px;
        border-radius: 13px;
        font-size: 13px;
    }

    .rank-thumb {
        width: 74px;
    }

    .heat {
        grid-column: 2 / -1;
        justify-self: start;
    }

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

    .detail-poster {
        width: min(260px, 74vw);
    }

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

@media (max-width: 520px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

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

    .movie-card.compact {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .movie-card.compact .poster-wrap {
        height: 100%;
    }

    .player-section,
    .detail-panel,
    .side-card {
        padding: 18px;
        border-radius: 20px;
    }
}
