:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-soft: rgba(30, 41, 59, 0.62);
    --line: rgba(148, 163, 184, 0.18);
    --text: #e5e7eb;
    --muted: #94a3b8;
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.18);
    --orange: #f97316;
    --red: #ef4444;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.13), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.97));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
}

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

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

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

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 14px 32px rgba(245, 158, 11, 0.28);
    font-weight: 900;
}

.brand-name {
    display: block;
    font-size: 23px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: transparent;
    background: linear-gradient(90deg, #fde68a, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-subtitle {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link,
.nav-trigger {
    border: 0;
    cursor: pointer;
    color: #cbd5e1;
    background: transparent;
    border-radius: 12px;
    padding: 10px 14px;
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-trigger:hover,
.nav-link.active {
    color: #fbbf24;
    background: rgba(30, 41, 59, 0.9);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 12px);
    width: 218px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.25s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #cbd5e1;
}

.dropdown-panel a:hover {
    color: #fbbf24;
    background: rgba(51, 65, 85, 0.72);
}

.header-search {
    position: relative;
    min-width: 240px;
}

.header-search input,
.search-panel input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    color: var(--text);
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    outline: 0;
    padding: 12px 14px;
    transition: 0.25s ease;
}

.header-search input {
    padding-left: 38px;
}

.header-search input:focus,
.search-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(245, 158, 11, 0.9);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.mobile-toggle {
    display: none;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.9);
}

.mobile-panel {
    display: none;
    padding: 0 0 18px;
}

.mobile-panel.open {
    display: block;
}

.mobile-panel .nav-link {
    display: block;
    width: 100%;
    margin: 6px 0;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 18%, rgba(251, 191, 36, 0.16), transparent 30rem),
        radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.12), transparent 28rem);
    pointer-events: none;
}

.hero-slider {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) contrast(1.08);
    transform: scale(1.02);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.75) 45%, rgba(2, 6, 23, 0.32) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.25), #020617 96%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.7fr);
    align-items: center;
    gap: 48px;
    padding: 62px 0 80px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.36);
    background: rgba(245, 158, 11, 0.14);
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    max-width: 780px;
}

.hero h1 span,
.hero h2 span {
    color: transparent;
    background: linear-gradient(90deg, #fde68a, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-desc {
    max-width: 680px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.8;
    margin: 0 0 28px;
}

.meta-row,
.tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.meta-pill,
.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.16);
    font-size: 13px;
}

.tag-pill.hot,
.meta-pill.hot {
    color: #fff7ed;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-color: transparent;
    font-weight: 800;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 14px;
    min-height: 46px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.25s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 18px 34px rgba(245, 158, 11, 0.24);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(245, 158, 11, 0.32);
}

.btn-ghost {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.68);
    border-color: rgba(148, 163, 184, 0.22);
}

.btn-ghost:hover {
    color: #fbbf24;
    background: rgba(30, 41, 59, 0.88);
}

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transform: perspective(1000px) rotateY(-5deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.1;
    object-fit: cover;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.78));
}

.hero-poster-caption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    color: #fff;
    font-weight: 800;
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.hero-arrow:hover {
    color: #fbbf24;
    background: rgba(30, 41, 59, 0.98);
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.42);
    transition: 0.25s ease;
}

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

.section {
    padding: 62px 0;
}

.section-tight {
    padding: 38px 0 62px;
}

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

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

.section h2,
.page-title h1,
.detail-title {
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-lead,
.page-lead {
    color: var(--muted);
    line-height: 1.8;
    max-width: 760px;
    margin: 12px 0 0;
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    min-width: 0;
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.48);
    box-shadow: 0 26px 54px rgba(0, 0, 0, 0.34);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(15, 23, 42, 0.86));
}

.poster-wrap img {
    width: 100%;
    aspect-ratio: 3 / 4.2;
    object-fit: cover;
    transition: transform 0.55s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.82));
    opacity: 0.6;
    transition: 0.28s ease;
}

