* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-panel: rgba(15, 23, 42, 0.82);
    --panel: #111827;
    --panel-2: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-2: #0891b2;
    --blue: #2563eb;
    --purple: #a855f7;
    --amber: #fbbf24;
    --radius: 22px;
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 35%), radial-gradient(circle at 100% 15%, rgba(168, 85, 247, 0.16), transparent 36%), var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #001018;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), #60a5fa 52%, var(--purple));
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.28);
}

.brand-text strong,
.footer-brand {
    display: block;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-panel a {
    color: var(--muted-2);
    font-weight: 600;
    transition: color 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    overflow: hidden;
    min-width: 270px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search input {
    padding: 10px 14px;
}

.header-search button {
    border: 0;
    color: #001018;
    font-weight: 800;
    cursor: pointer;
    padding: 10px 16px;
    background: var(--cyan);
}

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

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px;
    background: rgba(2, 6, 23, 0.96);
}

.mobile-panel.open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.mobile-search {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.mobile-search input {
    padding: 12px;
}

.mobile-search button {
    border: 0;
    padding: 0 16px;
    color: #001018;
    font-weight: 800;
    background: var(--cyan);
}

.hero-carousel {
    position: relative;
    min-height: 690px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slides {
    position: relative;
    min-height: 650px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.28)), var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 68% 28%, rgba(34, 211, 238, 0.25), transparent 30%), linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.94));
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 56px;
    align-items: center;
    padding: 90px 0 70px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1 {
    max-width: 820px;
    margin: 18px 0 20px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-summary {
    max-width: 760px;
    color: var(--muted-2);
    font-size: 20px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    border: 1px solid rgba(34, 211, 238, 0.28);
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.12);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

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

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

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

.button-primary {
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 16px 32px rgba(34, 211, 238, 0.18);
}

.button-secondary {
    color: var(--text);
    border: 1px solid rgba(34, 211, 238, 0.28);
    background: rgba(15, 23, 42, 0.82);
}

.button-ghost {
    color: var(--muted-2);
    border: 1px solid var(--line);
}

.hero-poster {
    position: relative;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(168, 85, 247, 0.14));
    box-shadow: var(--shadow);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-control-row {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.hero-arrow,
.hero-dot {
    border: 1px solid rgba(148, 163, 184, 0.26);
    color: var(--text);
    background: rgba(15, 23, 42, 0.78);
    cursor: pointer;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 28px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    padding: 0;
    border-radius: 999px;
}

.hero-dot.active {
    border-color: transparent;
    background: var(--cyan);
}

.section {
    padding: 78px 0;
}

.section-overlap {
    padding-top: 60px;
}

.alt-section {
    background: rgba(15, 23, 42, 0.36);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

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

.section-heading.compact {
    align-items: start;
}

.section-heading h2,
.page-hero h1,
.detail-info h1 {
    margin: 8px 0 10px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.category-overview-head p,
.feature-panel p {
    margin: 0;
    color: var(--muted);
    max-width: 760px;
}

.text-link {
    color: var(--cyan);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card-link,
.category-overview-card,
.feature-panel,
.text-panel,
.side-panel,
.player-card,
.ranking-card a,
.category-tile,
.filter-panel,
.search-page-form {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.88));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

.movie-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 28px 70px rgba(34, 211, 238, 0.08);
}

.poster-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(99, 102, 241, 0.12));
}

.poster-image,
.ranking-card img,
.compact-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

.poster-image.poster-error,
.compact-cover img.poster-error,
.ranking-card img.poster-error,
.hero-poster img.poster-error,
.player-card video[poster=""] {
    opacity: 0;
}

.movie-card-link:hover .poster-image {
    transform: scale(1.07);
}

.poster-type,
.poster-year {
    position: absolute;
    z-index: 2;
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(8px);
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
}

.poster-type {
    top: 12px;
    left: 12px;
}

.poster-year {
    right: 12px;
    bottom: 12px;
    color: var(--muted-2);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.movie-card-body h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

.movie-meta,
.movie-one-line {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.movie-one-line {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border-radius: 26px;
    background-image: linear-gradient(160deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.58)), var(--tile-image);
    background-size: cover;
    background-position: center;
}

.category-tile > a {
    display: grid;
    gap: 12px;
    min-height: 150px;
    padding: 24px;
}

.category-tile span {
    color: var(--cyan);
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    color: var(--muted-2);
    font-weight: 500;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px 22px;
}

.category-samples a {
    border-radius: 999px;
    color: var(--muted-2);
    background: rgba(15, 23, 42, 0.78);
    padding: 5px 10px;
    font-size: 12px;
}

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

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

.rank-list a {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.78);
}

.rank-num,
.ranking-index {
    color: var(--amber);
    font-size: 22px;
    font-weight: 900;
}

.rank-main strong,
.compact-info strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-main em,
.compact-info em {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.rank-tag {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
}

.feature-panel {
    border-radius: 28px;
    padding: 28px;
}

.feature-panel h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.feature-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 24px 0;
}

.feature-stats span {
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 16px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.08);
    padding: 12px 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}

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

