:root {
    --page-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.74);
    --panel-bg-strong: rgba(15, 23, 42, 0.92);
    --card-bg: rgba(30, 41, 59, 0.64);
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(245, 158, 11, 0.34);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.16);
    --orange: #f97316;
    --green: #22c55e;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 5%, rgba(245, 158, 11, 0.18), transparent 32rem),
        radial-gradient(circle at 82% 18%, rgba(249, 115, 22, 0.12), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

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

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

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.logo-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.nav a {
    padding: 8px 0;
    transition: color 0.2s ease;
}

.nav a:hover,
.nav a.active {
    color: var(--amber);
}

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

.hero {
    position: relative;
    overflow: hidden;
    min-height: 650px;
    padding: 56px 0 42px;
    border-bottom: 1px solid var(--border);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.30) 100%),
        radial-gradient(circle at 72% 28%, rgba(245, 158, 11, 0.24), transparent 24rem);
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.42;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    transition: background-image 0.5s ease;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.75fr);
    align-items: center;
    gap: 44px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 18px;
    padding: 7px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: #fcd34d;
    background: var(--amber-soft);
    font-size: 13px;
    font-weight: 800;
}

.hero-title {
    margin: 0;
    max-width: 850px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.96;
    letter-spacing: -0.07em;
}

.gradient-text {
    color: transparent;
    background: linear-gradient(135deg, #fff7ed, #fbbf24 42%, #fb923c 86%);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-desc {
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 850;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.button-primary {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 16px 42px rgba(249, 115, 22, 0.28);
}

.button-ghost {
    color: var(--text);
    border-color: var(--border);
    background: rgba(15, 23, 42, 0.72);
}

.hero-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    max-width: 620px;
    margin-top: 26px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.search-input {
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    padding: 0 16px;
    font-size: 15px;
}

.search-input::placeholder {
    color: var(--subtle);
}

.hero-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(2, 6, 23, 0.88));
    box-shadow: var(--shadow);
}

.hero-poster {
    aspect-ratio: 16 / 10;
    width: 100%;
    object-fit: cover;
}

.hero-panel-content {
    padding: 20px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--subtle);
    font-size: 13px;
}

.rating {
    color: #fcd34d;
    font-weight: 900;
}

.hero-movie-title {
    margin: 10px 0 8px;
    font-size: 26px;
    line-height: 1.18;
}

.hero-movie-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 50px;
    color: var(--muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.hero-dots {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.hero-dot {
    width: 28px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.38);
}

.hero-dot.active {
    background: var(--amber);
}

.section {
    padding: 58px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(25px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-subtitle {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--subtle);
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--card-bg);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-strong);
    background: rgba(30, 41, 59, 0.86);
}

.card-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #111827;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 46px;
    margin: 0;
    font-size: 16px;
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 42px;
    margin: 8px 0 0;
    color: var(--subtle);
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.10);
    font-size: 12px;
    font-weight: 750;
}

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

.category-card,
.info-panel,
.rank-card,
.detail-panel,
.player-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel-bg);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.20);
}

.category-card {
    padding: 22px;
    min-height: 160px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
}

.category-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, minmax(130px, 0.45fr));
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
    padding: 0 13px;
    outline: none;
}

.page-hero {
    padding: 64px 0 28px;
}

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

.breadcrumb a {
    color: #fcd34d;
}

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

.player-panel {
    overflow: hidden;
    margin-bottom: 22px;
}

.player-wrap {
    position: relative;
    background: #000;
}

.player-wrap video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #111827;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.42));
}

.play-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    height: 96px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 22px 56px rgba(249, 115, 22, 0.42);
    font-size: 34px;
    font-weight: 900;
}

.player-hint {
    padding: 12px 16px;
    color: var(--subtle);
    border-top: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.82);
    font-size: 13px;
}

.detail-panel {
    padding: 24px;
    margin-bottom: 22px;
}

.detail-title {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.detail-summary,
.detail-review {
    color: var(--muted);
    white-space: pre-wrap;
}

.sidebar {
    position: sticky;
    top: 96px;
}

.side-item {
    display: grid;
    grid-template-columns: 94px 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.side-item img {
    width: 94px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
}

.side-item h4 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 58px 128px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 12px;
}

.rank-number {
    color: var(--amber);
    font-size: 30px;
    font-weight: 950;
    text-align: center;
}

.rank-card img {
    width: 128px;
    height: 80px;
    border-radius: 14px;
    object-fit: cover;
}

.footer {
    margin-top: 60px;
    padding: 36px 0;
    border-top: 1px solid var(--border);
    color: var(--subtle);
    background: rgba(2, 6, 23, 0.72);
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}

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

.empty-state {
    display: none;
    padding: 24px;
    color: var(--subtle);
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--panel-bg);
}

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

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

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

    .sidebar {
        position: static;
    }
}

@media (max-width: 760px) {
    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
    }

    .nav.open {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding-top: 42px;
    }

    .hero-search,
    .filter-panel {
        grid-template-columns: 1fr;
        border-radius: 20px;
    }

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

    .rank-card {
        grid-template-columns: 42px 90px 1fr;
    }

    .rank-card .button {
        grid-column: 2 / -1;
    }

    .footer-grid,
    .section-head {
        grid-template-columns: 1fr;
        display: grid;
    }
}

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

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

    .card-body {
        padding: 11px;
    }
}
