:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-850: #142033;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --white: #ffffff;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --orange-500: #f97316;
    --radius-xl: 22px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.14);
    --shadow-card: 0 14px 32px rgba(15, 23, 42, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #111827;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
    box-shadow: 0 10px 25px rgba(2, 6, 23, 0.22);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1180px, calc(100% - 32px));
    height: 66px;
    margin: 0 auto;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    border-radius: 999px;
    box-shadow: 0 0 28px rgba(245, 158, 11, 0.4);
}

.brand-text,
.footer-brand {
    font-size: 20px;
    background: linear-gradient(90deg, var(--amber-400), var(--orange-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    white-space: nowrap;
}

.nav-link {
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--amber-400);
}

.top-search {
    display: flex;
    align-items: center;
    min-width: 270px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.top-search input {
    width: 100%;
    min-width: 0;
    color: var(--white);
    background: transparent;
    border: 0;
    outline: 0;
    padding: 10px 14px;
}

.top-search input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.top-search button {
    color: var(--white);
    background: var(--amber-500);
    border: 0;
    padding: 10px 16px;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    width: 26px;
    height: 2px;
    background: var(--white);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-link {
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #000000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
}

.hero-slide::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.35), transparent 24%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 45%, rgba(0, 0, 0, 0.15) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    padding: 0 0 64px;
    color: var(--white);
}

.hero-content h1 {
    max-width: 820px;
    margin: 16px 0;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.card-actions,
.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
    font-weight: 800;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(90deg, var(--amber-500), var(--orange-500));
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
}

.btn-secondary {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.btn:hover {
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 5;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

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

.hero-dot.is-active {
    width: 30px;
    background: var(--amber-400);
}

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

.main-space {
    padding: 54px 0 72px;
}

.section {
    margin-top: 54px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

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

.eyebrow {
    margin: 0;
    color: var(--amber-500);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-link {
    color: var(--amber-500);
    font-weight: 850;
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.15;
    overflow: hidden;
    background: var(--slate-800);
}

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

.movie-card:hover .poster-wrap img {
    transform: scale(1.07);
}

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent);
}

.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 30px;
    color: var(--white);
    font-size: 13px;
    font-weight: 900;
    border-radius: 999px;
}

.score-badge {
    right: 12px;
    bottom: 12px;
    background: rgba(245, 158, 11, 0.96);
}

.rank-badge {
    left: 12px;
    top: 12px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(8px);
}

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

.movie-title {
    display: -webkit-box;
    min-height: 52px;
    overflow: hidden;
    color: var(--slate-900);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: var(--amber-500);
}

.movie-meta {
    margin: 8px 0;
    color: var(--slate-500);
    font-size: 13px;
}

.movie-line {
    display: -webkit-box;
    min-height: 45px;
    margin: 0 0 12px;
    overflow: hidden;
    color: #475569;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 760;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 24px;
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.category-card::before {
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 140px;
    height: 140px;
    content: "";
    background: radial-gradient(circle, rgba(245, 158, 11, 0.55), transparent 68%);
}

.category-card h3 {
    position: relative;
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    position: relative;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.76);
}

.category-card span {
    position: relative;
    color: var(--amber-400);
    font-weight: 850;
}

.page-hero {
    color: var(--white);
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.28), transparent 30%),
        linear-gradient(135deg, var(--slate-950), var(--slate-800));
    padding: 72px 0;
}

.page-hero h1 {
    max-width: 880px;
    margin: 8px 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.filter-panel {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 26px;
    padding: 20px;
    background: var(--white);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--slate-700);
    font-size: 13px;
    font-weight: 800;
}

.filter-search {
    flex: 1;
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    color: var(--slate-900);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    outline: none;
    padding: 0 14px;
}

.filter-selects {
    display: flex;
    gap: 14px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0;
    color: var(--slate-500);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--amber-500);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
    gap: 28px;
    align-items: start;
}

.player-card,
.detail-panel,
.content-panel {
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    color: var(--white);
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.16), transparent 36%),
        rgba(0, 0, 0, 0.32);
    border: 0;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.play-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    padding-left: 6px;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    border-radius: 999px;
    box-shadow: 0 18px 55px rgba(245, 158, 11, 0.45);
    font-size: 34px;
}

.detail-panel {
    padding: 24px;
}

.detail-panel h1 {
    margin: 0 0 14px;
    color: var(--slate-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.meta-item {
    padding: 12px;
    background: #f8fafc;
    border-radius: 14px;
}

.meta-item b {
    display: block;
    color: var(--slate-500);
    font-size: 12px;
}

.meta-item span {
    color: var(--slate-900);
    font-weight: 850;
}

.content-panel {
    margin-top: 28px;
    padding: 28px;
}

.content-panel h2 {
    margin: 0 0 14px;
    color: var(--slate-900);
    font-size: 26px;
}

.content-panel p {
    margin: 0 0 18px;
    color: #334155;
    font-size: 17px;
    text-align: justify;
    text-indent: 2em;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 56px 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: var(--white);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.rank-no {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    border-radius: 14px;
    font-weight: 900;
}

.rank-row img {
    width: 72px;
    height: 98px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-row h3 {
    margin: 0 0 6px;
    color: var(--slate-900);
    font-size: 18px;
}

.rank-row p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--slate-500);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-views {
    color: var(--amber-500);
    font-weight: 900;
}

.site-footer {
    color: rgba(255, 255, 255, 0.78);
    background: var(--slate-950);
    margin-top: 70px;
    padding: 34px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.footer-inner p {
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 18px;
}

.footer-links a:hover {
    color: var(--amber-400);
}

@media (max-width: 1080px) {
    .desktop-nav,
    .top-search {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

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

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

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

@media (max-width: 760px) {
    .hero-slider {
        height: 76vh;
        min-height: 560px;
    }

    .hero-control {
        display: none;
    }

    .hero-content {
        padding-bottom: 56px;
    }

    .section-heading,
    .filter-panel,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-selects {
        flex-direction: column;
    }

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

    .rank-row {
        grid-template-columns: 42px 58px minmax(0, 1fr);
    }

    .rank-views {
        display: none;
    }
}

@media (max-width: 520px) {
    .nav-shell {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-content h1 {
        font-size: 34px;
    }

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

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

    .content-panel {
        padding: 22px;
    }
}
