
:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --brand: #0ea5e9;
    --brand-light: #38bdf8;
    --gold: #facc15;
    --red: #ef4444;
    --radius: 18px;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 30%), var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

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

button,
input {
    font: inherit;
}

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

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

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-light), #2563eb);
    color: #fff;
    box-shadow: 0 12px 34px rgba(14, 165, 233, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.desktop-nav a {
    color: var(--soft);
    font-weight: 600;
    transition: color 0.25s ease;
}

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

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #fff;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.96);
}

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

.mobile-panel a {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
    color: var(--soft);
}

.hero-slider {
    position: relative;
    height: min(80vh, 760px);
    min-height: 560px;
    overflow: hidden;
    background: var(--bg-soft);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.03);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.86)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 50%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(720px, 100%);
    padding-top: 28px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 14px;
}

.hero-copy h1,
.site-hero-title {
    margin: 0 0 10px;
    color: var(--soft);
    font-size: clamp(18px, 2vw, 25px);
    font-weight: 700;
}

.hero-copy h2 {
    margin: 0 0 20px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.055em;
}

.hero-copy p {
    max-width: 670px;
    margin: 0 0 24px;
    color: var(--soft);
    font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags span,
.detail-tags span {
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: #e2e8f0;
    font-size: 13px;
    backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 13px;
    font-weight: 800;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.primary-button {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 18px 40px rgba(14, 165, 233, 0.32);
}

.primary-button:hover {
    background: var(--brand-light);
    transform: translateY(-2px);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    backdrop-filter: blur(12px);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.58);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dots button {
    width: 24px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 42px;
    background: #fff;
}

.quick-search {
    position: relative;
    z-index: 4;
    margin-top: -34px;
}

.filter-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.filter-form input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 13px;
    outline: none;
    background: rgba(2, 6, 23, 0.58);
    color: #fff;
}

.filter-form input:focus {
    border-color: rgba(56, 189, 248, 0.72);
}

.filter-form button {
    min-width: 104px;
    border: 0;
    border-radius: 13px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
}

.filter-count {
    min-height: 24px;
    margin: 12px 4px 0;
    color: var(--muted);
    font-size: 14px;
}

.content-section {
    padding: 70px 0;
}

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

.section-heading span {
    display: block;
    color: var(--brand-light);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 6px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.section-link {
    color: var(--brand-light);
    font-weight: 800;
}

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 16px 50px rgba(2, 6, 23, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 24px 60px rgba(14, 165, 233, 0.14);
    transform: translateY(-4px) scale(1.01);
}

.movie-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.78);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.year-badge {
    right: 10px;
    bottom: 10px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.play-bubble {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card-body {
    flex: 1;
    padding: 16px;
}

.movie-card-body h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
}

.movie-meta span {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
}

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

.category-card,
.category-overview-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.7));
    padding: 20px;
    box-shadow: 0 16px 50px rgba(2, 6, 23, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover {
    border-color: rgba(56, 189, 248, 0.34);
    transform: translateY(-3px);
}

.category-card span,
.category-overview-card span {
    color: var(--brand-light);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.category-card strong,
.category-overview-card strong {
    display: block;
    margin: 10px 0;
    color: #fff;
    font-size: 28px;
}

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

.category-card div,
.category-overview-card ul {
    display: grid;
    gap: 6px;
}

.category-card a,
.category-overview-card li a {
    color: var(--soft);
    font-size: 13px;
}

.ranking-section {
    background: rgba(15, 23, 42, 0.44);
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

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

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

.horizontal-card {
    display: grid;
    grid-template-columns: auto 132px 1fr;
    gap: 16px;
    align-items: center;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.66);
    padding: 12px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.horizontal-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateY(-2px);
}

.horizontal-card img {
    width: 132px;
    height: 84px;
    border-radius: 12px;
    object-fit: cover;
    background: #0f172a;
}

.horizontal-card h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

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

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

.sub-hero {
    position: relative;
    padding: 86px 0 54px;
    background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.28), transparent 34%), linear-gradient(180deg, #0f172a, #020617);
    border-bottom: 1px solid var(--border);
}

.sub-hero h1 {
    max-width: 860px;
    margin: 0 0 14px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.sub-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--soft);
    font-size: 18px;
}

.category-hero .hero-actions {
    margin-top: 24px;
}

.category-overview-card ul {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.category-overview-card li a:hover {
    color: var(--brand-light);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background-position: center;
    background-size: cover;
}

.detail-hero-inner {
    position: relative;
    padding: 42px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 34px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--brand-light);
}

.breadcrumb strong {
    color: #fff;
    font-weight: 700;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.detail-info p {
    max-width: 820px;
    margin: 0 0 22px;
    color: var(--soft);
    font-size: 18px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 28px;
}

.detail-meta-grid div {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.54);
}

.detail-meta-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.detail-meta-grid strong {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    color: #fff;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.76));
    color: #fff;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-size: 34px;
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.5);
}

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

.detail-content {
    padding-bottom: 8px;
}

.prose-card {
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: 0 18px 54px rgba(2, 6, 23, 0.22);
}

.prose-card h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 26px;
}

.prose-card p {
    margin: 0 0 24px;
    color: var(--soft);
    font-size: 17px;
}

.prose-card p:last-child {
    margin-bottom: 0;
}

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

.movie-card-compact .movie-card-body p {
    min-height: 0;
}

.site-footer {
    margin-top: 40px;
    padding: 48px 0;
    border-top: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.82);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 34px;
}

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

.site-footer p {
    max-width: 620px;
    color: var(--muted);
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

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

.footer-links a {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--soft);
}

.footer-links a:hover {
    color: #fff;
    border-color: rgba(56, 189, 248, 0.35);
}

.is-filtered-out {
    display: none !important;
}

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

    .detail-layout {
        grid-template-columns: 240px 1fr;
    }

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero-slider {
        min-height: 640px;
        height: auto;
    }

    .hero-content {
        align-items: end;
        padding-bottom: 92px;
    }

    .hero-control {
        display: none;
    }

    .movie-grid,
    .ranking-grid,
    .category-grid,
    .category-overview-grid,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text small {
        font-size: 11px;
    }

    .movie-grid,
    .ranking-grid,
    .ranking-list,
    .category-grid,
    .category-overview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .horizontal-card {
        grid-template-columns: auto 100px 1fr;
        gap: 12px;
    }

    .horizontal-card img {
        width: 100px;
        height: 74px;
    }

    .horizontal-card p {
        display: none;
    }

    .rank-number {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .content-section {
        padding: 48px 0;
    }

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

    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .prose-card {
        padding: 24px;
    }
}
