:root {
    color-scheme: dark;
    --bg: #05060a;
    --panel: rgba(17, 24, 39, 0.78);
    --panel-strong: rgba(31, 41, 55, 0.92);
    --line: rgba(255, 255, 255, 0.10);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --red: #dc2626;
    --red-dark: #7f1d1d;
    --gold: #facc15;
    --blue: #60a5fa;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(127, 29, 29, 0.35), transparent 36rem), linear-gradient(180deg, #030712 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.98), rgba(185, 28, 28, 0.98), rgba(127, 29, 29, 0.98));
    border-bottom: 1px solid rgba(250, 204, 21, 0.16);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 22px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold), var(--red));
    color: white;
    font-size: 18px;
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.25), 0 10px 28px rgba(0, 0, 0, 0.25);
}

.brand-text strong {
    display: block;
    font-size: 22px;
    line-height: 1.05;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fde68a, #ffffff);
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text small {
    display: block;
    margin-top: 4px;
    color: #fecaca;
    font-size: 12px;
}

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

.nav-link,
.mobile-link {
    color: #fee2e2;
    font-size: 14px;
    font-weight: 650;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #fef3c7;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    padding: 10px 22px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(69, 10, 10, 0.96);
}

.mobile-nav.is-open {
    display: grid;
    gap: 12px;
}

.hero-section {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.55fr);
    align-items: center;
    gap: 48px;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 72px 22px 98px;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide.is-active {
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.hero-backdrop {
    position: absolute;
    inset: -72px;
    z-index: 0;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.32) saturate(1.25);
    transform: scale(1.12);
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.78) 48%, rgba(127, 29, 29, 0.34) 100%);
    pointer-events: none;
}

.hero-content,
.hero-poster,
.hero-controls {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #fde68a;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 820px;
    margin: 0 0 18px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.03;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-summary {
    max-width: 760px;
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.9;
}

.hero-tags,
.detail-meta,
.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-tags span,
.detail-meta span,
.meta-line span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #e2e8f0;
    font-size: 13px;
}

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

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

.primary-btn {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: white;
    box-shadow: 0 18px 36px rgba(220, 38, 38, 0.30);
}

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

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
}

.full-btn {
    width: 100%;
}

.hero-poster {
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transform: rotate(2deg);
}

.hero-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(14px);
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: white;
}

.hero-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    font-size: 26px;
    line-height: 1;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

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

.search-band {
    padding: 54px 22px;
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.28), rgba(15, 23, 42, 0.1));
}

.search-inner,
.content-section,
.footer-inner,
.breadcrumb,
.detail-layout {
    max-width: 1240px;
    margin: 0 auto;
}

.search-inner {
    text-align: center;
}

.search-inner h2,
.section-heading h2,
.page-hero h1,
.detail-content h1 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.search-inner h2,
.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.search-inner p,
.section-heading p,
.page-hero p {
    color: var(--muted);
    line-height: 1.8;
}

.search-form,
.inline-filter {
    margin: 26px auto 0;
    max-width: 680px;
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.search-form input,
.inline-filter input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
    padding: 0 14px;
}

.search-form button {
    border: 0;
    border-radius: 12px;
    padding: 0 22px;
    min-height: 44px;
    background: var(--red);
    color: white;
    font-weight: 800;
}

.wide-filter {
    max-width: 100%;
    margin-bottom: 28px;
}

.content-section {
    padding: 64px 22px;
}

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

.section-heading p {
    margin: 10px 0 0;
}

.section-more {
    color: #fde68a;
    font-weight: 800;
    white-space: nowrap;
}

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

.category-card,
.category-overview-card,
.movie-card,
.ranking-card,
.detail-content,
.player-panel,
.detail-side {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
}

.category-card {
    min-height: 190px;
    padding: 24px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.70), rgba(17, 24, 39, 0.88));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.ranking-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(250, 204, 21, 0.35);
}

.category-name {
    display: inline-flex;
    color: #fde68a;
    font-weight: 850;
    margin-bottom: 12px;
}

