:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #e5e7eb;
    --white: #ffffff;
    --accent: #10b981;
    --accent-2: #22d3ee;
    --accent-3: #84cc16;
    --danger: #f43f5e;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 34rem),
        radial-gradient(circle at 82% 12%, rgba(34, 211, 238, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #07111f 42%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.page-shell {
    min-height: 100vh;
    overflow: hidden;
}

.container-wrap {
    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(18px);
}

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

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #00130c;
    font-weight: 900;
    box-shadow: 0 18px 40px rgba(16, 185, 129, 0.28);
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--white);
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #cbd5e1;
    font-size: 15px;
}

.primary-nav a {
    transition: color 0.2s ease;
}

.primary-nav a:hover {
    color: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-form {
    display: flex;
    align-items: center;
    width: min(300px, 28vw);
    padding: 8px 10px 8px 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
}

.search-form input {
    min-width: 0;
    width: 100%;
    color: var(--white);
    background: transparent;
    border: 0;
    outline: 0;
}

.search-form button,
.hero-search button,
.filter-button {
    border: 0;
    border-radius: 999px;
    color: #002016;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-form button {
    padding: 7px 14px;
}

.search-form button:hover,
.hero-search button:hover,
.filter-button:hover,
.cta-button:hover,
.movie-card:hover,
.category-card:hover,
.related-card:hover {
    transform: translateY(-2px);
}

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

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 14px 0 20px;
}

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

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

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.68);
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    isolation: isolate;
}

.hero-track {
    position: relative;
    min-height: 680px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

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

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) brightness(0.72);
    transform: scale(1.03);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.35) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.18) 0%, #020617 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(280px, 0.48fr);
    align-items: center;
    gap: 42px;
    padding: 86px 0 72px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(16, 185, 129, 0.38);
    border-radius: 999px;
    color: #bbf7d0;
    background: rgba(16, 185, 129, 0.12);
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 0;
    max-width: 860px;
    color: var(--white);
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-copy p {
    margin: 22px 0 0;
    max-width: 720px;
    color: #dbeafe;
    font-size: clamp(17px, 2.1vw, 22px);
}

.hero-meta,
.movie-meta,
.card-meta,
.detail-meta,
.ranking-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta {
    margin: 22px 0 0;
}

.badge,
.tag,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.badge {
    padding: 6px 10px;
    color: #dcfce7;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.meta-pill {
    padding: 6px 10px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.cta-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.cta-button {
    color: #00130c;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.24);
}

.ghost-button {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.42);
}

.ghost-button:hover {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.12);
}

.hero-poster {
    align-self: stretch;
    display: grid;
    align-items: end;
}

.hero-poster-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: var(--shadow);
}

.hero-poster-card img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-poster-info {
    position: absolute;
    inset: auto 16px 16px 16px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(16px);
}

.hero-search-wrap {
    position: relative;
    margin-top: -56px;
    z-index: 2;
}

.hero-search-card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) auto;
    align-items: center;
    gap: 22px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-search-title {
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
}

.hero-search {
    display: flex;
    gap: 12px;
}

.hero-search input,
.filter-input,
.filter-select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: var(--white);
    background: rgba(2, 6, 23, 0.72);
    outline: 0;
}

.hero-search input {
    min-width: 260px;
    padding: 14px 18px;
}

.hero-search button,
.filter-button {
    padding: 0 24px;
}

.hero-controls {
    position: absolute;
    right: max(16px, calc((100vw - 1180px) / 2));
    bottom: 110px;
    display: flex;
    gap: 12px;
    z-index: 4;
}

.hero-control {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: var(--white);
    background: rgba(15, 23, 42, 0.68);
    cursor: pointer;
}

.section {
    padding: 72px 0 0;
}

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

.section-title {
    margin: 0;
    color: var(--white);
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-desc {
    margin: 8px 0 0;
    max-width: 680px;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 22px;
}

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

.movie-card,
.related-card,
.category-card,
.ranking-row,
.info-panel,
.content-panel,
.player-shell,
.filter-panel {
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
}

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    border-color: rgba(16, 185, 129, 0.42);
    box-shadow: 0 24px 70px rgba(16, 185, 129, 0.12);
}

