:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --emerald: #34d399;
    --emerald-strong: #10b981;
    --cyan: #22d3ee;
    --orange: #fb923c;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    color: white;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.logo-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    color: #021018;
    font-size: 15px;
    box-shadow: 0 0 30px rgba(52, 211, 153, 0.35);
}

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

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

.site-nav a:hover {
    color: var(--emerald);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.85);
    padding: 9px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: white;
    border-radius: 99px;
}

.hero-carousel {
    position: relative;
    min-height: 590px;
    height: 64vh;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 30%, rgba(34, 211, 238, 0.22), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 46%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.26) 48%, rgba(2, 6, 23, 0.48) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 760px;
}

.hero-badge,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    color: var(--emerald);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 16px 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    max-width: 820px;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 30px;
    color: var(--muted-2);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    color: #021018;
    box-shadow: 0 12px 36px rgba(52, 211, 153, 0.24);
}

.btn-ghost {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(203, 213, 225, 0.22);
    color: #e2e8f0;
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    border-color: rgba(52, 211, 153, 0.55);
}

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

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

.hero-dots button {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: var(--emerald);
}

.search-band {
    margin-top: -42px;
    position: relative;
    z-index: 8;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 28px;
    align-items: center;
    padding: 28px;
    border: 1px solid rgba(52, 211, 153, 0.18);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel h2,
.section-heading h2,
.category-overview-head h2,
.ranking-panel h2,
.detail-side h2,
.detail-article h2 {
    margin: 8px 0 0;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -0.04em;
}

.search-box {
    display: flex;
    min-height: 52px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.72);
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    padding: 0 18px;
    color: white;
    background: transparent;
}

.search-box input::placeholder {
    color: #64748b;
}

.search-box button {
    border: 0;
    padding: 0 18px;
    color: #06121a;
    font-weight: 800;
    background: var(--emerald);
    cursor: pointer;
}

.page-search {
    max-width: 680px;
    margin-top: 26px;
}

.main-space {
    padding: 72px 0;
}

.content-section + .content-section,
.category-overview-card + .category-overview-card,
.ranking-full {
    margin-top: 72px;
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 26px;
}

.section-intro {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.8;
    margin: -12px 0 28px;
}

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

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

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

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

.movie-card-featured {
    grid-column: span 1;
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111827;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.42s ease, filter 0.42s ease;
}

.movie-card:hover .movie-cover img {
    transform: scale(1.08);
    filter: brightness(0.75);
}

.play-mark {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: auto;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.9);
    color: white;
    opacity: 0;
    transform: scale(0.82);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-mark,
.compact-card:hover::after {
    opacity: 1;
    transform: scale(1);
}

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

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 9px 0 8px;
    color: white;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--emerald);
}

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

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

.movie-tags span,
.detail-tags span {
    padding: 5px 9px;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.18);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
}

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

