:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --bg-card-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(245, 158, 11, 0.36);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.14);
    --rose: #f43f5e;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.16), transparent 30%),
        radial-gradient(circle at 82% 6%, rgba(244, 63, 94, 0.16), transparent 34%),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(18px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber), var(--rose));
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.28);
    font-weight: 900;
    color: #ffffff;
}

.logo strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.logo em {
    display: block;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.site-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted-2);
    font-weight: 700;
    font-size: 14px;
    transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.18);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.7);
}

main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: 650px;
    margin: 28px 0 44px;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 34px;
    background: #020617;
    box-shadow: var(--shadow);
}

.hero-slider {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    transition: opacity 0.7s ease, visibility 0.7s ease, transform 1.2s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.25)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 48%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 650px;
    padding: 78px 7% 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: end;
    gap: 40px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 13px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    font-size: 13px;
    font-weight: 800;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero h1 span,
.gradient-text {
    background: linear-gradient(135deg, #fbbf24, #fb7185, #f8fafc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    max-width: 700px;
    margin: 22px 0 26px;
    color: #dbeafe;
    font-size: 18px;
}

.hero-meta,
.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
}

.hero-meta li,
.meta-list li,
.tag {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--muted-2);
    background: rgba(15, 23, 42, 0.72);
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.74);
    font-weight: 800;
    transition: 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(30, 41, 59, 0.92);
}

.btn-primary {
    border: 0;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb7185);
    box-shadow: 0 18px 38px rgba(245, 158, 11, 0.25);
}

.btn-primary:hover {
    color: #111827;
    background: linear-gradient(135deg, #f59e0b, #f43f5e);
}

.hero-panel {
    align-self: center;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
}

.hero-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 3 / 4;
    background: #111827;
}

.hero-thumb img,
.poster-link img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-thumb-badge {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 7px 11px;
    border-radius: 999px;
    color: #111827;
    background: #fbbf24;
    font-size: 13px;
    font-weight: 900;
}

.hero-dots {
    position: absolute;
    left: 7%;
    bottom: 26px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

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

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

.section {
    margin: 44px 0;
}

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

.section-kicker {
    margin: 0 0 8px;
    color: #fbbf24;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section h2,
.page-title h1,
.detail-info h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-intro,
.page-title p,
.detail-info p {
    max-width: 780px;
    margin: 12px 0 0;
    color: var(--muted-2);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.22);
    transition: 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.36);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    transition: transform 0.35s ease;
}

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

.card-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #111827;
    background: #fbbf24;
    font-size: 12px;
    font-weight: 900;
}

.card-play {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.28;
}

.card-body h3 a:hover {
    color: #fbbf24;
}

.card-line {
    margin: 0 0 11px;
    color: var(--muted);
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: #cbd5e1;
    font-size: 12px;
}

.card-meta span {
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.1);
}

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

.category-card {
    min-height: 180px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 32%),
        rgba(15, 23, 42, 0.78);
    transition: 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.35);
}

.category-card strong {
    display: block;
    margin-bottom: 9px;
    color: #ffffff;
    font-size: 22px;
}

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

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-number {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb7185);
    font-weight: 950;
}

.rank-info strong {
    display: block;
    overflow: hidden;
    color: #ffffff;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-info span,
.rank-score {
    color: var(--muted);
    font-size: 13px;
}

.search-panel,
.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.7);
}

.search-panel input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    outline: none;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.62);
    padding: 0 18px;
}

.filter-panel {
    grid-template-columns: minmax(0, 1.4fr) minmax(160px, 0.4fr) minmax(160px, 0.4fr);
    margin-bottom: 22px;
}

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

.breadcrumb a:hover {
    color: #fbbf24;
}

.page-title {
    margin: 34px 0 26px;
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 30px;
    background:
        radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.14), transparent 34%),
        rgba(15, 23, 42, 0.72);
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 34px;
    align-items: stretch;
    margin-bottom: 36px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    background: #111827;
    box-shadow: var(--shadow);
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(244, 63, 94, 0.16), transparent 34%),
        rgba(15, 23, 42, 0.76);
}

.player-section,
.story-panel {
    padding: 26px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.22);
}

.player-section h2,
.story-panel h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #000000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.78));
    cursor: pointer;
    transition: 0.22s ease;
}

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

.player-play-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb7185);
    font-size: 30px;
    box-shadow: 0 22px 60px rgba(245, 158, 11, 0.28);
}

.story-panel {
    margin-top: 24px;
}

.story-panel p {
    color: var(--muted-2);
    font-size: 16px;
}

.site-footer {
    width: min(1280px, calc(100% - 32px));
    margin: 58px auto 0;
    padding: 36px 0 44px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    color: var(--muted);
}

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

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

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

.hide {
    display: none !important;
}

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

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

    .hero-content {
        grid-template-columns: 1fr 280px;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: grid;
        place-items: center;
    }

    .site-nav {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px 16px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.14);
        background: rgba(2, 6, 23, 0.96);
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a {
        border-radius: 14px;
    }

    .hero {
        min-height: 760px;
        border-radius: 26px;
    }

    .hero-content {
        min-height: 760px;
        grid-template-columns: 1fr;
        padding: 52px 24px 72px;
    }

    .hero-panel {
        max-width: 300px;
    }

    .hero-dots {
        left: 24px;
    }

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

    .rank-list {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        max-width: 340px;
    }

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

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

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

    .logo strong {
        font-size: 17px;
    }

    .logo em {
        display: none;
    }

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

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

    .page-title,
    .detail-info,
    .player-section,
    .story-panel {
        padding: 20px;
        border-radius: 22px;
    }
}
