:root {
    --bg: #0f172a;
    --bg-deep: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(245, 158, 11, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #f59e0b;
    --accent-strong: #ea580c;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.16), transparent 34rem),
        radial-gradient(circle at 82% 20%, rgba(234, 88, 12, 0.12), transparent 30rem),
        linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 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 {
    display: block;
    max-width: 100%;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 14px 36px rgba(245, 158, 11, 0.28);
    transform: translateZ(0);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.06);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 24px;
    letter-spacing: 0.04em;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: var(--soft);
    font-weight: 600;
}

.main-nav a {
    position: relative;
    transition: color 0.2s ease;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fbbf24;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: scaleX(1);
}

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

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
    border-radius: 2px;
}

.hero {
    position: relative;
    height: clamp(560px, 76vh, 820px);
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.62) 42%, rgba(15, 23, 42, 0.12) 100%),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.2) 46%, rgba(2, 6, 23, 0.7) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 13%;
    transform: translateX(-50%);
    max-width: 1180px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 18px;
    padding: 6px 14px;
    border: 1px solid rgba(251, 191, 36, 0.42);
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(245, 158, 11, 0.82);
    box-shadow: 0 10px 36px rgba(245, 158, 11, 0.18);
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 28px;
    color: #e2e8f0;
    font-size: clamp(16px, 2vw, 20px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 20px;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 12px;
    color: #fff;
    background: rgba(30, 41, 59, 0.78);
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(251, 191, 36, 0.7);
}

.btn.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.22);
}

.btn.ghost {
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(10px);
}

.btn.wide {
    width: 100%;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: #fff;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(12px);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 6;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 32px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.search-panel {
    margin-top: -38px;
    position: relative;
    z-index: 10;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-box.in-page {
    margin-bottom: 24px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 13px;
    color: #fff;
    background: rgba(2, 6, 23, 0.58);
    padding: 0 16px;
    outline: none;
    font-size: 16px;
}

.search-box input:focus {
    border-color: rgba(251, 191, 36, 0.62);
}

.search-box a {
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    font-weight: 700;
}

.section-block,
.page-main,
.detail-main,
.split-section {
    padding-top: 58px;
    padding-bottom: 24px;
}

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

.section-head h1,
.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.12;
}

.section-head p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
}

.section-more,
.text-link {
    color: #fbbf24;
    font-weight: 700;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 48px rgba(2, 6, 23, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.42);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(245, 158, 11, 0.24), transparent),
        linear-gradient(135deg, #1e293b, #020617);
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.78) 100%);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 800;
}

.play-dot {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.24);
}

.movie-info {
    padding: 16px;
}

.movie-info h2 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.28;
}

.movie-info h2 a:hover {
    color: #fbbf24;
}

.meta-line,
.summary-line {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
}

.summary-line {
    display: -webkit-box;
    overflow: hidden;
    min-height: 42px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--soft);
}

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

.tag-row span,
.detail-tags a {
    padding: 4px 8px;
    border: 1px solid rgba(251, 191, 36, 0.18);
    border-radius: 999px;
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.08);
    font-size: 12px;
}

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

.category-card,
.category-wide {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card {
    display: flex;
    flex-direction: column;
    min-height: 210px;
    padding: 16px;
}

.category-card:hover,
.category-wide:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, 0.38);
}

.category-cover,
.category-wide-cover {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 14px;
}

.category-cover img,
.category-wide-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
    background: #1e293b;
}

.category-card strong {
    margin-bottom: 6px;
    font-size: 20px;
}

.category-card em,
.category-wide p {
    color: var(--muted);
    font-style: normal;
    font-size: 14px;
}

.category-wide-grid {
    display: grid;
    gap: 18px;
}

.category-wide {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    padding: 18px;
}

.category-wide h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    align-items: start;
}

.hot-board {
    position: sticky;
    top: 96px;
    padding: 22px;
    border: 1px solid rgba(251, 191, 36, 0.18);
    border-radius: var(--radius);
    background: rgba(2, 6, 23, 0.76);
    box-shadow: var(--shadow);
}

.hot-board h2 {
    margin: 0 0 16px;
}

.hot-board ol {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.rank-item a {
    display: grid;
    grid-template-columns: 38px 54px 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.6);
}

.rank-no {
    color: #fbbf24;
    font-weight: 900;
}

.rank-item img {
    width: 54px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    background: #1e293b;
}

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

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

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-main {
    padding-top: 34px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 34px;
    align-items: end;
    padding: 28px;
    border: 1px solid rgba(251, 191, 36, 0.16);
    border-radius: 28px;
    background:
        radial-gradient(circle at 92% 6%, rgba(245, 158, 11, 0.16), transparent 30rem),
        rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(135deg, #1e293b, #020617);
    box-shadow: 0 20px 58px rgba(2, 6, 23, 0.45);
}

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

.detail-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
}

.detail-one-line {
    max-width: 760px;
    margin: 0 0 18px;
    color: #e2e8f0;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.86);
    color: var(--soft);
    font-size: 13px;
}

.player-section,
.detail-section {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.player-section h2,
.detail-section h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-section p {
    margin: 0;
    color: #dbeafe;
    font-size: 17px;
}

.player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 18rem),
        #020617;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.76));
    cursor: pointer;
}

.player.is-playing .player-cover {
    opacity: 0;
    pointer-events: none;
}

.player-icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 18px 52px rgba(245, 158, 11, 0.35);
    font-size: 34px;
}

.player-message {
    position: absolute;
    left: 18px;
    bottom: 14px;
    z-index: 4;
    margin: 0;
    color: #fef3c7;
    font-size: 13px;
}

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

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

.ranking-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    padding: 16px;
}

.ranking-poster {
    position: relative;
    display: block;
}

.ranking-poster span {
    position: absolute;
    left: -8px;
    top: -8px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    font-weight: 900;
}

.ranking-poster img {
    width: 150px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
    background: #1e293b;
}

.ranking-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.ranking-card p {
    color: var(--soft);
}

.no-result {
    display: none;
    margin: 24px 0;
    padding: 18px;
    border-radius: 16px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.7);
    text-align: center;
}

.no-result.is-visible {
    display: block;
}

.site-footer {
    margin-top: 64px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 6, 23, 0.82);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    padding: 44px 0;
}

.footer-grid p,
.footer-grid a {
    color: var(--muted);
}

.footer-grid a {
    display: block;
    margin: 8px 0;
}

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

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

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

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

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

    .hot-board {
        position: static;
    }
}

@media (max-width: 780px) {
    .header-inner {
        min-height: 66px;
    }

    .brand-text strong {
        font-size: 20px;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
    }

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

    .main-nav a {
        padding: 12px;
        border-radius: 12px;
    }

    .main-nav a:hover,
    .main-nav a.active {
        background: rgba(30, 41, 59, 0.78);
    }

    .main-nav a::after {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .hero {
        height: 620px;
    }

    .hero-content {
        bottom: 18%;
    }

    .hero-arrow {
        display: none;
    }

    .search-box {
        flex-direction: column;
        align-items: stretch;
    }

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

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

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

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 18px;
    }

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

    .ranking-card {
        grid-template-columns: 110px 1fr;
    }

    .ranking-poster img {
        width: 110px;
    }

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

@media (max-width: 520px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        height: 580px;
    }

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

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .movie-grid,
    .movie-grid.compact,
    .movie-grid.large-list,
    .related-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .ranking-card {
        grid-template-columns: 92px 1fr;
        gap: 14px;
    }

    .ranking-poster img {
        width: 92px;
    }
}
