:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: #111827;
    --bg-light: #f8fafc;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --dark-text: #0f172a;
    --emerald: #10b981;
    --emerald-light: #34d399;
    --cyan: #22d3ee;
    --border: rgba(148, 163, 184, 0.22);
    --shadow: 0 22px 70px rgba(2, 6, 23, 0.24);
    --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", "Microsoft YaHei", sans-serif;
    background: var(--bg-light);
    color: var(--dark-text);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: #ffffff;
    background: linear-gradient(90deg, #020617, #111827 52%, #0f172a);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 12px 35px rgba(2, 6, 23, 0.34);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 68px;
}

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

.logo span:last-child,
.footer-logo span:last-child {
    background: linear-gradient(90deg, var(--emerald-light), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.14);
    color: var(--emerald-light);
    box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.24);
    font-size: 15px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
    font-size: 15px;
}

.desktop-nav a,
.mobile-nav a {
    color: rgba(255, 255, 255, 0.82);
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--emerald-light);
}

.header-search {
    display: flex;
    align-items: center;
    width: 295px;
    padding: 4px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
}

.header-search input,
.mobile-nav input,
.hero-search input,
.search-panel input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
}

.header-search input {
    padding: 9px 12px;
    color: #ffffff;
}

.header-search button,
.mobile-nav button,
.hero-search button,
.search-panel button {
    border: 0;
    border-radius: 999px;
    background: var(--emerald);
    color: #ffffff;
    font-weight: 700;
    white-space: nowrap;
    transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button {
    padding: 8px 14px;
}

.header-search button:hover,
.mobile-nav button:hover,
.hero-search button:hover,
.search-panel button:hover,
.primary-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 26px;
}

.mobile-nav {
    display: none;
    padding: 14px 16px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: #020617;
}

.mobile-nav.is-open {
    display: grid;
    gap: 12px;
}

.mobile-nav form {
    display: flex;
    gap: 8px;
    padding: 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
}

.mobile-nav input {
    padding: 9px 12px;
    color: #ffffff;
}

.mobile-nav button {
    padding: 8px 15px;
}

.hero-section {
    position: relative;
    overflow: hidden;
    padding: 38px 0 54px;
    color: #ffffff;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.22), transparent 34%),
        radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.18), transparent 30%),
        linear-gradient(135deg, #020617, #0f172a 58%, #111827);
}

.hero-wrap {
    display: grid;
    gap: 24px;
}

.hero-heading {
    max-width: 780px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--emerald-light);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-heading h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero-heading p:not(.eyebrow),
.page-hero p:not(.eyebrow) {
    max-width: 730px;
    margin: 14px 0 0;
    color: rgba(226, 232, 240, 0.82);
    font-size: 17px;
}

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

.hero-slider {
    position: relative;
    min-height: 480px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: center;
    gap: 28px;
    padding: 54px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-copy h2 {
    max-width: 650px;
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 66px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.hero-copy p:not(.eyebrow) {
    max-width: 620px;
    margin: 0;
    color: rgba(226, 232, 240, 0.88);
    font-size: 18px;
}

.hero-tags,
.mini-tags,
.genre-line,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.genre-line span,
.tag-cloud a,
.mini-tags span {
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    padding: 7px 12px;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.2);
    box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.28);
}

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

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

.primary-btn {
    color: #ffffff;
    background: var(--emerald);
    box-shadow: 0 16px 35px rgba(16, 185, 129, 0.24);
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(12px);
}

.ghost-btn.dark {
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.16);
    background: rgba(255, 255, 255, 0.76);
}

.ghost-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(52, 211, 153, 0.86);
}

.hero-poster {
    display: block;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #111827;
}

.hero-controls {
    position: absolute;
    left: 54px;
    bottom: 30px;
    display: flex;
    gap: 10px;
    z-index: 3;
}

