: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.18);
    --muted: #94a3b8;
    --text: #f8fafc;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --cyan-soft: rgba(34, 211, 238, 0.18);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 22px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
}

.brand-text,
.footer-brand {
    color: transparent;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
}

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

.main-nav a {
    padding: 10px 14px;
    color: #cbd5e1;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: white;
    background: rgba(34, 211, 238, 0.12);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 260px;
    padding: 5px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.45);
}

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

.header-search input {
    padding: 8px 12px;
}

.header-search button,
.wide-search button {
    border: 0;
    cursor: pointer;
    color: white;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    border-radius: 999px;
    padding: 9px 16px;
    font-weight: 700;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.75);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: white;
}

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

.hero-slider {
    position: relative;
    width: 100vw;
    min-height: 74vh;
    margin-left: calc(50% - 50vw);
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.9s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.82), transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 120px 0 92px;
    max-width: 760px;
}

.hero-labels,
.detail-meta,
.movie-meta,
.tag-row,
.hero-actions,
.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-labels span,
.hero-labels a,
.section-kicker,
.tag-row span,
.movie-meta span,
.poster-badge,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-labels span,
.section-kicker {
    color: white;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    padding: 7px 14px;
}

.hero-labels a,
.movie-meta span,
.detail-meta span {
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 6px 12px;
}

.hero-content h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 28px;
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

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

.primary-btn {
    color: white;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    padding: 12px 22px;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.3);
}

.ghost-btn {
    color: white;
    padding: 11px 20px;
    border: 1px solid rgba(226, 232, 240, 0.28);
    background: rgba(15, 23, 42, 0.58);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover,
.section-link:hover {
    transform: translateY(-2px);
}

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

.hero-dots button {
    width: 38px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(226, 232, 240, 0.36);
}

.hero-dots button.is-active {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.home-search-panel,
.page-hero,
.filter-panel,
.detail-hero,
.detail-text-block,
.detail-side-card,
.player-section,
.category-overview-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.home-search-panel {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
    gap: 28px;
    align-items: center;
    margin-top: -46px;
    padding: 28px;
    border-radius: var(--radius);
}

.home-search-panel h2,
.section-title-row h2,
.page-hero h1,
.detail-info h1,
.detail-text-block h2,
.detail-side-card h2 {
    margin: 0;
    letter-spacing: -0.04em;
}

.home-search-panel h2 {
    font-size: clamp(24px, 4vw, 38px);
}

.home-search-panel p,
.page-hero p,
.detail-one-line,
.detail-text-block p,
.detail-side-card dd,
.category-overview-card p,
.movie-card p,
.ranking-row p,
.site-footer p {
    color: #cbd5e1;
    line-height: 1.75;
}

.wide-search {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.54);
}

.wide-search input {
    padding: 12px 16px;
}

.content-section {
    padding: 56px 0 0;
}

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

.section-title-row h2 {
    margin-top: 12px;
    font-size: clamp(26px, 4vw, 40px);
}

.section-link,
.text-link {
    color: #67e8f9;
}

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

.category-card {
    position: relative;
    min-height: 178px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #0f172a;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
}

.category-card img {
    width: 100%;
    height: 100%;
    min-height: 178px;
    object-fit: cover;
    opacity: 0.58;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card span,
.category-card small {
    position: absolute;
    left: 16px;
    right: 16px;
    z-index: 2;
}

.category-card span {
    bottom: 48px;
    font-size: 19px;
    font-weight: 900;
}

.category-card small {
    bottom: 18px;
    color: #cbd5e1;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 70%);
}

.category-card:hover img {
    transform: scale(1.08);
    opacity: 0.82;
}

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

.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.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 24px 70px rgba(34, 211, 238, 0.16);
}

.poster-link,
.movie-list-cover,
.rank-cover,
.detail-cover,
.category-preview {
    position: relative;
    overflow: hidden;
    background: #020617;
}

.poster-link {
    display: block;
    aspect-ratio: 2 / 3;
}

.poster-link img,
.movie-list-cover img,
.rank-cover img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    color: white;
    background: rgba(2, 6, 23, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 5px 10px;
}

.card-body {
    padding: 14px;
}

.movie-card h3,
.ranking-row h3 {
    margin: 10px 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-row h3 a:hover,
.category-overview-card h2 a:hover {
    color: #67e8f9;
}

.movie-card p {
    margin: 0 0 12px;
    font-size: 14px;
}

.tag-row span {
    color: #a5f3fc;
    background: var(--cyan-soft);
    padding: 5px 9px;
}

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

.movie-card-list {
    display: grid;
    grid-template-columns: 116px 1fr;
    min-height: 164px;
}

.movie-list-cover {
    min-height: 164px;
}

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

.page-main {
    padding-top: 104px;
    padding-bottom: 56px;
}

.page-hero {
    padding: clamp(28px, 5vw, 56px);
    border-radius: var(--radius);
}

.compact-hero {
    background:
        radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.2), transparent 30rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.65));
}

