:root {
    --bg: #071312;
    --panel: #0d1b1a;
    --panel-soft: #132827;
    --text: #f4fffb;
    --muted: #a8bbb7;
    --line: rgba(255, 255, 255, 0.10);
    --brand: #10b981;
    --brand-2: #14b8a6;
    --brand-3: #06b6d4;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.22), transparent 35rem),
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.20), transparent 32rem),
        var(--bg);
    color: var(--text);
}

body.nav-open {
    overflow: hidden;
}

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

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

.container,
.section-wrap,
.nav-wrap,
.footer-grid,
.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 19, 18, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--brand), var(--brand-3));
    color: white;
    box-shadow: 0 14px 36px rgba(16, 185, 129, 0.28);
}

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

.site-nav a {
    padding: 10px 15px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 15px;
    transition: 0.22s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.10);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.08);
    padding: 9px;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    border-radius: 999px;
}

.hero-carousel {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, #059669, #0f766e 52%, #0891b2);
}

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

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

.hero-img,
.detail-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: overlay;
    opacity: 0.58;
}

.hero-overlay,
.detail-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(3, 11, 10, 0.92), rgba(3, 11, 10, 0.42), rgba(3, 11, 10, 0.76)),
        radial-gradient(circle at 80% 15%, rgba(255, 255, 255, 0.20), transparent 20rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 56px 0 116px;
}

.hero-pill,
.page-hero span,
.section-head span,
.card-meta {
    color: #c9fff2;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-pill {
    display: inline-flex;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(10px);
}

.hero-content h1 {
    width: min(780px, 100%);
    margin: 18px 0 18px;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-content p {
    width: min(670px, 100%);
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.75;
}

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

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

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

.btn-light {
    color: #065f46;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(255, 255, 255, 0.17);
}

.btn-ghost {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.btn-dark {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid var(--line);
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: #d7fff5;
    font-size: 12px;
}

.hero-thumbs {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 26px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.hero-thumb {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.10);
    color: white;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    backdrop-filter: blur(14px);
}

.hero-thumb.active,
.hero-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hero-thumb span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--brand), var(--brand-3));
    font-weight: 900;
}

.hero-thumb strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.section-wrap {
    padding: 72px 0 0;
}

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

.left-head {
    align-items: center;
}

.section-head h2,
.category-overview-head h2,
.story-panel h2 {
    margin: 4px 0 0;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-head a,
.category-overview-head a {
    color: #95fff0;
    font-weight: 800;
}

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

.category-card,
.category-overview-block,
.story-panel,
.player-shell,
.filter-panel {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.category-card {
    min-height: 230px;
    padding: 20px;
    border-radius: var(--radius);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover,
.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.42);
}

.category-card span {
    color: #a7f3d0;
    font-weight: 900;
}

.category-card strong {
    display: block;
    margin: 12px 0 10px;
    font-size: 24px;
}

.category-card p {
    min-height: 70px;
    color: var(--muted);
    line-height: 1.65;
}

.category-card div {
    display: grid;
    gap: 7px;
    color: #d9fff7;
    font-size: 14px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.movie-card.hidden,
.rank-row.hidden {
    display: none;
}

.poster-wrap {
    position: relative;
    display: block;
    height: 280px;
    overflow: hidden;
    background:
        radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.16), transparent 12rem),
        linear-gradient(135deg, #064e3b, #115e59 48%, #0e7490);
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0 0;
    height: 48%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.80));
}

.poster-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    color: white;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.poster-type {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
    padding: 17px;
}

.card-body h3 {
    margin: 8px 0 9px;
    font-size: 20px;
    line-height: 1.25;
}

.card-body h3 a:hover {
    color: #9ffff0;
}

.card-body p,
.story-panel p,
.page-hero p,
.category-overview-head p,
.footer-grid p {
    color: var(--muted);
    line-height: 1.75;
}

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

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    gap: 26px;
}

