:root {
    --bg: #07111f;
    --bg-soft: #0c1b31;
    --panel: rgba(13, 27, 49, 0.88);
    --panel-solid: #10213a;
    --text: #f8fafc;
    --muted: #a8b3c7;
    --line: rgba(148, 163, 184, 0.18);
    --brand: #f97316;
    --brand-2: #38bdf8;
    --brand-3: #2563eb;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.34), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.22), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), #facc15);
    color: #111827;
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #dbeafe;
    font-size: 15px;
}

.nav-links a {
    padding: 9px 0;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--brand);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    cursor: pointer;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7, 17, 31, 0.28), var(--bg)),
        radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.3), transparent 32rem);
}

.hero-inner {
    position: relative;
    padding: 76px 0 56px;
}

.hero-track {
    position: relative;
    min-height: 510px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
    align-items: center;
    gap: 46px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(22px) scale(0.98);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: -80px -60px;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(7, 17, 31, 0.86), rgba(7, 17, 31, 0.48), rgba(7, 17, 31, 0.92)),
        var(--hero-image) center / cover no-repeat;
    filter: blur(2px) saturate(1.08);
    opacity: 0.72;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 12px;
    padding: 7px 12px;
    border: 1px solid rgba(249, 115, 22, 0.32);
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.12);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.hero-copy p {
    max-width: 680px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: clamp(18px, 2vw, 22px);
}

.hero-actions,
.detail-actions,
.side-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    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 {
    background: linear-gradient(135deg, var(--brand), #facc15);
    color: #111827;
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.28);
}

.btn-soft {
    border: 1px solid rgba(219, 234, 254, 0.2);
    background: rgba(15, 23, 42, 0.55);
    color: #e0f2fe;
}

.hero-poster {
    position: relative;
    justify-self: end;
    width: min(100%, 390px);
    border-radius: 30px;
    overflow: hidden;
    background: var(--panel-solid);
    box-shadow: var(--shadow);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.hero-dots {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.hero-dots button {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 58px;
    background: var(--brand);
}

.intro-block,
.section-block {
    padding: 54px 0;
}

.intro-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
    align-items: center;
    gap: 30px;
}

.intro-block h2,
.section-head h2,
.side-panel h2,
.story-card h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.intro-block p,
.section-head p,
.side-panel p,
.page-hero p,
.story-card p,
.detail-one-line {
    color: var(--muted);
}

.search-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.search-panel input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    padding: 10px 12px;
}

.search-panel button {
    border: 0;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.16);
    color: #bae6fd;
    padding: 10px 16px;
    cursor: pointer;
}

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

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

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

.category-tile,
.category-card a,
.side-panel,
.story-card {
    display: block;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.82));
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.18);
}

.category-tile {
    padding: 18px;
    overflow: hidden;
}

.category-tile span,
.category-card h2 {
    display: block;
    font-weight: 900;
    font-size: 20px;
}

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

.tile-images,
.category-card-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.tile-images img,
.category-card-images img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.category-card a {
    padding: 18px;
}

.category-card span {
    color: #fed7aa;
    font-weight: 800;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.16);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(249, 115, 22, 0.42);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.3);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.rank-num {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), #facc15);
    color: #111827;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: #93c5fd;
    font-size: 12px;
    font-weight: 800;
}

.card-meta span,
.card-meta a,
.detail-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.15);
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.12);
    color: #fed7aa;
    font-size: 12px;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

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

.rank-link {
    display: grid;
    grid-template-columns: 34px 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-link b {
    color: var(--brand);
    font-size: 18px;
}

.rank-link img {
    width: 58px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
}

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

.rank-link em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.side-panel {
    position: sticky;
    top: 92px;
    padding: 24px;
}

.page-hero {
    padding: 72px 0 46px;
    background:
        linear-gradient(180deg, rgba(8, 20, 38, 0.3), rgba(8, 20, 38, 0.95)),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.24), transparent 30rem);
    border-bottom: 1px solid var(--line);
}

.page-hero .search-panel {
    max-width: 600px;
    margin-top: 24px;
}

.category-page-hero,
.ranking-page-hero {
    min-height: 290px;
}

.related-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.related-categories a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #dbeafe;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 62px 0;
    background:
        linear-gradient(90deg, rgba(7, 17, 31, 0.95), rgba(7, 17, 31, 0.68), rgba(7, 17, 31, 0.96)),
        var(--hero-image) center / cover no-repeat;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 120px;
    background: linear-gradient(180deg, transparent, var(--bg));
}

.detail-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

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

.detail-one-line {
    max-width: 780px;
    font-size: 19px;
}

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

.player-section {
    padding: 38px 0 20px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.video-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.2), rgba(2, 6, 23, 0.35));
    color: #111827;
    cursor: pointer;
}

.video-start span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    padding-left: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), #facc15);
    box-shadow: 0 22px 50px rgba(249, 115, 22, 0.34);
    font-size: 34px;
}

.video-shell.is-playing .video-start {
    opacity: 0;
    pointer-events: none;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 26px 0 24px;
}

.story-card {
    padding: 24px;
}

.story-card p {
    margin: 14px 0 0;
    font-size: 17px;
}

.pager-links {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.pager-links a {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    color: #dbeafe;
    font-weight: 800;
    text-align: center;
}

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

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

.site-footer {
    margin-top: 48px;
    padding: 38px 0;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.46);
    color: var(--muted);
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-grid strong {
    display: block;
    color: var(--text);
    font-size: 20px;
}

.footer-grid p {
    max-width: 650px;
    margin: 8px 0 0;
}

.footer-links {
    display: flex;
    gap: 16px;
    color: #fdba74;
    font-weight: 800;
}

.is-hidden {
    display: none !important;
}

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

    .split-layout {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }
}

@media (max-width: 840px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(7, 17, 31, 0.96);
    }

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

    .hero {
        min-height: 760px;
    }

    .hero-slide,
    .intro-block,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        justify-self: start;
        width: min(100%, 260px);
    }

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

    .rank-list {
        grid-template-columns: 1fr;
    }

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

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

    .hero-inner {
        padding-top: 42px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 38px;
    }

    .hero {
        min-height: 720px;
    }

    .search-panel {
        border-radius: 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .category-grid,
    .category-overview-grid,
    .movie-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 260px;
    }

    .video-start span {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
