:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --cyan: #06b6d4;
    --cyan-dark: #0891b2;
    --blue: #2563eb;
    --slate: #0f172a;
    --slate-soft: #1e293b;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    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%;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.96);
    color: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.26);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand span:last-child,
.footer-brand span:last-child {
    background: linear-gradient(90deg, #22d3ee, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    font-size: 14px;
    box-shadow: 0 8px 22px rgba(6, 182, 212, 0.35);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #cbd5e1;
    font-size: 15px;
}

.desktop-nav a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover {
    color: #fff;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: #fff;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 8px 0 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.mobile-nav a {
    display: block;
    padding: 11px 12px;
    border-radius: 12px;
    color: #cbd5e1;
}

.mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.mobile-nav.is-open {
    display: block;
}

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: #020617;
    color: #fff;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 35%, rgba(6, 182, 212, 0.34), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.64) 48%, rgba(2, 6, 23, 0.2));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 86px 0 96px;
}

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

.hero-kicker,
.card-badge,
.rank-index,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: var(--cyan);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 13px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-tags span:not(.hero-kicker) {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    padding: 7px 13px;
    backdrop-filter: blur(14px);
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 7vw, 66px);
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero p {
    margin: 0 0 28px;
    color: #e2e8f0;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 32px;
    color: #e5e7eb;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 22px;
    border: 0;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: var(--cyan);
    color: #fff;
    box-shadow: 0 16px 32px rgba(6, 182, 212, 0.34);
}

.btn-primary:hover {
    background: var(--cyan-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #fff;
    color: var(--ink);
}

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

.btn-ghost {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-controls {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    pointer-events: auto;
    backdrop-filter: blur(14px);
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.24);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #fff;
}

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

.page-title {
    margin-bottom: 34px;
}

.page-title h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.page-title p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.section-block {
    margin-bottom: 58px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(25px, 4vw, 36px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    flex: 0 0 auto;
    color: var(--cyan-dark);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #155e75);
}

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

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

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

.card-badge {
    position: absolute;
    top: 13px;
    left: 13px;
    z-index: 2;
    padding: 5px 11px;
    font-size: 12px;
}

.play-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.92);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 850;
}

.card-body h3 a:hover {
    color: var(--cyan-dark);
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #475569;
    font-size: 13px;
}

.card-meta span {
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

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

.card-tags span,
.detail-tags span {
    border-radius: 999px;
    background: #ecfeff;
    color: #0e7490;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 184px;
    border-radius: 24px;
    background: #0f172a;
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    transition: transform 0.45s ease;
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.88));
}

.category-info {
    position: absolute;
    inset: auto 18px 18px;
    z-index: 2;
}

.category-info h2,
.category-info h3 {
    margin: 0 0 7px;
    font-size: 22px;
    font-weight: 900;
}

.category-info p {
    margin: 0;
    color: #dbeafe;
    font-size: 14px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, minmax(120px, 0.55fr)) auto;
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.search-panel input,
.search-panel select {
    min-height: 46px;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0 14px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.rank-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.rank-row {
    display: grid;
    grid-template-columns: auto 112px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.rank-index {
    width: 42px;
    height: 42px;
    justify-content: center;
    padding: 0;
}

.rank-row img {
    width: 112px;
    height: 70px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-row h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.rank-row p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.detail-hero {
    background: #020617;
    color: #fff;
}

.detail-hero-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0;
}

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

.breadcrumbs a:hover {
    color: #fff;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 32px;
    align-items: start;
}

.player-card,
.detail-panel {
    overflow: hidden;
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(2, 6, 23, 0.3);
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.22), rgba(2, 6, 23, 0.58));
}

.player-button {
    position: relative;
    z-index: 3;
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: var(--cyan);
    color: #fff;
    font-size: 27px;
    cursor: pointer;
    box-shadow: 0 24px 48px rgba(6, 182, 212, 0.36);
}

.player-shell.is-playing .player-cover {
    display: none;
}

.player-caption {
    padding: 20px;
    color: var(--ink);
}

.player-caption h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.player-caption p {
    margin: 0;
    color: var(--muted);
}

.detail-panel {
    padding: 24px;
    color: var(--ink);
}

.detail-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 900;
}

.detail-list {
    display: grid;
    gap: 10px;
    margin: 18px 0;
    padding: 0;
    list-style: none;
}

.detail-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.detail-list span:first-child {
    color: var(--muted);
}

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

.content-card {
    margin-top: 26px;
    padding: 28px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

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

.content-card p {
    margin: 0;
    color: #334155;
    text-align: justify;
}

.site-footer {
    background: #0f172a;
    color: #cbd5e1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 1fr);
    gap: 34px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 17px;
}

.site-footer p {
    margin: 12px 0 0;
    color: #94a3b8;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

.site-footer a:hover {
    color: #22d3ee;
}

.hidden-card {
    display: none !important;
}

.empty-state {
    display: none;
    padding: 34px;
    border-radius: 22px;
    background: #fff;
    color: var(--muted);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
    display: block;
}

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

    .menu-toggle {
        display: block;
    }

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

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

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

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

@media (max-width: 720px) {
    .hero {
        min-height: 560px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-meta {
        gap: 10px;
        font-size: 14px;
    }

    .page-shell {
        padding: 38px 0;
    }

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

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

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

    .rank-row {
        grid-template-columns: auto 94px 1fr;
    }

    .rank-row img {
        width: 94px;
        height: 64px;
    }
}