.category-card strong {
    display: block;
    font-size: 22px;
    margin-bottom: 12px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.movie-card {
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.movie-poster {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.movie-card:hover .movie-poster {
    transform: scale(1.05);
    filter: brightness(1.08);
}

.card-year,
.card-type,
.rank-badge {
    position: absolute;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.card-year {
    top: 10px;
    right: 10px;
    background: rgba(220, 38, 38, 0.82);
}

.card-type {
    left: 10px;
    bottom: 10px;
    background: rgba(15, 23, 42, 0.78);
}

.rank-badge {
    top: 10px;
    left: 10px;
    z-index: 2;
    background: linear-gradient(135deg, var(--gold), #f97316);
    color: #1f2937;
}

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

.movie-card-body h3 {
    margin: 0 0 9px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 850;
}

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

.meta-line {
    gap: 6px;
    margin-bottom: 12px;
}

.meta-line span {
    font-size: 11px;
    padding: 4px 7px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-list span {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.12);
    color: #bfdbfe;
    font-size: 12px;
}

.compact-card .movie-card-body h3 {
    font-size: 15px;
}

.compact-card .movie-line {
    min-height: 42px;
    font-size: 12px;
}

.ranking-split {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 34px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 38px 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid var(--line);
}

.ranking-row img {
    width: 56px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-index {
    color: #fde68a;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.ranking-title {
    font-weight: 850;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-meta {
    color: var(--soft);
    font-size: 13px;
}

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

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 82px 22px;
    background: radial-gradient(circle at top right, rgba(220, 38, 38, 0.35), transparent 28rem), linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(69, 10, 10, 0.86));
}

.page-hero > div {
    max-width: 1240px;
    margin: 0 auto;
}

.page-hero h1 {
    font-size: clamp(42px, 6vw, 68px);
}

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

.slim-hero {
    padding-top: 70px;
    padding-bottom: 70px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 20px;
    padding: 16px;
    border-radius: var(--radius);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-cover img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
}

.category-overview-card h2 {
    margin: 4px 0 10px;
    font-size: 26px;
}

.category-overview-card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.75;
}

.sample-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sample-links a {
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 12px;
}

.ranking-card-list {
    display: grid;
    gap: 16px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    border-radius: var(--radius);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-card-cover {
    position: relative;
    display: block;
}

.ranking-card-cover span {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold), #f97316);
    color: #111827;
    font-weight: 900;
}

.ranking-card-cover img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-card h2 {
    margin: 4px 0 10px;
    font-size: 24px;
}

.ranking-card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.75;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 24px 22px 0;
    color: var(--soft);
    font-size: 14px;
}

.breadcrumb a {
    color: #fde68a;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding: 24px 22px 34px;
}

.player-panel,
.detail-content,
.detail-side {
    border-radius: 24px;
    overflow: hidden;
}

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

.movie-player {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(0, 0, 0, 0.48));
    color: white;
    font-size: 18px;
    font-weight: 850;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-symbol {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 18px 42px rgba(220, 38, 38, 0.36);
    font-size: 32px;
}

.detail-content {
    margin-top: 22px;
    padding: 28px;
}

.detail-content h1 {
    font-size: clamp(34px, 5vw, 58px);
    margin-bottom: 12px;
}

.detail-one-line {
    color: #f8fafc;
    font-size: 20px;
    line-height: 1.75;
    margin: 0 0 18px;
}

.detail-meta {
    margin-bottom: 18px;
}

.detail-tags {
    margin-bottom: 26px;
}

.detail-content section {
    margin-top: 28px;
}

.detail-content h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-content p {
    color: var(--muted);
    line-height: 1.95;
}

.detail-side {
    padding: 18px;
    align-self: start;
    position: sticky;
    top: 96px;
}

.side-poster {
    overflow: hidden;
    border-radius: 18px;
    margin-bottom: 18px;
}

.side-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.related-section {
    padding-top: 18px;
}

.site-footer {
    margin-top: 38px;
    padding: 34px 22px;
    background: rgba(2, 6, 23, 0.94);
    border-top: 1px solid var(--line);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}

.footer-inner p {
    margin: 8px 0 0;
    color: var(--soft);
}

.footer-links {
    display: flex;
    gap: 16px;
    color: #fde68a;
    font-weight: 750;
}

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

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

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

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

    .detail-side {
        position: static;
        max-width: 420px;
    }
}

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

    .menu-toggle {
        display: flex;
    }

    .hero-section {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 46px;
    }

    .hero-poster {
        max-width: 260px;
        transform: none;
    }

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

    .category-overview-card {
        grid-template-columns: 120px 1fr;
    }

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

    .section-heading,
    .footer-inner,
    .search-form,
    .inline-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .search-form button {
        width: 100%;
    }

    .ranking-row {
        grid-template-columns: 34px 52px minmax(0, 1fr);
    }

    .ranking-meta {
        display: none;
    }
}

@media (max-width: 520px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

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

    .brand-text small {
        display: none;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .hero-summary {
        font-size: 15px;
    }

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

    .content-section,
    .detail-layout,
    .breadcrumb {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .detail-content {
        padding: 20px;
    }
}
