:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #2563eb;
    --brand-deep: #1e3a8a;
    --accent: #38bdf8;
    --dark: #020617;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

img.is-missing {
    opacity: 0;
}

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
}

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

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

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

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

.site-nav a {
    padding: 9px 12px;
    color: #334155;
    border-radius: 999px;
    font-size: 15px;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
    color: var(--brand);
    background: #eff6ff;
}

.header-search {
    display: flex;
    align-items: center;
    width: 280px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.header-search input,
.hero-search input,
.toolbar input,
.toolbar select {
    border: 0;
    outline: 0;
    background: transparent;
}

.header-search input {
    min-width: 0;
    flex: 1;
    padding: 8px 10px 8px 14px;
    font-size: 14px;
}

.header-search button,
.hero-search button {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: var(--brand);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    margin-left: auto;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
    border-radius: 2px;
}

.home-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 15%, rgba(56, 189, 248, 0.42), transparent 30%),
        radial-gradient(circle at 80% 8%, rgba(37, 99, 235, 0.38), transparent 30%),
        linear-gradient(135deg, #020617 0%, #0f275d 48%, #020617 100%);
    padding: 82px 0 58px;
}

.hero-grid,
.page-hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: linear-gradient(to bottom, #000000, transparent 85%);
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-stage {
    position: relative;
    min-height: 530px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.78fr);
    align-items: center;
    gap: 46px;
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    max-width: 780px;
}

.hero-desc {
    max-width: 720px;
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 22px);
}

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

.section-kicker::before {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    padding: 6px 11px;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-actions,
.detail-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.34);
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.09);
}

.btn-soft {
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.22);
}

.btn-light {
    color: var(--brand-deep);
    background: #ffffff;
}

.hero-poster {
    position: relative;
    display: block;
    min-height: 450px;
    overflow: hidden;
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.6), rgba(56, 189, 248, 0.24));
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.5);
    isolation: isolate;
}

.hero-poster::after,
.cover-frame::after,
.detail-poster::after,
.rank-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.74), transparent 54%);
    pointer-events: none;
}

.hero-poster img {
    transition: transform 0.55s ease;
}

.hero-poster:hover img {
    transform: scale(1.05);
}

.hero-poster span {
    position: absolute;
    left: 24px;
    bottom: 22px;
    z-index: 2;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    color: #ffffff;
    font-weight: 800;
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 6px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #ffffff;
}

.hero-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(720px, 100%);
    margin-top: 34px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    color: #ffffff;
    padding: 12px 16px;
}

.hero-search input::placeholder {
    color: #cbd5e1;
}

.hero-channel-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero-channel-links a {
    color: #dbeafe;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

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

.section-muted {
    background: #eef4fb;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.story-card h2 {
    margin: 0;
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 46px);
}

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

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

