:root {
    color-scheme: dark;
    --bg: #050608;
    --bg-soft: #0b1018;
    --panel: rgba(18, 25, 38, 0.88);
    --panel-strong: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #a5b4c7;
    --soft: #64748b;
    --red: #dc2626;
    --red-dark: #991b1b;
    --orange: #f97316;
    --gold: #fbbf24;
    --blue: #38bdf8;
    --green: #22c55e;
    --radius: 18px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(220, 38, 38, 0.2), transparent 30rem),
        radial-gradient(circle at 85% 20%, rgba(249, 115, 22, 0.14), transparent 32rem),
        linear-gradient(180deg, #0a0f19 0%, #050608 42%, #0a0f19 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(8, 13, 24, 0.96), rgba(20, 27, 41, 0.94), rgba(8, 13, 24, 0.96));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.header-inner {
    width: min(1220px, calc(100% - 28px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.35);
}

.brand-text {
    font-size: 24px;
    background: linear-gradient(90deg, #ef4444, #fb923c, #fde68a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.nav-link {
    color: var(--muted);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    transform: translateY(-1px);
}

.header-search,
.mobile-search,
.inline-filter,
.search-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search input,
.mobile-search input,
.inline-filter input,
.search-tools input,
.search-tools select {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    border-radius: 999px;
    padding: 11px 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 230px;
}

.header-search input:focus,
.mobile-search input:focus,
.inline-filter input:focus,
.search-tools input:focus,
.search-tools select:focus {
    border-color: rgba(239, 68, 68, 0.8);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

.header-search button,
.mobile-search button,
.inline-filter button,
.search-tools button {
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    padding: 11px 18px;
    font-weight: 800;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 12px;
}

.mobile-panel {
    display: none;
    width: min(1220px, calc(100% - 28px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-search {
    margin-bottom: 14px;
}

.mobile-search input {
    flex: 1;
}

.mobile-nav,
.quick-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--line);
    color: var(--muted);
    font-weight: 700;
    transition: all 0.2s ease;
}

.nav-pill:hover,
.nav-pill.is-active {
    color: #fff;
    border-color: rgba(239, 68, 68, 0.65);
    background: rgba(220, 38, 38, 0.18);
}

.hero-slider {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 30%, transparent 0%, rgba(0, 0, 0, 0.14) 30%, rgba(0, 0, 0, 0.76) 76%),
        linear-gradient(0deg, #050608 0%, rgba(5, 6, 8, 0.4) 42%, rgba(5, 6, 8, 0.18) 100%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    bottom: 82px;
    width: min(760px, calc(100% - 64px));
}

.hero-label,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.hero-content h1,
.hero-content h2 {
    margin: 18px 0 14px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.96;
    letter-spacing: -0.07em;
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.48);
}

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

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.16);
    padding: 6px 10px;
    font-size: 13px;
}

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

.primary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 900;
    transition: transform 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
    padding: 13px 24px;
    box-shadow: 0 18px 38px rgba(220, 38, 38, 0.28);
}

.primary-button.small {
    padding: 10px 16px;
    font-size: 14px;
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.46);
    padding: 13px 24px;
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.08);
}

.text-link {
    color: #fb923c;
}

.text-link:hover {
    color: #fed7aa;
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 54px;
    display: flex;
    gap: 10px;
}

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

.hero-dot.is-active {
    width: 34px;
    background: linear-gradient(135deg, var(--red), var(--orange));
}

.section {
    padding: 56px 0;
}

.section-overlap {
    margin-top: -46px;
    position: relative;
    z-index: 2;
}

.section-head,
.category-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-head h2,
.category-section-head h2,
.sub-hero h1 {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.section-head p,
.category-section-head p,
.sub-hero p {
    color: var(--muted);
    line-height: 1.8;
}

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

.category-tile {
    position: relative;
    min-height: 188px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel-strong);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    isolation: isolate;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    transition: transform 0.4s ease;
}

.category-tile span {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(5, 6, 8, 0.92), rgba(5, 6, 8, 0.3));
    z-index: -1;
}

.category-tile strong {
    font-size: 24px;
    line-height: 1;
}

.category-tile em {
    margin-top: 10px;
    color: #cbd5e1;
    font-style: normal;
    line-height: 1.55;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 16px;
    background: rgba(17, 24, 39, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(239, 68, 68, 0.64);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #020617;
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent 60%);
}

.poster-badge,
.poster-score {
    position: absolute;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    padding: 7px 10px;
}

.poster-badge {
    left: 12px;
    top: 12px;
    background: rgba(220, 38, 38, 0.92);
}