.category-card,
.ranking-panel,
.category-overview-card,
.simple-page,
.detail-article,
.detail-side {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.category-card {
    padding: 22px;
    min-height: 160px;
}

.category-card > a {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-card span {
    color: white;
    font-size: 22px;
    font-weight: 850;
}

.category-card strong {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.7;
}

.category-card div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-card div a {
    max-width: 100%;
    padding: 5px 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--emerald);
    background: rgba(52, 211, 153, 0.09);
    border-radius: 99px;
    font-size: 12px;
}

.ranking-panel {
    padding: 24px;
    align-self: start;
    position: sticky;
    top: 92px;
}

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

.rank-row,
.ranking-line {
    display: grid;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.72);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.rank-row {
    grid-template-columns: 42px 1fr;
    padding: 12px;
}

.ranking-line {
    grid-template-columns: 64px minmax(180px, 1fr) minmax(180px, 1.5fr);
    padding: 14px 18px;
}

.rank-row:hover,
.ranking-line:hover {
    transform: translateX(4px);
    border-color: rgba(52, 211, 153, 0.28);
    background: rgba(30, 41, 59, 0.98);
}

.rank-row span,
.ranking-line span {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #021018;
    background: var(--emerald);
    font-weight: 900;
}

.rank-row strong,
.ranking-line strong {
    color: white;
}

.rank-row em,
.ranking-line em {
    grid-column: 2;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.ranking-line em {
    grid-column: auto;
    text-align: right;
}

.page-main {
    min-height: 60vh;
}

.page-hero,
.detail-hero {
    padding: 74px 0;
    background:
        radial-gradient(circle at 10% 10%, rgba(52, 211, 153, 0.18), transparent 30%),
        radial-gradient(circle at 90% 15%, rgba(34, 211, 238, 0.14), transparent 32%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.94));
    border-bottom: 1px solid var(--line);
}

.page-hero h1,
.detail-info h1 {
    margin: 14px 0;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.page-hero p,
.detail-info p {
    max-width: 820px;
    margin: 0;
    color: var(--muted-2);
    font-size: 18px;
    line-height: 1.8;
}

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

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

.category-overview-card {
    padding: 28px;
}

.category-overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.category-overview-head p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.compact-card {
    position: relative;
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.72);
}

.compact-card img {
    width: 96px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
}

.compact-card strong {
    display: -webkit-box;
    overflow: hidden;
    color: white;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.compact-card em {
    display: -webkit-box;
    margin-top: 5px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid rgba(52, 211, 153, 0.22);
    box-shadow: var(--shadow);
    background: #0f172a;
}

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

.detail-meta {
    gap: 10px;
    margin: 22px 0 18px;
}

.detail-meta span {
    padding: 8px 12px;
    color: #dbeafe;
    background: rgba(30, 41, 59, 0.72);
    border-radius: 999px;
}

.player-section {
    margin-top: 56px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(52, 211, 153, 0.24);
    border-radius: var(--radius);
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.52));
    cursor: pointer;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    color: #021018;
    font-size: 34px;
    box-shadow: 0 0 60px rgba(52, 211, 153, 0.34);
}

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

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    margin-top: 34px;
}

.detail-article,
.detail-side,
.simple-page {
    padding: 30px;
}

.detail-article h2,
.detail-side h2 {
    margin-top: 0;
}

.detail-article p,
.simple-page p {
    color: var(--muted-2);
    font-size: 17px;
    line-height: 2;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 14px 18px;
    margin: 0;
}

.detail-side dt {
    color: var(--muted);
}

.detail-side dd {
    margin: 0;
    color: white;
}

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

.related-section {
    padding-bottom: 72px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
    color: #cbd5e1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 34px;
    padding: 54px 0;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: white;
    font-size: 18px;
}

.site-footer p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.site-footer a {
    display: block;
    margin: 10px 0;
    color: var(--muted-2);
}

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

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid var(--line);
    color: #64748b;
    text-align: center;
}

.simple-page {
    margin-top: 56px;
    margin-bottom: 72px;
}

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

@media (max-width: 1100px) {
    .site-nav {
        gap: 12px;
        font-size: 14px;
    }

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

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

    .ranking-panel {
        position: static;
    }
}

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

    .site-nav {
        position: absolute;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

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

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

    .site-nav a:hover {
        background: rgba(52, 211, 153, 0.1);
    }

    .hero-carousel {
        min-height: 540px;
        height: 68vh;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

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

    .category-overview-head,
    .detail-layout {
        grid-template-columns: 1fr;
        display: grid;
    }

    .detail-layout {
        gap: 26px;
    }

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

    .ranking-line {
        grid-template-columns: 54px 1fr;
    }

    .ranking-line em {
        grid-column: 2;
        text-align: left;
    }
}

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

    .site-logo {
        font-size: 20px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-actions {
        width: 100%;
    }

    .btn {
        flex: 1 1 100%;
    }

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

    .search-box {
        flex-direction: column;
    }

    .search-box input {
        min-height: 52px;
    }

    .search-box button {
        min-height: 46px;
    }

    .compact-card {
        grid-template-columns: 112px 1fr;
    }

    .compact-card img {
        width: 112px;
        height: 74px;
    }

    .detail-article,
    .detail-side,
    .simple-page,
    .category-overview-card,
    .ranking-panel {
        padding: 22px;
    }
}
