
:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --accent: #ef4444;
    --accent-dark: #b91c1c;
    --slate: #1e293b;
    --slate-dark: #0f172a;
    --radius: 22px;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.13);
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f1f5f9 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a 0%, #334155 48%, #0f172a 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

.nav-wrap,
.category-strip-inner,
.footer-grid,
.footer-bottom,
main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.nav-wrap {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.brand-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.35);
}

.brand-text {
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    background: linear-gradient(90deg, #f87171, #fecaca);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.category-strip a {
    border-radius: 12px;
    color: #e2e8f0;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link {
    padding: 10px 14px;
}

.nav-link:hover,
.nav-link.active,
.category-strip a:hover {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.9);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    padding: 8px 12px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.category-strip {
    border-top: 1px solid rgba(226, 232, 240, 0.12);
}

.category-strip-inner {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0 12px;
}

.category-strip a {
    flex: 0 0 auto;
    padding: 7px 13px;
    font-size: 0.92rem;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
}

main {
    padding: 32px 0 56px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: clamp(560px, 78vh, 760px);
    border-radius: 32px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.45), transparent 32%),
        linear-gradient(135deg, #020617 0%, #1e293b 55%, #7f1d1d 100%);
    box-shadow: var(--shadow);
}

.hero-glow {
    position: absolute;
    inset: auto -10% -25% auto;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.28);
    filter: blur(28px);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(24px, 5vw, 64px);
    align-items: center;
    padding: clamp(28px, 6vw, 78px);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-image {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 30px;
    background: linear-gradient(135deg, #334155, #991b1b);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.hero-image::after,
.poster::after,
.detail-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.72));
    pointer-events: none;
}

.poster-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 800;
    text-align: center;
    background:
        radial-gradient(circle at top left, rgba(248, 113, 113, 0.55), transparent 36%),
        linear-gradient(135deg, #334155, #991b1b);
}

.poster-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

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

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2.25rem, 6vw, 5rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-info .lead {
    max-width: 720px;
    margin: 22px 0 0;
    color: #dbe4f0;
    font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 6px 11px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(12px);
    font-size: 0.86rem;
}

.tag-list.small {
    margin-top: 14px;
}

.tag-list.small span {
    border-color: #e2e8f0;
    color: #64748b;
    background: #f8fafc;
    font-size: 0.76rem;
}

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

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

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 16px 32px rgba(239, 68, 68, 0.36);
}

.btn.ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.hero-dots {
    position: absolute;
    z-index: 4;
    right: clamp(24px, 5vw, 60px);
    bottom: clamp(24px, 5vw, 56px);
    display: flex;
    gap: 10px;
}

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

.hero-dot.active {
    width: 38px;
    background: #ffffff;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin: -38px auto 34px;
    position: relative;
    z-index: 6;
}

.stats-row div {
    min-height: 98px;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 22px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.stats-row strong {
    display: block;
    color: var(--accent);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    line-height: 1;
}

.stats-row span {
    color: var(--muted);
    font-size: 0.92rem;
}

.search-panel,
.content-section,
.text-page,
.player-section {
    margin-top: 32px;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    padding: clamp(20px, 3vw, 32px);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1fr);
    gap: 18px;
    align-items: center;
}

.search-panel h2,
.section-heading h2,
.detail-text h2 {
    margin: 0;
    color: var(--slate-dark);
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    line-height: 1.15;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 12px 14px;
    background: #f8fafc;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
}

.filter-row {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-row button {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: #475569;
    background: #e2e8f0;
    cursor: pointer;
}

.filter-row button.active,
.filter-row button:hover {
    color: #ffffff;
    background: var(--accent);
}

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

.section-more {
    color: var(--accent-dark);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #334155, #991b1b);
}

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 3;
}

.poster-badge {
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 4px 9px;
    color: #ffffff;
    background: rgba(239, 68, 68, 0.9);
    font-size: 0.78rem;
    font-weight: 800;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.78rem;
}