.rank-list {
    display: grid;
    gap: 10px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    transition: background 0.22s ease, transform 0.22s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.11);
}

.rank-num {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(16, 185, 129, 0.15);
    color: #a7f3d0;
    font-weight: 900;
}

.rank-cover {
    width: 58px;
    height: 72px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #064e3b, #0e7490);
}

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

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-info em {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

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

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 86px 0 64px;
    background:
        radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.35), transparent 26rem),
        linear-gradient(135deg, rgba(5, 150, 105, 0.62), rgba(8, 145, 178, 0.38));
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    margin: 10px 0 16px;
    font-size: clamp(34px, 7vw, 62px);
    letter-spacing: -0.06em;
}

.page-hero p {
    width: min(760px, 100%);
    margin: 0;
    font-size: 18px;
}

.category-overview-block {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    padding: 26px;
    border-radius: var(--radius);
}

.filter-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 20px;
}

.search-box {
    flex: 1 1 320px;
    display: grid;
    gap: 7px;
    color: #ccfff6;
    font-weight: 800;
}

.search-box input,
.filter-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    background: rgba(0, 0, 0, 0.24);
    color: var(--text);
    padding: 0 14px;
    font: inherit;
}

.filter-select {
    flex: 0 1 190px;
}

.detail-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    background: linear-gradient(135deg, #064e3b, #115e59 45%, #083344);
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    padding: 74px 0;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 26px;
    background: linear-gradient(135deg, #064e3b, #0e7490);
    box-shadow: var(--shadow);
}

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

.breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #d9fff7;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: white;
}

.detail-info h1 {
    margin: 18px 0;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.detail-one-line {
    width: min(760px, 100%);
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
    line-height: 1.75;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #effffb;
    font-weight: 800;
}

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

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    gap: 24px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: white;
    background:
        radial-gradient(circle at 50% 45%, rgba(16, 185, 129, 0.22), transparent 15rem),
        rgba(0, 0, 0, 0.52);
    cursor: pointer;
    text-align: center;
}

.player-cover.hidden {
    display: none;
}

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-3));
    box-shadow: 0 20px 55px rgba(16, 185, 129, 0.35);
}

.play-icon::before {
    content: "";
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid white;
}

.player-cover strong {
    font-size: 24px;
}

.player-cover em {
    color: #c9fff2;
    font-style: normal;
    font-weight: 800;
}

.story-panel {
    padding: 26px;
    border-radius: 26px;
}

.story-panel h2:first-child {
    margin-top: 0;
}

.story-panel h2 {
    font-size: 24px;
    margin: 26px 0 10px;
}

.site-footer {
    margin-top: 80px;
    padding: 48px 0 22px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.18);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.7fr 0.7fr;
    gap: 28px;
}

.footer-grid h3 {
    margin: 0 0 14px;
}

.footer-grid a:not(.footer-brand) {
    display: block;
    margin: 9px 0;
    color: var(--muted);
}

.footer-grid a:hover {
    color: #9ffff0;
}

.footer-bottom {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

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

    .split-section,
    .detail-content {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 760px) {
    .mobile-menu-button {
        display: block;
    }

    .site-nav {
        position: fixed;
        inset: 72px 16px auto 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(7, 19, 18, 0.96);
        box-shadow: var(--shadow);
    }

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

    .hero-carousel,
    .hero-content {
        min-height: 640px;
    }

    .hero-content {
        padding: 46px 0 170px;
    }

    .hero-thumbs {
        grid-template-columns: 1fr;
        max-height: 150px;
        overflow: auto;
    }

    .category-grid,
    .movie-grid,
    .side-card-grid,
    .preview-grid,
    .full-rank,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .poster-wrap {
        height: 330px;
    }

    .detail-layout {
        grid-template-columns: 1fr;
        padding: 48px 0;
    }

    .detail-poster {
        width: min(260px, 76vw);
    }

    .detail-content {
        padding-top: 32px;
    }
}