.poster-score {
    right: 12px;
    bottom: 12px;
    background: rgba(2, 6, 23, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.card-body {
    padding: 16px;
}

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

.card-body h3 a:hover,
.horizontal-body h3 a:hover {
    color: #f87171;
}

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

.panel-section {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 36px;
    box-shadow: var(--shadow);
}

.blue-panel {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.26), rgba(88, 28, 135, 0.18));
}

.red-panel {
    background: linear-gradient(135deg, rgba(153, 27, 27, 0.25), rgba(154, 52, 18, 0.18));
}

.gold-panel {
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.26), rgba(202, 138, 4, 0.12));
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 280px);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 16px;
    scrollbar-width: thin;
}

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

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

.horizontal-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(17, 24, 39, 0.78);
    transition: background 0.2s ease, transform 0.2s ease;
}

.horizontal-card:hover {
    background: rgba(30, 41, 59, 0.88);
    transform: translateX(3px);
}

.rank-number {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.horizontal-poster {
    flex: 0 0 132px;
    height: 82px;
    overflow: hidden;
    border-radius: 12px;
    background: #020617;
}

.horizontal-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.horizontal-body {
    min-width: 0;
}

.horizontal-body h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.horizontal-body p {
    margin: 0 0 10px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sub-hero {
    padding: 70px 0 36px;
}

.sub-hero p {
    max-width: 760px;
    font-size: 18px;
}

.category-overview {
    display: grid;
    gap: 34px;
    padding-bottom: 60px;
}

.category-section,
.filter-panel,
.search-panel {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow);
    padding: 28px;
}

.category-pills {
    margin-top: 22px;
}

.inline-filter input,
.search-tools input {
    flex: 1;
}

.search-tools {
    align-items: stretch;
}

.search-tools select {
    min-width: 160px;
}

.empty-state {
    display: none;
    margin-top: 24px;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 18px;
    padding: 26px;
    color: var(--muted);
    text-align: center;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--muted);
    margin: 28px 0;
}

.breadcrumb a:hover {
    color: #f87171;
}

.detail-page {
    padding-bottom: 16px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.detail-main {
    display: grid;
    gap: 20px;
}

.player-card,
.detail-card,
.aside-card,
.aside-cover {
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(17, 24, 39, 0.84);
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
    background: #000;
}

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

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.2), rgba(0, 0, 0, 0.56));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-layer span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 20px 44px rgba(220, 38, 38, 0.4);
    font-size: 30px;
    padding-left: 5px;
}

.play-layer em {
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.08em;
}

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

.detail-card,
.aside-card {
    padding: 24px;
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.05em;
}

.detail-card h2,
.aside-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.lead-text,
.text-card p {
    color: #d7e0ec;
    line-height: 1.9;
    font-size: 17px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.5);
    border: 1px solid rgba(248, 113, 113, 0.26);
    font-weight: 700;
    font-size: 13px;
}

.detail-aside {
    display: grid;
    align-content: start;
    gap: 20px;
    position: sticky;
    top: 88px;
}

.aside-cover {
    overflow: hidden;
    padding: 14px;
}

.aside-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 14px;
}

.aside-cover .primary-button {
    width: 100%;
}

dl {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px 14px;
    margin: 0;
}

dt {
    color: var(--soft);
}

dd {
    margin: 0;
    color: #e2e8f0;
}

.site-footer {
    margin-top: 42px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(8, 13, 24, 0.7), rgba(0, 0, 0, 0.96));
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr;
    gap: 36px;
    padding: 44px 0;
}

.footer-brand {
    font-size: 24px;
    color: #fff;
}

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

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

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

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

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

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

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

    .detail-aside {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

    .header-inner {
        height: 62px;
    }

    .brand-text {
        font-size: 20px;
    }

    .hero-slider {
        height: 68vh;
        min-height: 500px;
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 74px;
        width: auto;
    }

    .hero-dots {
        left: 22px;
        right: auto;
        bottom: 34px;
    }

    .section-head,
    .category-section-head,
    .search-tools {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-tools,
    .search-tools input,
    .search-tools select,
    .search-tools button,
    .inline-filter,
    .inline-filter input,
    .inline-filter button {
        width: 100%;
    }

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

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

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

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

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

    .panel-section,
    .category-section,
    .filter-panel,
    .search-panel {
        padding: 20px;
        border-radius: 20px;
    }

    .horizontal-card {
        align-items: flex-start;
    }

    .horizontal-poster {
        flex-basis: 108px;
        height: 72px;
    }

    .rank-number {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        font-size: 18px;
    }

    .hero-actions a {
        width: 100%;
    }
}