.hero-dot {
    width: 36px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

.hero-dot.is-active {
    background: var(--emerald-light);
}

.hero-side {
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-side h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.compact-grid {
    display: grid;
    gap: 14px;
}

.compact-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, background 0.2s ease;
}

.compact-card:hover {
    transform: translateY(-2px);
    background: rgba(16, 185, 129, 0.15);
}

.compact-card img {
    width: 92px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.compact-card span {
    color: #ffffff;
    font-weight: 800;
    line-height: 1.35;
}

.hero-search {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 820px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

.hero-search input {
    padding: 13px 18px;
    color: #ffffff;
}

.hero-search button,
.search-panel button {
    padding: 13px 24px;
}

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

.alt-section {
    background: #e2e8f0;
}

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

.section-title-row h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-title-row a {
    color: #047857;
    font-weight: 800;
}

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

.category-tile {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 20px;
    border-radius: 22px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    color: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.2);
}

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile em {
    max-width: 230px;
    color: rgba(255, 255, 255, 0.78);
    font-style: normal;
    font-size: 13px;
}

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

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

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

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

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

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

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

.quality-badge,
.duration-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(8px);
}

.quality-badge {
    left: 10px;
    top: 10px;
    padding: 5px 9px;
    color: #d1fae5;
}

.duration-badge {
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
}

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

.card-meta,
.detail-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.card-meta a,
.category-pill {
    color: #047857;
    font-weight: 900;
}

.movie-card h3 {
    margin: 9px 0 8px;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.28;
}

.movie-card h3 a:hover {
    color: #059669;
}

.movie-card p {
    min-height: 52px;
    margin: 0 0 12px;
    color: #475569;
    font-size: 14px;
}

.mini-tags span {
    padding: 4px 8px;
}

.two-column-section {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 28px;
}

.compact-title {
    margin-bottom: 18px;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-row {
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.rank-link {
    display: grid;
    grid-template-columns: 46px 74px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
}

.rank-index {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    font-weight: 900;
}

.rank-link img {
    width: 74px;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    object-fit: cover;
    background: #111827;
}

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

.rank-info strong {
    display: block;
    color: #0f172a;
    line-height: 1.25;
}

.rank-info em {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 13px;
    font-style: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-heat {
    color: #059669;
    font-size: 13px;
    font-weight: 900;
}

.page-shell {
    min-height: 65vh;
    background: #f8fafc;
}

.page-hero {
    padding: 38px 0 54px;
    color: #ffffff;
    background:
        radial-gradient(circle at 12% 10%, rgba(16, 185, 129, 0.2), transparent 30%),
        linear-gradient(135deg, #020617, #0f172a 68%, #111827);
}

.soft-hero {
    color: #0f172a;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 34%),
        linear-gradient(135deg, #ffffff, #e2e8f0);
}

.soft-hero p:not(.eyebrow) {
    color: #475569;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: #047857;
    font-weight: 800;
}

.sort-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sort-tabs a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.rank-hero {
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.2), transparent 30%),
        linear-gradient(135deg, #020617, #111827);
}

.full-rank-list .rank-link {
    grid-template-columns: 54px 90px minmax(0, 1fr) 88px;
}

.search-panel {
    display: flex;
    gap: 10px;
    max-width: 780px;
    margin-top: 24px;
    padding: 10px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 16px 46px rgba(15, 23, 42, 0.1);
}

.search-panel input {
    padding: 13px 18px;
    color: #0f172a;
}

.detail-breadcrumb-wrap {
    padding-top: 28px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
    padding-bottom: 24px;
}

.detail-main-card,
.poster-panel,
.side-panel {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.1);
    overflow: hidden;
}

.video-frame {
    position: relative;
    overflow: hidden;
    background: #000000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.18), rgba(2, 6, 23, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-circle {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 18px 45px rgba(16, 185, 129, 0.34);
    font-size: 28px;
}

.detail-content {
    padding: 28px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 13px;
    border-radius: 999px;
    background: #d1fae5;
}

.detail-content h1 {
    margin: 14px 0 12px;
    color: #0f172a;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.one-line {
    margin: 0 0 18px;
    color: #334155;
    font-size: 18px;
}

.detail-stats span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
}

.genre-line {
    margin-top: 18px;
}

.genre-line span,
.tag-cloud a {
    padding: 7px 12px;
}

.text-section {
    margin-top: 28px;
}

.text-section h2,
.poster-panel h2,
.side-panel h2 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 22px;
}

.text-section p,
.poster-panel p {
    margin: 0;
    color: #475569;
    white-space: pre-line;
}

.detail-aside {
    display: grid;
    gap: 20px;
    position: sticky;
    top: 88px;
}

.poster-panel,
.side-panel {
    padding: 18px;
}

.poster-panel img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
    background: #111827;
    margin-bottom: 16px;
}

.full-btn {
    width: 100%;
    margin-top: 18px;
}

.single-column .compact-card {
    grid-template-columns: 90px 1fr;
    background: #f8fafc;
}

.single-column .compact-card span {
    color: #0f172a;
}

.site-footer {
    padding: 54px 0 24px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 32px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer p {
    margin: 14px 0 0;
    color: #94a3b8;
}

.site-footer ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: var(--emerald-light);
}

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    color: #64748b;
    font-size: 14px;
}

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

    .hero-layout,
    .detail-layout,
    .two-column-section {
        grid-template-columns: 1fr;
    }

    .hero-side,
    .detail-aside {
        position: static;
    }

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

@media (max-width: 900px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 34px 24px 88px;
    }

    .hero-poster {
        display: none;
    }

    .hero-slider {
        min-height: 500px;
    }

    .hero-controls {
        left: 24px;
    }

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

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

    .hero-section {
        padding-top: 28px;
    }

    .hero-heading h1,
    .page-hero h1 {
        font-size: 32px;
    }

    .hero-copy h2 {
        font-size: 36px;
    }

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

    .movie-grid,
    .all-grid,
    .compact-movie-grid,
    .category-grid,
    .footer-grid,
    .hero-side .compact-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-link,
    .full-rank-list .rank-link {
        grid-template-columns: 42px 70px minmax(0, 1fr);
    }

    .rank-heat {
        display: none;
    }

    .detail-content {
        padding: 22px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
    }
}