.page-hero h1 {
    max-width: 880px;
    margin-top: 18px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    font-size: 17px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    color: #94a3b8;
    margin-bottom: 20px;
}

.breadcrumb a:hover {
    color: #67e8f9;
}

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

.filter-panel input,
.filter-panel select {
    height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.42);
}

.category-movie-grid {
    padding-top: 8px;
}

.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    padding: 18px;
    border-radius: var(--radius);
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    border-radius: 17px;
}

.category-preview img {
    width: 100%;
    height: 94px;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 4px 0 10px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 64px 90px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-num {
    color: transparent;
    background: linear-gradient(135deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    font-size: 28px;
    font-weight: 900;
}

.rank-cover {
    width: 90px;
    height: 118px;
    border-radius: 14px;
}

.detail-main {
    width: min(1180px, calc(100% - 32px));
}

.detail-breadcrumb {
    margin-bottom: 18px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    padding: 26px;
    border-radius: var(--radius);
}

.detail-cover {
    aspect-ratio: 2 / 3;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.detail-info {
    align-self: center;
}

.detail-info h1 {
    margin-top: 18px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.06;
}

.detail-one-line {
    font-size: 18px;
    margin: 18px 0;
}

.detail-tags {
    margin: 18px 0 24px;
}

.player-section {
    margin-top: 26px;
    padding: 16px;
    border-radius: var(--radius);
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    cursor: pointer;
    color: white;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.24));
}

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

.play-icon {
    display: block;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 44px rgba(37, 99, 235, 0.4);
}

.play-icon::after {
    content: "";
    position: absolute;
    margin-left: 30px;
    margin-top: 22px;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    border-left: 24px solid white;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 300px;
    gap: 18px;
    margin-top: 26px;
}

.detail-text-block,
.detail-side-card {
    padding: 24px;
    border-radius: var(--radius);
}

.detail-text-block p {
    margin: 16px 0 0;
}

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

.detail-side-card dt {
    color: #94a3b8;
}

.detail-side-card dd {
    margin: 0;
}

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

.site-footer {
    margin-top: 64px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(2, 6, 23, 0.94));
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    display: inline-block;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 10px;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: #67e8f9;
}

[data-filter-card].is-hidden {
    display: none;
}

.search-empty {
    grid-column: 1 / -1;
    padding: 60px 20px;
    text-align: center;
    color: #94a3b8;
    border: 1px dashed rgba(148, 163, 184, 0.3);
    border-radius: 22px;
}

@media (max-width: 1120px) {
    .movie-grid,
    .related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .detail-side-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .header-inner {
        gap: 12px;
    }

    .main-nav {
        position: fixed;
        top: 70px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.96);
    }

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

    .main-nav a {
        border-radius: 12px;
    }

    .menu-toggle {
        display: block;
    }

    .header-search {
        display: none;
    }

    .home-search-panel,
    .detail-hero,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .movie-list,
    .category-overview-grid,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 330px;
    }

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

@media (max-width: 680px) {
    main,
    .header-inner,
    .footer-inner,
    .hero-content,
    .page-main,
    .detail-main {
        width: min(100% - 24px, 1280px);
    }

    .brand-text {
        font-size: 19px;
    }

    .hero-slider {
        min-height: 78vh;
    }

    .hero-content {
        padding-bottom: 86px;
    }

    .hero-actions,
    .wide-search,
    .footer-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-btn,
    .ghost-btn,
    .wide-search button {
        width: 100%;
    }

    .movie-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

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

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

    .movie-card p {
        display: none;
    }

    .movie-card-list,
    .ranking-row {
        grid-template-columns: 82px 1fr;
    }

    .rank-num {
        grid-column: 1 / -1;
    }

    .rank-cover {
        width: 82px;
        height: 110px;
    }
}
