:root {
    --page-bg: #0f172a;
    --panel: rgba(15, 23, 42, 0.88);
    --panel-soft: rgba(30, 41, 59, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --accent: #f59e0b;
    --accent-2: #fbbf24;
    --accent-dark: #92400e;
    --shadow: 0 24px 60px rgba(2, 6, 23, 0.38);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 30rem),
        linear-gradient(180deg, #111827 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

img.is-missing {
    display: none;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.96), rgba(51, 65, 85, 0.94), rgba(30, 41, 59, 0.96));
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.navbar {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #facc15);
    color: #111827;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.32);
}

.logo-title {
    display: block;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-subtitle {
    display: block;
    margin-top: -4px;
    color: #cbd5e1;
    font-size: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    padding: 9px 13px;
    border-radius: 999px;
    color: #e2e8f0;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: #fcd34d;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    width: min(280px, 30vw);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
    overflow: hidden;
}

.nav-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 10px 4px 10px 15px;
    background: transparent;
    color: #fff;
}

.nav-search button {
    border: 0;
    padding: 10px 14px;
    background: transparent;
    color: var(--accent-2);
    cursor: pointer;
    font-weight: 800;
}

.menu-button {
    display: none;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
}

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

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

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

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.54;
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.76) 45%, rgba(2, 6, 23, 0.36) 100%),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.08) 46%, rgba(15, 23, 42, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 48px;
}

.hero-copy {
    max-width: 720px;
    padding-top: 28px;
}

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

.hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 680px;
    margin: 0;
    color: #e2e8f0;
    font-size: clamp(16px, 2vw, 20px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 30px;
}

.hero-meta span,
.tag,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.58);
    color: #dbeafe;
    font-size: 13px;
    padding: 6px 11px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button-primary {
    color: #111827;
    background: linear-gradient(135deg, #f59e0b, #facc15);
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.button-secondary {
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.62);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.hero-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(18px);
}

.hero-card .poster-frame {
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    margin: 16px;
}

.poster-frame {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.22), transparent 28%),
        linear-gradient(135deg, rgba(51, 65, 85, 0.85), rgba(15, 23, 42, 0.92));
}

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

.hero-card-body {
    padding: 0 20px 22px;
}

.hero-card-body h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.hero-card-body p {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
}

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

.hero-dots button {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: #fbbf24;
}

.section {
    padding: 64px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    letter-spacing: -0.03em;
}

.section-intro {
    margin: 8px 0 0;
    max-width: 680px;
    color: var(--muted);
}

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

.search-panel {
    padding: 20px;
    display: grid;
    gap: 14px;
    margin-bottom: 26px;
}

.search-box {
    display: flex;
    gap: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    padding: 10px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-size: 16px;
    padding: 8px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.66);
    padding: 9px 13px;
    cursor: pointer;
    font-weight: 800;
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #111827;
    border-color: transparent;
    background: linear-gradient(135deg, #f59e0b, #facc15);
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.9));
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.42);
    box-shadow: 0 26px 54px rgba(0, 0, 0, 0.34);
}

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

.movie-card .poster-frame {
    aspect-ratio: 3 / 4;
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: #fef3c7;
    border: 1px solid rgba(251, 191, 36, 0.32);
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 14px 14px 16px;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.card-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    color: #cbd5e1;
    font-size: 12px;
}

.card-text {
    margin: 0;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.card-tags span {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: #dbeafe;
    padding: 3px 8px;
    font-size: 12px;
}

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

.category-card {
    position: relative;
    min-height: 170px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 42%),
        linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.92));
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.42);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: #cbd5e1;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 72px 88px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.66);
}

.rank-number {
    font-size: 28px;
    font-weight: 950;
    color: #fbbf24;
    text-align: center;
}

.rank-cover {
    aspect-ratio: 3 / 4;
    border-radius: 14px;
}

.rank-title {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-desc {
    margin: 0;
    color: #cbd5e1;
}

.page-hero {
    padding: 58px 0 36px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.2), transparent 34rem),
        linear-gradient(180deg, rgba(30, 41, 59, 0.48), rgba(15, 23, 42, 0));
}

.page-hero h1 {
    margin: 14px 0 12px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumbs a {
    color: #fcd34d;
}

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

.player-panel {
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

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

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    transform: translate(-50%, -50%);
    display: inline-grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, #f59e0b, #facc15);
    box-shadow: 0 18px 48px rgba(245, 158, 11, 0.42);
    cursor: pointer;
    font-size: 32px;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.player-shell.is-playing .player-button {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.88);
}

.player-titlebar {
    padding: 18px 20px;
    background: rgba(15, 23, 42, 0.92);
}

.player-titlebar h1 {
    margin: 0 0 10px;
    font-size: clamp(26px, 4vw, 38px);
}

.player-titlebar p {
    margin: 0;
    color: #cbd5e1;
}

.detail-card {
    padding: 18px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.detail-card .poster-frame {
    aspect-ratio: 3 / 4;
    border-radius: 20px;
    margin-bottom: 16px;
}

.info-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.info-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    color: #e2e8f0;
}

.info-row strong {
    color: #fcd34d;
}

.article-panel {
    padding: 26px;
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.article-panel h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.article-panel p {
    margin: 0 0 18px;
    color: #dbeafe;
}

.empty-state {
    padding: 42px;
    text-align: center;
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.62);
}

.site-footer {
    margin-top: 60px;
    padding: 36px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.72);
    color: #cbd5e1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 26px;
}

.footer-grid h2,
.footer-grid h3 {
    margin: 0 0 12px;
    color: #fff;
}

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

.footer-links a {
    color: #fde68a;
}

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

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

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

    .hero-card {
        display: none;
    }
}

@media (max-width: 820px) {
    .navbar {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .nav-links,
    .nav-search {
        display: none;
        width: 100%;
    }

    .site-header.is-open .nav-links,
    .site-header.is-open .nav-search {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        padding-top: 10px;
    }

    .nav-search {
        margin-bottom: 8px;
    }

    .hero {
        height: auto;
        min-height: 620px;
    }

    .hero-content {
        min-height: 620px;
        padding: 64px 0 80px;
    }

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

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

    .rank-item {
        grid-template-columns: 46px 70px minmax(0, 1fr);
    }

    .rank-item .button {
        grid-column: 2 / -1;
        width: max-content;
    }

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

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

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

    .section {
        padding: 46px 0;
    }

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

    .search-box {
        flex-direction: column;
    }

    .hero h1 {
        font-size: 40px;
    }
}
