:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111c30;
    --panel: rgba(30, 41, 59, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --accent: #f59e0b;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --shadow: 0 28px 80px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.10), transparent 30rem),
        linear-gradient(180deg, #0f172a 0%, #1e293b 46%, #0f172a 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%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.hero-content,
.section-block,
.page-main,
.detail-wrap,
.watch-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.26);
}

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

.nav-link,
.mobile-link {
    padding: 10px 15px;
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.10);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.85);
    color: white;
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    padding: 12px 16px 18px;
    border-top: 1px solid rgba(51, 65, 85, 0.75);
    background: #0f172a;
}

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

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

.hero-image-wrap,
.detail-bg {
    position: absolute;
    inset: 0;
}

.hero-image,
.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-overlay,
.detail-bg div {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.42) 100%),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: end;
    gap: 34px;
    padding: 96px 0 80px;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: white;
    letter-spacing: -0.055em;
}

.hero-copy h1 {
    max-width: 780px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    background: var(--accent-soft);
    color: #fbbf24;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.eyebrow {
    padding: 7px 12px;
    margin-bottom: 18px;
}

.section-kicker {
    padding: 5px 10px;
    margin-bottom: 8px;
}

.hero-tags,
.detail-meta,
.detail-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.detail-meta span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(51, 65, 85, 0.72);
    color: #dbeafe;
    font-size: 12px;
    font-weight: 700;
}

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

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

.primary-button {
    background: var(--accent);
    color: white;
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.secondary-button {
    background: rgba(30, 41, 59, 0.82);
    color: white;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.primary-button:hover,
.secondary-button:hover,
.movie-card:hover,
.category-tile:hover,
.rank-row:hover,
.rank-preview-item:hover {
    transform: translateY(-2px);
}

.hero-panel,
.story-card,
.category-tile,
.rank-preview-item,
.rank-row,
.search-bar,
.player-shell,
.detail-poster {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-panel {
    padding: 22px;
}

.hero-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.small-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.small-card:hover {
    background: rgba(51, 65, 85, 0.55);
}

.small-card img {
    width: 112px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
}

.small-card strong,
.small-card em {
    display: block;
}

.small-card strong {
    color: white;
    font-size: 15px;
    line-height: 1.35;
}

.small-card em {
    margin-top: 5px;
    color: #94a3b8;
    font-size: 12px;
    font-style: normal;
}

.section-block {
    padding: 52px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.045em;
}

.compact-heading h2 {
    font-size: 25px;
}

.text-link {
    color: #fbbf24;
    font-weight: 800;
}

.search-bar {
    padding: 12px;
}

.search-bar input {
    width: 100%;
    min-height: 52px;
    border: 0;
    outline: 0;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.88);
    color: white;
    font-size: 16px;
    padding: 0 18px;
}

.search-bar input::placeholder {
    color: #64748b;
}

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

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

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

.movie-card {
    display: block;
    min-width: 0;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.54);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(30, 41, 59, 0.82);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #1e293b;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 55%);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.92);
    color: white;
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .poster-play {
    opacity: 1;
}

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

.movie-card-body {
    display: block;
    padding: 15px;
}

.movie-card-body strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 43px;
    color: white;
    line-height: 1.35;
}

.meta-line,
.movie-card-body p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.55;
}

.meta-line {
    -webkit-line-clamp: 1;
    margin: 9px 0;
}

.movie-card-body p {
    -webkit-line-clamp: 2;
    margin: 0 0 13px;
}

.tag-row {
    margin-top: 10px;
}

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

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

.category-tile {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    overflow: hidden;
    position: relative;
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 46%);
    transform: translate(16%, 18%);
}

.category-tile strong,
.category-tile span {
    position: relative;
}

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

.category-tile span {
    color: #cbd5e1;
    line-height: 1.65;
}

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

.rank-preview-grid,
.rank-list {
    display: grid;
    gap: 12px;
}

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

.rank-preview-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    padding: 15px;
    align-items: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-preview-item span,
.rank-number {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    font-weight: 900;
}

.rank-preview-item strong,
.rank-preview-item em {
    display: block;
}

.rank-preview-item em {
    color: #94a3b8;
    font-size: 13px;
    font-style: normal;
    margin-top: 4px;
}

.page-main {
    padding-bottom: 40px;
}

.page-hero {
    padding: 64px 0 20px;
}

.compact-hero h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.page-search {
    max-width: 760px;
    margin-top: 24px;
}

.empty-state {
    display: none;
    margin: 30px 0 0;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.54);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 96px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row img {
    width: 96px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 14px;
}

.rank-info strong,
.rank-info em,
.rank-info small {
    display: block;
}

.rank-info strong {
    color: white;
    font-size: 17px;
}

.rank-info em,
.rank-info small {
    margin-top: 5px;
    color: #94a3b8;
    font-style: normal;
    line-height: 1.5;
}

.detail-main {
    padding-bottom: 48px;
}

.detail-hero {
    position: relative;
    min-height: 570px;
    overflow: hidden;
}

.detail-wrap {
    position: relative;
    z-index: 2;
    padding: 86px 0 58px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 26px;
}

.breadcrumb a {
    color: #fbbf24;
}

.detail-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 34px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
}

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

.detail-info h1 {
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.06;
}

.detail-meta,
.detail-tags {
    margin: 18px 0;
}

.watch-section {
    padding: 48px 0 20px;
}

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

.movie-player {
    width: 100%;
    height: 100%;
    background: #020617;
    display: block;
    cursor: pointer;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.32));
    color: white;
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
    transition: opacity 0.2s ease;
}

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

.play-icon {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.35);
}

.detail-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
}

.story-card {
    padding: 28px;
}

.story-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.story-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.9;
    font-size: 16px;
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid rgba(30, 41, 59, 0.95);
    background: rgba(15, 23, 42, 0.92);
}

.footer-inner {
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #94a3b8;
}

.footer-logo {
    color: white;
}

[data-card].is-hidden {
    display: none;
}

@media (max-width: 1080px) {
    .hero-content {
        grid-template-columns: 1fr;
        align-items: end;
    }

    .hero-panel {
        display: none;
    }

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

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

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

    .menu-button {
        display: block;
    }

    .hero-section,
    .hero-content {
        min-height: 560px;
    }

    .hero-copy h1 {
        font-size: 36px;
    }

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

    .movie-grid,
    .wide-grid,
    .compact-grid,
    .rank-preview-grid,
    .split-sections,
    .detail-content,
    .large-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .rank-row {
        grid-template-columns: 46px 78px 1fr;
        gap: 12px;
    }

    .rank-row img {
        width: 78px;
    }
}

@media (max-width: 540px) {
    .header-inner,
    .footer-inner,
    .hero-content,
    .section-block,
    .page-main,
    .detail-wrap,
    .watch-section {
        width: min(100% - 22px, 1180px);
    }

    .hero-section,
    .hero-content {
        min-height: 620px;
    }

    .hero-content {
        padding-bottom: 46px;
    }

    .hero-copy p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .movie-grid,
    .wide-grid,
    .compact-grid,
    .category-grid,
    .rank-preview-grid,
    .split-sections,
    .detail-content,
    .large-category-grid {
        grid-template-columns: 1fr;
    }

    .small-card {
        grid-template-columns: 92px 1fr;
    }

    .small-card img {
        width: 92px;
    }

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

    .rank-row img {
        display: none;
    }
}
