:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --orange: #f97316;
    --orange-deep: #ea580c;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 5%, rgba(8, 145, 178, 0.24), transparent 34%),
        radial-gradient(circle at 80% 0%, rgba(249, 115, 22, 0.16), transparent 28%),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
    max-width: 100%;
}

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

.header-inner {
    display: flex;
    align-items: center;
    gap: 26px;
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 14px 0;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
    color: white;
    font-weight: 900;
    box-shadow: 0 12px 34px rgba(34, 211, 238, 0.22);
}

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

.brand-text strong {
    font-size: 18px;
    letter-spacing: 0.02em;
}

.brand-text em {
    margin-top: 4px;
    color: var(--cyan);
    font-size: 12px;
    font-style: normal;
}

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

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

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

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 260px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px;
    background: rgba(15, 23, 42, 0.76);
}

.top-search input,
.mobile-nav input,
.hero-search input,
.filter-input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.top-search input::placeholder,
.mobile-nav input::placeholder,
.hero-search input::placeholder,
.filter-input::placeholder {
    color: var(--subtle);
}

.top-search button,
.mobile-nav button,
.hero-search button,
.primary-button,
.section-link {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--orange-deep));
    color: white;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 16px 30px rgba(249, 115, 22, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button,
.mobile-nav button,
.hero-search button {
    padding: 9px 16px;
}

.primary-button,
.section-link,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
}

.primary-button:hover,
.section-link:hover,
.top-search button:hover,
.mobile-nav button:hover,
.hero-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px rgba(249, 115, 22, 0.30);
}

.ghost-button {
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 999px;
    color: var(--cyan);
    font-weight: 800;
    background: rgba(15, 23, 42, 0.48);
}

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

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

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-strong);
}

.mobile-nav form {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

main {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
}

.home-hero {
    position: relative;
    overflow: hidden;
    margin-top: 28px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.72));
    box-shadow: var(--shadow);
}

.hero-stage {
    position: relative;
    min-height: 610px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) 360px;
    align-items: center;
    gap: 42px;
    padding: 72px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 48%, rgba(2, 6, 23, 0.32) 100%),
        radial-gradient(circle at 24% 20%, rgba(34, 211, 238, 0.22), transparent 30%);
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px) saturate(1.2);
    transform: scale(1.08);
    opacity: 0.46;
}

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 1;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    padding: 7px 13px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.08);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.hero-copy h1 {
    max-width: 850px;
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-copy h2 {
    margin: 0 0 14px;
    color: var(--cyan);
    font-size: clamp(24px, 3vw, 42px);
}

.hero-copy p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span,
.genre-row span {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.64);
    font-size: 12px;
    font-weight: 700;
}

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

.hero-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    aspect-ratio: 3 / 4;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

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

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-bottom-bar {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 72px 28px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 99px;
    padding: 0;
    background: rgba(148, 163, 184, 0.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 32px;
    background: var(--cyan);
}

.hero-search {
    display: flex;
    align-items: center;
    width: min(520px, 100%);
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.78);
}

.hero-search input {
    padding-left: 12px;
}

.hero-category-row {
    position: relative;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 72px 48px;
}

.hero-category-row a {
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    padding: 9px 14px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.08);
    font-weight: 800;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 24px 0 52px;
}

.stats-strip a,
.category-tile,
.story-card,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.stats-strip a {
    padding: 22px;
}

.stats-strip strong {
    display: block;
    color: var(--text);
    font-size: 20px;
}

.stats-strip span {
    display: block;
    margin-top: 8px;
    color: var(--subtle);
}

.content-section {
    margin: 54px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    letter-spacing: -0.03em;
}

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

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

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: rgba(15, 23, 42, 0.88);
}

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

.movie-card:hover .poster-link img {
    transform: scale(1.06);
    filter: saturate(1.15);
}

.quality-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: white;
    font-size: 12px;
    font-weight: 900;
}

.quality-badge {
    right: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, var(--orange), var(--orange-deep));
}

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

