:root {
    --bg: #07111f;
    --bg-soft: #0f1d33;
    --panel: rgba(15, 23, 42, 0.74);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #facc15;
    --accent-strong: #eab308;
    --blue: #2563eb;
    --blue-soft: rgba(37, 99, 235, 0.22);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 22px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.32), transparent 34%), linear-gradient(180deg, #07111f 0%, #0b1630 48%, #050812 100%);
    color: var(--text);
    min-height: 100vh;
}

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: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #facc15, #fef08a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, #facc15, #fde68a);
    box-shadow: 0 0 30px rgba(250, 204, 21, 0.34);
    font-size: 15px;
}

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

.nav-link,
.mobile-link {
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: 12px;
    transition: background 0.24s ease, color 0.24s ease, transform 0.24s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    background: rgba(37, 99, 235, 0.82);
    color: #ffffff;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 9px;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-panel.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

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

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62) 48%, rgba(15, 23, 42, 0.22)), linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 0.7));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2));
    bottom: 72px;
    width: min(760px, calc(100% - 48px));
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.92);
    color: #111827;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.inner-hero h1,
.detail-copy h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-shadow: 0 16px 38px rgba(0, 0, 0, 0.45);
}

.hero p,
.inner-hero p,
.detail-copy .lead {
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.8;
    margin: 0;
}

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

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

.primary-button {
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #111827;
    box-shadow: 0 14px 38px rgba(250, 204, 21, 0.28);
}

.ghost-button {
    background: rgba(15, 23, 42, 0.62);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
}

.hero-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

.hero-tags span,
.tag-cloud span {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 13px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(2, 6, 23, 0.58);
    color: #ffffff;
    font-size: 36px;
    line-height: 1;
    transition: background 0.24s ease, transform 0.24s ease;
}

.hero-arrow:hover {
    background: rgba(2, 6, 23, 0.84);
    transform: translateY(-50%) scale(1.06);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: var(--accent);
}

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

.section-block {
    margin-top: 68px;
}

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

.section-heading h2,
.search-panel h2,
.detail-panel h2,
.site-footer h2 {
    margin: 10px 0 0;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.15;
}

.section-heading a {
    color: #fde68a;
    font-weight: 700;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 58, 138, 0.54));
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

.search-panel p {
    color: var(--muted);
    line-height: 1.8;
    margin: 8px 0 0;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 12px;
}

.filter-grid input,
.filter-grid select {
    width: 100%;
    height: 46px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    padding: 0 14px;
    outline: none;
}

.filter-grid input:focus,
.filter-grid select:focus {
    border-color: rgba(250, 204, 21, 0.72);
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.12);
}

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

.movie-card {
    min-width: 0;
}

.movie-card.is-hidden,
.rank-row.is-hidden {
    display: none;
}

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.66);
    border: 1px solid var(--line);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card-link:hover {
    transform: translateY(-8px);
    border-color: rgba(250, 204, 21, 0.42);
    box-shadow: 0 24px 70px rgba(250, 204, 21, 0.16);
}

.poster-frame {
    position: relative;
    aspect-ratio: 16 / 10;
    margin: 0;
    overflow: hidden;
    background: #020617;
}

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

.movie-card-link:hover .poster-frame img,
.category-card:hover img,
.category-cover:hover img {
    transform: scale(1.08);
    filter: saturate(1.12);
}

.duration-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.78);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(250, 204, 21, 0.94);
    color: #111827;
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

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

.movie-card-body {
    padding: 18px;
}

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

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.24s ease;
}

.movie-card-link:hover h3 {
    color: var(--accent);
}

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

.movie-card-bottom span {
    color: #60a5fa;
}

.movie-card-bottom em {
    font-style: normal;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: #bfdbfe;
}

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

.category-card {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #020617;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
    opacity: 0.62;
}

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

.category-card span,
.category-card strong {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
}

.category-card span {
    bottom: 72px;
    font-size: 22px;
    font-weight: 900;
}

.category-card strong {
    bottom: 22px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.5;
}

.spotlight-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(360px, 1.28fr);
    gap: 26px;
    align-items: center;
    padding: 34px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 58, 138, 0.44));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.spotlight-copy p {
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 26px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 74px minmax(0, 1fr) 52px;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.46);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: transform 0.24s ease, background 0.24s ease, border-color 0.24s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(250, 204, 21, 0.36);
}

.rank-number {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(250, 204, 21, 0.92);
    color: #111827;
    font-weight: 900;
}

.rank-row img {
    width: 74px;
    height: 48px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.rank-copy strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-copy small {
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-score {
    color: #fde68a;
    font-weight: 900;
    text-align: right;
}

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

.inner-hero {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 78px 0 26px;
}

.inner-hero p {
    max-width: 820px;
}

.category-overview-grid {
    display: grid;
    gap: 24px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 26px;
    padding: 22px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.category-cover {
    height: 190px;
    overflow: hidden;
    border-radius: 18px;
    background: #020617;
}

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

.category-overview-card h2 {
    margin: 12px 0;
    font-size: 28px;
}

.category-overview-card p {
    color: var(--muted);
    line-height: 1.8;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 16px 0 18px;
}

.mini-links a {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #dbeafe;
    font-size: 13px;
}

.detail-hero {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 36px;
    padding: 54px 0 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

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

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #93c5fd;
    margin-bottom: 18px;
}

.detail-shell {
    padding-top: 20px;
}

.player-section {
    border-radius: 28px;
    overflow: hidden;
    background: #020617;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.72));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #111827;
    font-size: 34px;
    box-shadow: 0 18px 44px rgba(250, 204, 21, 0.26);
}

.play-overlay strong {
    font-size: 18px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    gap: 24px;
    margin-top: 28px;
}

.detail-panel {
    padding: 28px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.detail-panel p {
    color: #cbd5e1;
    line-height: 1.95;
    font-size: 16px;
}

.meta-panel {
    display: grid;
    gap: 12px;
    align-content: start;
}

.meta-panel div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.meta-panel span {
    color: var(--muted);
}

.meta-panel strong {
    text-align: right;
}

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

.empty-state {
    display: none;
    margin-top: 22px;
    padding: 24px;
    border-radius: 18px;
    text-align: center;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid var(--line);
}

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

.site-footer {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), #020617);
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    padding: 48px 0 28px;
}

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

.footer-brand {
    margin-bottom: 14px;
}

.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

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

.footer-links a {
    color: #cbd5e1;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.footer-links a:hover {
    color: #111827;
    background: var(--accent);
}

.copyright {
    width: min(1280px, calc(100% - 32px));
    margin: 32px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 14px;
}

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

    .nav-toggle {
        display: block;
    }

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

    .spotlight-layout,
    .search-panel,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .ranking-board {
        grid-template-columns: 1fr;
    }
}

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

    .hero-content {
        bottom: 64px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .category-overview-card,
    .detail-hero {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 520px) {
    .navbar,
    .page-shell,
    .inner-hero,
    .detail-hero,
    .footer-grid,
    .copyright {
        width: min(100% - 22px, 1280px);
    }

    .brand {
        font-size: 18px;
    }

    .hero {
        height: 520px;
    }

    .hero-content {
        left: 16px;
        width: calc(100% - 32px);
    }

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

    .search-panel,
    .spotlight-layout,
    .detail-panel {
        padding: 20px;
    }

    .rank-row {
        grid-template-columns: 34px 62px minmax(0, 1fr) 42px;
        gap: 10px;
    }

    .rank-row img {
        width: 62px;
        height: 42px;
    }
}