.movie-card:hover .poster-shade {
    opacity: 0.9;
}

.play-float {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    transform: translate(-50%, -50%) scale(0.84);
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(245, 158, 11, 0.92);
    opacity: 0;
    transition: 0.28s ease;
}

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

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0 0 10px;
    color: #fff;
    font-size: 18px;
    line-height: 1.32;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-desc {
    min-height: 48px;
    margin: 0 0 14px;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.7;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #cbd5e1;
    font-size: 13px;
}

.category-card {
    display: block;
    padding: 22px;
    min-height: 168px;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.45);
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.16), rgba(15, 23, 42, 0.94));
}

.category-card h3 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 21px;
}

.category-card p {
    margin: 0;
    color: #94a3b8;
    line-height: 1.7;
    font-size: 14px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 96px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: 0.25s ease;
}

.rank-item:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(30, 41, 59, 0.82);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.rank-cover {
    width: 96px;
    height: 128px;
    object-fit: cover;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.9);
}

.rank-info h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 18px;
}

.rank-info p {
    margin: 0 0 10px;
    color: #94a3b8;
    line-height: 1.6;
    font-size: 14px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-hero {
    padding: 56px 0 34px;
    background: radial-gradient(circle at 16% 20%, rgba(245, 158, 11, 0.16), transparent 28rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.86));
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 18px;
}

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

.page-title h1 {
    max-width: 900px;
}

.filter-bar,
.search-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    padding: 18px;
    margin: 0 0 26px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.search-panel {
    grid-template-columns: minmax(240px, 1fr) 180px 180px 120px;
}

.search-panel .btn {
    min-height: 48px;
}

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

.player-card,
.detail-card,
.side-card {
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.68), rgba(15, 23, 42, 0.92));
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.22);
}

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

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    cursor: pointer;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.68));
    transition: 0.25s ease;
}

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

.player-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 18px 44px rgba(245, 158, 11, 0.38);
    transition: 0.25s ease;
}

.player-button:hover {
    transform: scale(1.06);
}

.detail-card {
    padding: 26px;
    margin-top: 22px;
}

.detail-title {
    margin-bottom: 16px;
}

.detail-section {
    margin-top: 24px;
}

.detail-section h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 22px;
}

.detail-section p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.9;
}

.side-card {
    padding: 18px;
}

.side-card h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.side-movie {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.side-movie:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.side-movie img {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.86);
}

.side-movie h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 15px;
    line-height: 1.35;
}

.side-movie p {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.5;
}

.site-footer {
    margin-top: 50px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.98));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
    padding: 42px 0;
}

.footer-title {
    margin: 0 0 10px;
    color: #fff;
    font-size: 20px;
}

.footer-text,
.footer-links a {
    color: #94a3b8;
    line-height: 1.8;
    font-size: 14px;
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    color: #64748b;
    font-size: 13px;
    padding: 18px 0 26px;
}

.empty-state {
    display: none;
    padding: 42px;
    border-radius: 22px;
    text-align: center;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.empty-state.show {
    display: block;
}

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

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

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

    .hero-poster {
        display: none;
    }

    .main-nav,
    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }
}

@media (max-width: 760px) {
    .site-container {
        width: min(100% - 22px, 1200px);
    }

    .brand-name {
        font-size: 19px;
    }

    .brand-subtitle {
        display: none;
    }

    .hero,
    .hero-slider,
    .hero-content {
        min-height: 560px;
    }

    .hero-content {
        padding: 54px 0 80px;
    }

    .hero-actions,
    .card-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .section {
        padding: 44px 0;
    }

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

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

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

    .rank-item {
        grid-template-columns: 44px 82px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-cover {
        width: 82px;
        height: 110px;
    }

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

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

    .card-body {
        padding: 12px;
    }

    .card-title {
        font-size: 15px;
    }

    .card-desc {
        display: none;
    }

    .meta-pill,
    .tag-pill {
        font-size: 12px;
    }
}
