: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);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #60a5fa;
    --green: #34d399;
    --shadow: 0 24px 70px rgba(8, 47, 73, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.18), transparent 32rem),
        radial-gradient(circle at 85% 10%, rgba(96, 165, 250, 0.18), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input {
    font: inherit;
}

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

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #06111f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.28);
}

.brand-text,
.footer-brand {
    font-size: 22px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 9px 12px;
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 14px;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan);
    background: rgba(15, 23, 42, 0.86);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-input,
.search-large input {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.22);
    outline: none;
    border-radius: 14px;
    transition: 0.2s ease;
}

.header-search input {
    width: 230px;
    padding: 10px 13px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.search-large input:focus {
    border-color: rgba(34, 211, 238, 0.75);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.header-search button,
.mobile-search button,
.search-large button,
.hero-button,
.ghost-button,
.play-overlay button {
    border: 0;
    cursor: pointer;
    border-radius: 14px;
    color: #04111d;
    font-weight: 800;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 35px rgba(34, 211, 238, 0.22);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.header-search button,
.mobile-search button {
    padding: 10px 14px;
}

.header-search button:hover,
.mobile-search button:hover,
.search-large button:hover,
.hero-button:hover,
.ghost-button:hover,
.play-overlay button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

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

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.mobile-search {
    margin-bottom: 8px;
}

.mobile-search input {
    flex: 1;
    padding: 11px 13px;
}

.page-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-radius: 0 0 36px 36px;
    border-bottom: 1px solid var(--line);
    background: #020617;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    inset: auto;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(20px);
}

.hero::before {
    width: 520px;
    height: 520px;
    right: -140px;
    top: -140px;
    background: rgba(34, 211, 238, 0.16);
}

.hero::after {
    width: 420px;
    height: 420px;
    left: -120px;
    bottom: -160px;
    background: rgba(96, 165, 250, 0.16);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: saturate(1.05);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.32) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    padding: 72px 0 84px;
}

.hero-kicker,
.section-kicker,
.breadcrumbs {
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 14px 0 18px;
    max-width: 760px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero h1 span {
    background: linear-gradient(90deg, #fff, #bff7ff 46%, #93c5fd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    max-width: 680px;
    margin: 0 0 26px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.9;
}

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

.hero-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
}

.ghost-button {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: none;
}

.hero-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-meta span,
.movie-meta span,
.movie-tags span,
.tag-pill,
.category-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.20);
}

.hero-meta span {
    padding: 7px 12px;
}

.hero-panel {
    position: relative;
    align-self: center;
    padding: 18px;
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-panel img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 22px;
}

.hero-panel-info {
    position: absolute;
    inset: auto 32px 32px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.80);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(14px);
}

.hero-panel-info strong {
    display: block;
    margin-bottom: 6px;
    font-size: 22px;
}

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

.hero-dot {
    width: 38px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.28);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--cyan);
}

.section {
    margin: 72px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-desc {
    margin: 8px 0 0;
    max-width: 720px;
    color: var(--muted);
    line-height: 1.8;
}

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

.category-card {
    min-height: 164px;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.16), transparent 42%),
        rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.44);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 21px;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
    font-size: 14px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.70);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.44);
    box-shadow: 0 26px 70px rgba(2, 6, 23, 0.38);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4.2;
    background: #0f172a;
}

.movie-card.large .movie-poster {
    aspect-ratio: 16 / 10;
}

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

.movie-card:hover .movie-poster img,
.mini-card:hover img,
.rank-card:hover img {
    transform: scale(1.06);
}

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), transparent 54%);
}

.play-mark {
    position: absolute;
    z-index: 2;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #03111d;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.22);
}

.movie-info {
    padding: 16px;
}

.movie-title {
    display: block;
    min-height: 2.8em;
    color: #f8fafc;
    font-weight: 900;
    line-height: 1.35;
}

.movie-title:hover,
.rank-title:hover {
    color: var(--cyan);
}

.movie-line {
    display: -webkit-box;
    min-height: 4.8em;
    margin: 10px 0;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.movie-meta {
    color: #cbd5e1;
    font-size: 12px;
}

.movie-meta span {
    padding: 5px 9px;
    color: #dbeafe;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.movie-tags span,
.tag-pill,
.category-pill {
    padding: 5px 9px;
    font-size: 12px;
}

.movie-genre {
    margin-top: 10px;
    color: #7dd3fc;
    font-size: 13px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: auto 120px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-card:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.42);
}

.rank-num {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #04111d;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-thumb {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 16 / 10;
    background: #0f172a;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.rank-body p {
    margin: 8px 0 12px;
    color: var(--muted);
    line-height: 1.7;
}

.rank-title {
    font-size: 20px;
    font-weight: 900;
}

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

.mini-card {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
}

.mini-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    transition: transform 0.3s ease;
}

.mini-card span {
    font-weight: 800;
    line-height: 1.35;
}

.mini-card small {
    color: var(--muted);
}

.page-hero,
.detail-hero {
    margin: 42px 0 34px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 85% 0%, rgba(34, 211, 238, 0.18), transparent 40%),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.page-hero h1,
.detail-title {
    margin: 12px 0;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.page-hero p,
.detail-intro {
    max-width: 860px;
    color: #cbd5e1;
    line-height: 1.9;
    font-size: 17px;
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.62);
}

.filter-input,
.search-large input {
    width: 100%;
    padding: 14px 16px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 0.78fr 1.22fr;
    gap: 28px;
    align-items: start;
}

.detail-cover {
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

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

.detail-panel,
.content-panel,
.player-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.detail-panel {
    padding: 28px;
}

.breadcrumbs {
    margin-bottom: 14px;
    font-size: 13px;
}

.breadcrumbs a:hover {
    color: #e0f2fe;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
}

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

.content-panel h2,
.player-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 900;
}

.content-panel p {
    color: #cbd5e1;
    line-height: 2;
    font-size: 16px;
}

.player-card {
    margin-top: 32px;
    overflow: hidden;
}

.player-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
}

.video-wrap {
    position: relative;
    background: #000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.22)),
        radial-gradient(circle at center, rgba(34, 211, 238, 0.18), transparent 32%);
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-overlay button {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 28px;
}

.search-large {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-top: 24px;
}

.search-large button {
    padding: 0 24px;
}

.empty-result {
    display: none;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 24px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.62);
}

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

.footer-grid {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
    padding: 44px 0;
}

.site-footer p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.8;
}

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

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

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

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

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 34px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

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

    .hero-panel {
        max-width: 520px;
    }

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

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

@media (max-width: 760px) {
    .header-inner {
        min-height: 64px;
    }

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

    .hero,
    .hero-content {
        min-height: 680px;
    }

    .hero-content {
        padding: 42px 0 84px;
        gap: 26px;
    }

    .hero-panel-info {
        inset: auto 22px 22px;
    }

    .section {
        margin: 48px 0;
    }

    .section-head,
    .filter-bar,
    .player-head {
        display: grid;
        align-items: start;
    }

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

    .rank-card {
        grid-template-columns: 48px 86px 1fr;
        gap: 10px;
        padding: 10px;
    }

    .rank-num {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 13px;
    }

    .rank-body p {
        display: none;
    }

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

    .page-hero,
    .detail-panel,
    .content-panel {
        padding: 22px;
        border-radius: 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .search-large button {
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    .page-shell,
    .header-inner,
    .mobile-nav,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1240px);
    }

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

    .hero h1 {
        font-size: 40px;
    }
}