.movie-card h3 {
    margin: 8px 0 8px;
    color: var(--slate-dark);
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.92rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.rank-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 12px;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 16px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.rank-number {
    grid-row: span 2;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #f97316);
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    color: var(--slate-dark);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border-radius: 24px;
    padding: 22px;
    color: #ffffff;
    background: #0f172a;
    box-shadow: var(--shadow-soft);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0.88));
}

.category-card strong,
.category-card span,
.category-card em {
    position: relative;
    z-index: 2;
    display: block;
}

.category-card strong {
    margin-top: 82px;
    font-size: 1.45rem;
}

.category-card span {
    margin-top: 8px;
    color: #dbe4f0;
}

.category-card em {
    margin-top: 14px;
    font-style: normal;
    color: #fecaca;
    font-weight: 800;
}

.category-poster {
    position: absolute;
    inset: 0;
    opacity: 0.34;
}

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

.page-hero,
.detail-hero {
    overflow: hidden;
    border-radius: 30px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.45), transparent 36%),
        linear-gradient(135deg, #020617, #1e293b 56%, #7f1d1d);
    box-shadow: var(--shadow);
}

.small-hero {
    padding: clamp(34px, 6vw, 76px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: var(--accent-dark);
    font-weight: 700;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 54px);
    align-items: center;
    padding: clamp(24px, 5vw, 58px);
}

.detail-cover {
    border-radius: 26px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

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

.detail-meta div {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.detail-meta dt {
    color: #cbd5e1;
    font-size: 0.78rem;
}

.detail-meta dd {
    margin: 4px 0 0;
    color: #ffffff;
    font-weight: 800;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    gap: 12px;
    place-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.play-overlay span {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    margin: 0 auto;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 18px 40px rgba(239, 68, 68, 0.38);
}

.play-overlay.is-hidden {
    display: none;
}

.player-message {
    margin: 0;
    padding: 12px 16px;
    color: #cbd5e1;
    background: #0f172a;
    font-size: 0.9rem;
}

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

.detail-text article {
    border-radius: 20px;
    padding: 22px;
    background: #f8fafc;
}

.detail-text p,
.text-page p {
    color: #475569;
    font-size: 1.02rem;
}

.related-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 72px 70px minmax(0, 1fr) minmax(160px, 220px);
    gap: 16px;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 12px;
    background: #ffffff;
}

.ranking-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    background: linear-gradient(135deg, #334155, #991b1b);
}

.ranking-no {
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 900;
}

.ranking-main h2 {
    margin: 0 0 4px;
    font-size: 1.08rem;
}

.ranking-main p,
.ranking-meta span,
.ranking-meta em {
    display: block;
    overflow: hidden;
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-meta strong {
    display: block;
    color: var(--accent);
    font-size: 1.35rem;
}

.empty-state {
    margin: 22px 0 0;
    border-radius: 16px;
    padding: 18px;
    color: #7f1d1d;
    background: #fee2e2;
    font-weight: 700;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, #020617, #1e293b 58%, #0f172a);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr 1fr;
    gap: 28px;
    padding: 46px 0 30px;
}

.footer-grid h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.footer-grid p,
.footer-grid a {
    color: #cbd5e1;
}

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

.footer-grid li + li {
    margin-top: 8px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid rgba(226, 232, 240, 0.12);
    padding: 18px 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

[hidden] {
    display: none !important;
}

@media (max-width: 980px) {
    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        top: 68px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 18px;
        padding: 12px;
        background: #0f172a;
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .hero-slide,
    .detail-hero,
    .detail-text,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 920px;
    }

    .hero-image {
        max-width: 360px;
        margin: 0 auto;
        width: 100%;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 18px;
    }

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

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

    .ranking-cover,
    .ranking-meta {
        display: none;
    }

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

@media (max-width: 620px) {
    .nav-wrap,
    .category-strip-inner,
    .footer-grid,
    .footer-bottom,
    main {
        width: min(100% - 22px, 1280px);
    }

    .hero {
        min-height: 820px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 22px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 2.15rem;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

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

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

    .movie-card h3 {
        font-size: 0.98rem;
    }

    .movie-card p,
    .tag-list.small {
        display: none;
    }

    .detail-meta,
    .footer-grid,
    .footer-bottom {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .footer-bottom {
        display: flex;
    }
}
