:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --emerald: #34d399;
    --emerald-strong: #10b981;
    --amber: #f59e0b;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(16, 185, 129, 0.18), transparent 32%),
        radial-gradient(circle at 82% 0%, rgba(14, 165, 233, 0.13), transparent 30%),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.header-inner {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), #67e8f9);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.35);
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    font-size: 14px;
    color: var(--soft);
    white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.65);
    color: var(--text);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    color: var(--soft);
}

.mobile-nav.open {
    display: grid;
}

.hero-wrap {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    min-height: 78vh;
    gap: 20px;
    padding: 20px;
}

.hero-stage {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    border-radius: 30px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

.hero-slide.active {
    opacity: 1;
}

.hero-bg,
.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.64;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.12)),
        linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.72));
}

.hero-content {
    position: absolute;
    left: clamp(24px, 7vw, 92px);
    top: 50%;
    transform: translateY(-50%);
    max-width: 660px;
    z-index: 2;
}

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(52, 211, 153, 0.28);
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.12);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1;
}

.hero-content h1 {
    margin: 22px 0 16px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.95;
    letter-spacing: -0.08em;
}

.hero-content p {
    max-width: 620px;
    color: var(--soft);
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.8;
}

.hero-actions,
.detail-text .btn {
    margin-top: 26px;
}

.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 {
    color: #04111b;
    background: linear-gradient(135deg, var(--emerald), #67e8f9);
    box-shadow: 0 16px 38px rgba(16, 185, 129, 0.32);
}

.btn.ghost {
    margin-left: 10px;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.48);
}

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.42);
    cursor: pointer;
    font-size: 28px;
    backdrop-filter: blur(10px);
}

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

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

.hero-dots {
    position: absolute;
    z-index: 4;
    left: clamp(24px, 7vw, 92px);
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 32px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.26);
    cursor: pointer;
}

.hero-dots button.active {
    width: 54px;
    background: var(--emerald);
}

.hero-rank {
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 22px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
    align-self: stretch;
    overflow: hidden;
}

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

.panel-title span,
.section-head h2 {
    font-weight: 900;
}

.panel-title a,
.section-head a {
    color: var(--emerald);
    font-size: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.rank-num {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #052e2b;
    background: var(--emerald);
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.rank-meta {
    grid-column: 2;
    color: var(--muted);
    font-size: 13px;
}

.search-band {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 20px;
    align-items: center;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(6, 78, 59, 0.42));
}

.search-band h2,
.search-band p {
    margin: 0;
}

.search-band h2 {
    font-size: 28px;
    letter-spacing: -0.05em;
}

.search-band p {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.7;
}

.home-search,
.search-page-box,
.filter-panel {
    display: flex;
    gap: 10px;
}

.home-search input,
.search-page-box input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 0 14px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.54);
    outline: none;
}

.home-search button,
.search-page-box button {
    min-width: 88px;
    border: 0;
    border-radius: 15px;
    color: #04111b;
    background: var(--emerald);
    font-weight: 900;
    cursor: pointer;
}

.section {
    padding: 70px 0 0;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--emerald);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.06em;
}

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

.category-tile,
.category-overview-card a {
    display: block;
    min-height: 164px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0%, rgba(52, 211, 153, 0.18), transparent 38%),
        rgba(15, 23, 42, 0.76);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover,
.category-overview-card a:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 211, 153, 0.5);
}

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

.category-tile strong,
.category-overview-card strong {
    display: block;
    margin: 10px 0;
    color: var(--emerald);
}

.category-tile p,
.category-overview-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

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

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

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.45);
    box-shadow: 0 24px 62px rgba(0, 0, 0, 0.32);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 10%, rgba(52, 211, 153, 0.22), transparent 38%),
        linear-gradient(135deg, #0f172a, #020617);
}

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.82));
}

.rank-badge {
    position: absolute;
    z-index: 3;
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--amber);
    color: #111827;
}

.card-body {
    padding: 15px;
}

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

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

.card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta strong {
    margin-left: auto;
    color: var(--amber);
}