.movie-meta-line,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--subtle);
    font-size: 12px;
}

.movie-meta-line span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
}

.movie-meta-line span + span::before,
.detail-meta span + span::before {
    content: "·";
    margin-right: 8px;
    color: rgba(148, 163, 184, 0.7);
}

.movie-card h3 {
    margin: 10px 0 8px;
    color: var(--text);
    font-size: 18px;
    line-height: 1.35;
}

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

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

.category-tile {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    background:
        linear-gradient(145deg, rgba(34, 211, 238, 0.12), rgba(249, 115, 22, 0.08)),
        var(--panel);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.45);
}

.category-tile strong {
    font-size: 22px;
}

.category-tile span {
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.65;
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    margin-top: 28px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.82));
    box-shadow: var(--shadow);
}

.small-hero {
    padding: 58px;
}

.small-hero h1 {
    max-width: 860px;
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 60px);
    letter-spacing: -0.04em;
}

.small-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding: 16px;
}

.filter-input {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 18px;
    background: rgba(2, 6, 23, 0.48);
}

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

.filter-tabs button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.82);
    font-weight: 800;
    cursor: pointer;
}

.filter-tabs button.is-active {
    border-color: rgba(249, 115, 22, 0.5);
    color: white;
    background: linear-gradient(135deg, var(--orange), var(--orange-deep));
}

.detail-hero {
    min-height: 560px;
    padding: 34px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.97), rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.45)),
        radial-gradient(circle at 20% 30%, rgba(34, 211, 238, 0.18), transparent 28%);
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: blur(12px) saturate(1.15);
    transform: scale(1.08);
}

.breadcrumb,
.detail-layout {
    position: relative;
    z-index: 1;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
    padding-top: 54px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

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

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-one-line {
    max-width: 820px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.8;
}

.detail-meta {
    margin: 22px 0;
    font-size: 15px;
}

.detail-tags {
    margin-bottom: 28px;
}

.watch-section,
.detail-content {
    margin: 34px 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.58));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    position: relative;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--orange-deep));
    box-shadow: 0 20px 60px rgba(249, 115, 22, 0.35);
}

.play-icon::after {
    content: "";
    position: absolute;
    left: 35px;
    top: 27px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid white;
}

.story-card {
    padding: 30px;
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.story-card h2:not(:first-child) {
    margin-top: 28px;
}

.story-card p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.9;
}

.genre-row {
    margin-top: 24px;
}

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

.movie-card-compact .movie-card-body {
    padding: 13px;
}

.movie-card-compact h3 {
    font-size: 16px;
}

.movie-card-compact p {
    min-height: 46px;
    font-size: 13px;
}

.site-footer {
    width: min(1240px, calc(100% - 40px));
    margin: 80px auto 0;
    border-top: 1px solid var(--line);
    padding: 34px 0 28px;
    color: var(--muted);
}

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

.footer-brand {
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 520px;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 18px;
}

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

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

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

.copyright {
    margin-top: 30px;
    color: var(--subtle);
    font-size: 14px;
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .mobile-nav.is-open {
        display: block;
    }

    .mobile-nav a {
        display: block;
        padding: 11px 0;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 50px;
    }

    .hero-poster {
        display: none;
    }

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

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

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

@media (max-width: 760px) {
    .header-inner,
    main,
    .site-footer,
    .mobile-nav {
        width: min(100% - 28px, 1240px);
    }

    .brand-text em {
        display: none;
    }

    .hero-stage {
        min-height: 640px;
    }

    .hero-slide {
        padding: 34px 24px;
    }

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

    .hero-copy p,
    .small-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-bottom-bar,
    .hero-category-row {
        padding-left: 24px;
        padding-right: 24px;
    }

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

    .stats-strip,
    .movie-grid,
    .library-grid,
    .ranking-grid,
    .related-grid,
    .category-grid,
    .large-category-grid,
    .footer-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .small-hero,
    .detail-hero {
        padding: 30px 22px;
    }

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

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