:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.76);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-hot: #fb923c;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 0%, rgba(245, 158, 11, 0.18), transparent 30%),
        radial-gradient(circle at 90% 8%, rgba(251, 146, 60, 0.15), transparent 32%),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 70%);
    z-index: -1;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(2, 6, 23, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-hot));
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.brand-text {
    font-size: 24px;
    background: linear-gradient(90deg, #fbbf24, #fb923c, #fef3c7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.16);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #f8fafc;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

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

.hero {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.9s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.74) 35%, rgba(2, 6, 23, 0.22) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.48) 42%, rgba(2, 6, 23, 0.15) 100%);
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 80px 0 96px;
}

.hero-copy {
    width: min(720px, 92vw);
}

.eyebrow,
.movie-category,
.detail-pill,
.rank-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(245, 158, 11, 0.86);
    box-shadow: 0 12px 36px rgba(245, 158, 11, 0.22);
}

.eyebrow {
    padding: 7px 14px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 0 0 16px;
    font-size: clamp(42px, 8vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 28px;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 19px);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 18px 46px rgba(245, 158, 11, 0.25);
}

.btn-secondary {
    color: #e2e8f0;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.74);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 50px;
    height: 50px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.66);
    backdrop-filter: blur(14px);
    z-index: 5;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(245, 158, 11, 0.85);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 22px;
    transform: translateY(-50%);
}

.hero-next {
    right: 22px;
    transform: translateY(-50%);
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--accent);
}

.main-section {
    padding: 76px 0;
}

.main-section.alt {
    background: rgba(15, 23, 42, 0.48);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
}

.section-heading p,
.lead {
    max-width: 780px;
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    flex: none;
    color: var(--accent);
    font-weight: 800;
}

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

.feature-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 22px;
}

.feature-stack {
    display: grid;
    gap: 22px;
}

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

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.88));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card-link:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 28px 70px rgba(245, 158, 11, 0.16);
}

.movie-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

.movie-card-large .movie-poster {
    aspect-ratio: 21 / 9;
}

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.08) 58%, rgba(0, 0, 0, 0));
    opacity: 0.86;
    transition: opacity 0.3s ease;
}

.movie-card-link:hover .movie-poster::after {
    opacity: 0.98;
}

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

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

.movie-category {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 34px;
    height: 34px;
    justify-content: center;
    font-weight: 900;
}

.movie-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.92);
    transform: translate(-50%, -50%) scale(0.72);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card-link:hover .movie-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h3 {
    display: -webkit-box;
    min-height: 54px;
    margin: 0 0 10px;
    overflow: hidden;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transition: color 0.2s ease;
}

.movie-card-link:hover h3 {
    color: #fbbf24;
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 50px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta,
.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-meta {
    margin-bottom: 12px;
    color: var(--muted-strong);
    font-size: 13px;
}

.movie-tags span,
.detail-tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.1);
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    min-height: 168px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 82% 18%, rgba(245, 158, 11, 0.28), transparent 34%),
        linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.88));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.45);
}

.category-tile h2,
.category-tile h3 {
    margin: 0 0 10px;
    font-size: 21px;
}

.category-tile p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.category-tile span {
    color: var(--accent);
    font-weight: 900;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.filter-title {
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.filter-controls {
    display: grid;
    grid-template-columns: 1.6fr 0.7fr 0.7fr;
    gap: 14px;
}

.filter-controls label {
    display: grid;
    gap: 7px;
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 700;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    color: #ffffff;
    outline: none;
    background: rgba(2, 6, 23, 0.72);
}

.filter-controls input:focus,
.filter-controls select:focus {
    border-color: rgba(245, 158, 11, 0.72);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.empty-state {
    margin: 18px 0 0;
    color: var(--muted);
}

.page-hero {
    padding: 72px 0 30px;
}

.page-hero h1 {
    max-width: 880px;
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #fbbf24;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 52px 180px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-row:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.4);
}

.ranking-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-hot));
    font-weight: 900;
}

.ranking-cover {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.ranking-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-info h2,
.ranking-info h3 {
    margin: 0 0 6px;
    font-size: 19px;
}

.ranking-info p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ranking-link {
    padding: 10px 15px;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.82);
    font-weight: 800;
}

.detail-hero {
    padding: 46px 0 24px;
}

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

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.player-frame video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.26));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-button-inner {
    display: grid;
    gap: 12px;
    place-items: center;
}

.player-play-icon {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hot));
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.38);
    font-size: 32px;
}

.player-button-inner strong {
    font-size: 20px;
}

.detail-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

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

.detail-summary {
    color: var(--muted-strong);
}

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

.detail-meta div {
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.38);
}

.detail-meta span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.detail-meta strong {
    display: block;
    margin-top: 2px;
    color: #ffffff;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.content-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.66);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-card p {
    margin: 0 0 14px;
    color: var(--muted-strong);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 108px;
    color: var(--muted);
}

.footer-brand {
    color: #fbbf24;
    font-size: 22px;
}

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

    .mobile-menu-button {
        display: inline-block;
    }

    .hero {
        min-height: 70vh;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

    .ranking-row {
        grid-template-columns: 42px 130px 1fr;
    }

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

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

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

    .hero {
        min-height: 76vh;
    }

    .hero-content {
        padding: 56px 0 72px;
    }

    .main-section {
        padding: 54px 0;
    }

    .section-heading {
        display: grid;
    }

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

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

    .ranking-row {
        grid-template-columns: 38px 1fr;
    }

    .ranking-cover {
        grid-column: 1 / -1;
    }

    .ranking-link {
        grid-column: 1 / -1;
    }

    .footer-inner {
        display: grid;
        padding: 28px 0;
    }
}