.page-main,
.detail-main {
    min-height: 70vh;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding: 54px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at 80% 0%, rgba(52, 211, 153, 0.2), transparent 36%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.9));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 62px);
    letter-spacing: -0.08em;
}

.page-hero p {
    max-width: 760px;
    color: var(--soft);
    line-height: 1.8;
    font-size: 17px;
}

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

.crumbs a {
    color: var(--emerald);
}

.filter-panel {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
}

.filter-panel select {
    max-width: 180px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.ranking-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
}

.ranking-cover span {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #111827;
    background: var(--amber);
    font-weight: 900;
}

.ranking-info h2 {
    margin: 6px 0 10px;
    font-size: 24px;
}

.ranking-info p {
    margin: 0;
    color: var(--soft);
    line-height: 1.8;
}

.ranking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    color: var(--muted);
}

.ranking-meta strong {
    color: var(--amber);
}

.search-page-box {
    padding: 18px;
    margin-bottom: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.search-results:empty {
    display: none;
}

.detail-hero {
    position: relative;
    min-height: 74vh;
    overflow: hidden;
    background: #020617;
}

.detail-bg {
    position: absolute;
    inset: 0;
    filter: blur(3px);
    transform: scale(1.04);
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.45)),
        linear-gradient(180deg, rgba(2, 6, 23, 0.2), #020617 98%);
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 74vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    align-items: center;
    gap: 42px;
    padding: 44px 0;
}

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

.detail-text h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1;
    letter-spacing: -0.08em;
}

.detail-line {
    max-width: 760px;
    color: var(--soft);
    font-size: 19px;
    line-height: 1.9;
}

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

.detail-meta div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.56);
}

.detail-meta dt {
    color: var(--muted);
    font-size: 12px;
}

.detail-meta dd {
    margin: 7px 0 0;
    font-weight: 900;
}

.player-section {
    padding: 42px 0 0;
}

.player-section h2 {
    font-size: 32px;
    letter-spacing: -0.05em;
}

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

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

.video-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.video-play span {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 999px;
    color: #052e2b;
    background: var(--emerald);
    font-size: 34px;
    box-shadow: 0 22px 52px rgba(16, 185, 129, 0.38);
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding-top: 36px;
}

.article-card,
.prev-next {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.article-card h2 {
    margin: 0 0 12px;
}

.article-card p {
    margin: 0;
    color: var(--soft);
    line-height: 2;
}

.prev-next {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--emerald);
}

.site-footer {
    margin-top: 82px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.8);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
    padding: 42px 0 28px;
}

.footer-brand {
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 900;
}

.site-footer h3 {
    margin: 0 0 12px;
}

.site-footer p,
.site-footer a {
    display: block;
    color: var(--muted);
    line-height: 1.8;
    font-size: 14px;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.is-filtered-out {
    display: none !important;
}

@media (max-width: 1120px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-wrap {
        grid-template-columns: 1fr;
    }

    .hero-rank {
        display: none;
    }

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

    .detail-inner {
        grid-template-columns: 240px 1fr;
    }

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

@media (max-width: 760px) {
    .header-inner {
        height: 64px;
    }

    .brand {
        font-size: 18px;
    }

    .hero-wrap {
        padding: 10px;
        min-height: 78vh;
    }

    .hero-stage {
        min-height: 76vh;
        border-radius: 22px;
    }

    .hero-content {
        left: 22px;
        right: 22px;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .btn.ghost {
        margin-left: 0;
    }

    .hero-arrow {
        display: none;
    }

    .search-band,
    .detail-content,
    .footer-grid,
    .detail-inner {
        grid-template-columns: 1fr;
    }

    .detail-inner {
        align-items: start;
        padding-top: 24px;
    }

    .detail-poster {
        width: 190px;
    }

    .page-hero {
        padding: 30px 22px;
        border-radius: 24px;
    }

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

    .filter-panel,
    .home-search,
    .search-page-box {
        flex-direction: column;
    }

    .filter-panel select {
        max-width: 100%;
    }

    .ranking-item {
        grid-template-columns: 82px 1fr;
    }

    .ranking-info h2 {
        font-size: 18px;
    }

    .prev-next {
        flex-direction: column;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .compact-grid,
    .category-movie-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }
}