.page-hero {
    padding: 86px 0 64px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.94));
}

.category-hero-grid,
.detail-hero-grid,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 32px;
    align-items: start;
}

.category-spotlight,
.compact-grid,
.side-list {
    display: grid;
    gap: 12px;
}

.overview-stack {
    display: grid;
    gap: 22px;
}

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

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

.category-overview-head h2 {
    margin: 4px 0 8px;
    font-size: 30px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.34);
    padding: 10px;
}

.compact-cover {
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(34, 211, 238, 0.12);
}

.filter-panel,
.search-page-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    border-radius: 22px;
    padding: 14px;
    margin-bottom: 26px;
}

.filter-panel input,
.filter-panel select,
.search-page-form input {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    background: rgba(2, 6, 23, 0.46);
}

.search-page-form {
    grid-template-columns: minmax(0, 1fr) auto;
}

.search-meta {
    color: var(--muted);
    margin: 20px 0;
}

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

.ranking-card a {
    display: grid;
    grid-template-columns: 56px 86px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    border-radius: 20px;
    padding: 12px;
}

.ranking-card img {
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    background: rgba(34, 211, 238, 0.12);
}

.ranking-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 18px;
}

.ranking-content em {
    display: block;
    color: var(--muted);
    font-style: normal;
    margin-bottom: 10px;
}

.detail-hero {
    padding: 42px 0 60px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.98));
}

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

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

.detail-hero-grid {
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: center;
}

.detail-poster {
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-info h1 {
    font-size: clamp(34px, 4vw, 58px);
}

.detail-one-line {
    max-width: 880px;
    color: var(--muted-2);
    font-size: 20px;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 28px 0;
}

.info-list div {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.62);
    padding: 12px;
}

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

.info-list dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.detail-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 0;
    color: var(--text);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78));
    cursor: pointer;
}

.player-card.playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    color: #001018;
    background: var(--cyan);
    box-shadow: 0 0 38px rgba(34, 211, 238, 0.35);
    font-size: 30px;
}

.player-overlay strong {
    font-size: 24px;
}

.player-overlay em {
    color: var(--muted-2);
    font-style: normal;
}

.text-panel,
.side-panel {
    border-radius: 28px;
    padding: 26px;
    margin-top: 22px;
}

.text-panel h2,
.side-panel h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.text-panel p {
    margin: 0 0 24px;
    color: var(--muted-2);
    font-size: 17px;
}

.side-panel {
    margin-top: 0;
    position: sticky;
    top: 96px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.92);
    padding: 54px 0 28px;
}

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

.site-footer p {
    color: var(--muted);
    max-width: 460px;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    color: var(--muted-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
}

.footer-links a:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.35);
}

.footer-bottom {
    color: var(--muted);
    margin-top: 34px;
    font-size: 14px;
}

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

    .header-search {
        margin-left: auto;
    }

    .mobile-toggle {
        display: block;
    }

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

    .hero-poster {
        max-width: 300px;
    }

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

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

    .side-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-search {
        display: none;
    }

    .header-inner {
        min-height: 66px;
    }

    .hero-carousel,
    .hero-slides {
        min-height: 760px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 74px 0 84px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .hero-summary,
    .detail-one-line {
        font-size: 17px;
    }

    .section {
        padding: 54px 0;
    }

    .section-heading,
    .category-overview-head {
        display: block;
    }

    .text-link,
    .category-overview-head .button {
        margin-top: 14px;
    }

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

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

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

    .info-list,
    .filter-panel,
    .search-page-form {
        grid-template-columns: 1fr;
    }

    .rank-list a,
    .ranking-card a {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .rank-tag,
    .ranking-card img {
        display: none;
    }
}