.category-tile,
.category-panel,
.story-card {
    background: var(--panel);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.category-tile {
    min-height: 150px;
    padding: 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.rank-item:hover,
.category-panel:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-tile span,
.category-panel-title {
    display: block;
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 10px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.84);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cover-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.cover-frame img {
    transition: transform 0.32s ease;
}

.movie-card:hover .cover-frame img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    border-radius: 999px;
    padding: 5px 9px;
    font-weight: 800;
    font-size: 12px;
}

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

.card-tags {
    margin-bottom: 8px;
}

.card-tags span {
    color: var(--brand-deep);
    background: #eff6ff;
    border-color: #dbeafe;
    padding: 4px 8px;
    font-size: 12px;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-content h3 a:hover,
.category-sample a:hover {
    color: var(--brand);
}

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

.card-meta,
.rank-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta {
    justify-content: space-between;
}

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

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

.rank-item {
    position: relative;
    display: grid;
    grid-template-columns: 92px 48px 1fr;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.86);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-cover {
    position: relative;
    height: 120px;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.rank-number {
    color: var(--brand);
    font-size: 28px;
    font-weight: 950;
}

.rank-content h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-content p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    padding: 76px 0;
    background:
        radial-gradient(circle at 82% 18%, rgba(56, 189, 248, 0.34), transparent 32%),
        linear-gradient(135deg, #020617 0%, #1e3a8a 62%, #020617 100%);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
}

.page-hero h1 {
    font-size: clamp(38px, 6vw, 66px);
    margin-bottom: 18px;
}

.page-hero p {
    margin: 0;
    color: #dbeafe;
    font-size: 19px;
}

.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 10px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.toolbar input,
.toolbar select {
    min-height: 46px;
    border-radius: 16px;
    background: var(--panel-soft);
    padding: 0 14px;
}

.toolbar input {
    flex: 1;
}

.toolbar select {
    min-width: 170px;
    color: var(--text);
}

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

.category-panel {
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-sample {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.category-sample a {
    color: var(--brand-deep);
    background: #eff6ff;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 14px;
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 34px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    filter: blur(18px);
    transform: scale(1.06);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #020617 20%, rgba(2, 6, 23, 0.7), #020617 90%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 34px 0 60px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: #bfdbfe;
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 38px;
    align-items: end;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

.detail-poster span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    font-weight: 900;
}

.detail-info h1 {
    font-size: clamp(40px, 6vw, 76px);
    max-width: 920px;
}

.detail-one-line {
    max-width: 900px;
    color: #dbeafe;
    font-size: 20px;
}

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

.detail-meta span {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 7px 11px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.22);
}

.player-frame video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    border: 0;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.22), rgba(2, 6, 23, 0.58));
    transition: opacity 0.2s ease;
}

.player-frame.is-active .play-layer {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.38);
    position: relative;
}

.play-icon::after {
    content: "";
    position: absolute;
    left: 32px;
    top: 24px;
    border-left: 22px solid #ffffff;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
}

.player-error {
    display: none;
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 4;
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.88);
    font-size: 14px;
}

.player-frame.is-error .player-error {
    display: block;
}

.content-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.72fr);
    gap: 22px;
}

.story-card {
    padding: 28px;
}

.story-card h2 {
    font-size: 28px;
    margin-bottom: 18px;
}

.story-card p {
    margin: 0 0 14px;
    color: #334155;
}

.side-card {
    align-self: start;
}

.site-footer {
    color: #cbd5e1;
    background: #020617;
    padding: 48px 0;
}

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

.footer-logo {
    color: #ffffff;
    font-size: 24px;
}

.footer-inner p {
    max-width: 520px;
    color: #94a3b8;
}

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

.footer-links a {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 9px 12px;
}

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

    .hero-slide,
    .detail-layout,
    .content-columns,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .hero-poster {
        min-height: 380px;
    }

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

    .category-panel-grid,
    .rank-grid,
    .rank-grid-wide {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(300px, 100%);
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .header-inner {
        min-height: 64px;
        flex-wrap: wrap;
    }

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

    .site-nav {
        display: none;
        width: 100%;
        order: 4;
        padding: 10px 0 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        background: #f8fafc;
    }

    .home-hero {
        padding-top: 54px;
    }

    .hero-stage {
        min-height: 710px;
    }

    .hero-slide {
        gap: 24px;
    }

    .hero-copy h1,
    .detail-info h1 {
        font-size: 40px;
    }

    .hero-search,
    .toolbar {
        border-radius: 18px;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search button,
    .header-search button,
    .toolbar select {
        width: 100%;
    }

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

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

    .rank-item {
        grid-template-columns: 78px 38px 1fr;
        gap: 10px;
    }

    .rank-cover {
        height: 102px;
    }

    .rank-number {
        font-size: 22px;
    }

    .page-hero,
    .section-block {
        padding: 48px 0;
    }
}

@media (max-width: 460px) {
    .category-grid,
    .movie-grid,
    .movie-grid-compact {
        grid-template-columns: 1fr;
    }

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

    .hero-poster {
        min-height: 320px;
    }

    .movie-card p {
        min-height: auto;
    }
}