.poster {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

.poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .poster img,
.related-card:hover img {
    transform: scale(1.05);
}

.score {
    position: absolute;
    right: 10px;
    top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fef3c7;
    background: rgba(2, 6, 23, 0.72);
    font-weight: 900;
    font-size: 12px;
    backdrop-filter: blur(8px);
}

.type-chip {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(16, 185, 129, 0.84);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: var(--white);
    font-size: 16px;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

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

.card-meta {
    color: #94a3b8;
    font-size: 12px;
    justify-content: space-between;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 174px;
    padding: 24px;
    border-radius: 26px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card::before {
    content: "";
    position: absolute;
    inset: -50% auto auto -20%;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25), transparent 68%);
}

.category-card h3 {
    position: relative;
    margin: 0 0 10px;
    color: var(--white);
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    position: relative;
    margin: 0;
    color: #cbd5e1;
}

.category-card span {
    position: absolute;
    right: 20px;
    bottom: 18px;
    color: #bbf7d0;
    font-weight: 900;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 58px 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 12px 16px;
    border-radius: 20px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-row:hover {
    transform: translateX(4px);
    border-color: rgba(16, 185, 129, 0.42);
}

.ranking-index {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 15px;
    color: #00130c;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.ranking-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-title {
    margin: 0 0 6px;
    color: var(--white);
    font-size: 18px;
    font-weight: 900;
}

.ranking-desc {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.ranking-score {
    color: #facc15;
    font-size: 22px;
    font-weight: 900;
}

.page-hero {
    padding: 70px 0 36px;
}

.page-hero-card {
    position: relative;
    overflow: hidden;
    padding: 40px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 32px;
    background:
        radial-gradient(circle at 10% 10%, rgba(16, 185, 129, 0.22), transparent 30rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.72));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.page-hero p {
    margin: 16px 0 0;
    max-width: 820px;
    color: #cbd5e1;
    font-size: 18px;
}

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

.filter-input,
.filter-select {
    padding: 13px 16px;
}

.filter-empty {
    display: none;
    padding: 30px;
    border-radius: 22px;
    text-align: center;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.62);
}

.filter-empty.is-visible {
    display: block;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-frame video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.76));
    cursor: pointer;
}

.player-overlay[hidden] {
    display: none;
}

.play-button {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #00130c;
    font-size: 38px;
    font-weight: 900;
    box-shadow: 0 24px 60px rgba(16, 185, 129, 0.34);
}

.player-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.player-title-bar h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(24px, 4vw, 38px);
    line-height: 1.18;
}

.info-panel,
.content-panel {
    border-radius: 28px;
}

.info-panel {
    overflow: hidden;
}

.info-panel img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.info-body {
    padding: 20px;
}

.info-body h2,
.content-panel h2 {
    margin: 0 0 12px;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
}

.detail-meta {
    margin: 14px 0;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tag {
    padding: 6px 10px;
    color: #bbf7d0;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.content-panel {
    margin-top: 26px;
    padding: 26px;
}

.content-panel p {
    margin: 0 0 16px;
    color: #cbd5e1;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 30px 0 18px;
    color: #94a3b8;
    font-size: 14px;
}

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

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

.related-card {
    overflow: hidden;
    border-radius: 18px;
    transition: transform 0.2s ease;
}

.related-card img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.related-card h3 {
    margin: 0;
    padding: 12px;
    color: var(--white);
    font-size: 14px;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

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

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    padding: 34px 0;
    color: #94a3b8;
}

.footer-title {
    margin: 0 0 8px;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.footer-links a:hover {
    color: var(--accent);
}

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

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

@media (max-width: 920px) {
    .primary-nav,
    .header-actions > .search-form {
        display: none;
    }

    .menu-button {
        display: grid;
        place-items: center;
    }

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

    .hero-poster {
        display: none;
    }

    .hero-controls {
        bottom: 86px;
    }

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

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

    .ranking-row {
        grid-template-columns: 48px 72px minmax(0, 1fr);
    }

    .ranking-score {
        display: none;
    }
}

@media (max-width: 640px) {
    .container-wrap {
        width: min(100% - 22px, 1180px);
    }

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

    .logo-text {
        font-size: 17px;
    }

    .hero-carousel,
    .hero-track {
        min-height: 620px;
    }

    .hero-content {
        padding-top: 66px;
    }

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

    .hero-search-wrap {
        margin-top: -30px;
    }

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

    .hero-search input {
        min-width: 0;
    }

    .section {
        padding-top: 52px;
    }

    .section-header {
        display: block;
    }

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

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

    .page-hero-card {
        padding: 28px;
    }

    .ranking-row {
        grid-template-columns: 42px 64px minmax(0, 1fr);
        gap: 12px;
        padding: 10px;
    }

    .ranking-index {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .ranking-title {
        font-size: 16px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body p,
    .ranking-desc {
        display: none;
    }

    .content-panel {
        padding: 20px;
    }
}
