:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #38bdf8;
    --accent-strong: #0ea5e9;
    --accent-soft: rgba(14, 165, 233, 0.18);
    --shadow: 0 24px 70px rgba(2, 8, 23, 0.48);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.16), transparent 30rem),
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 16px 42px rgba(2, 8, 23, 0.32);
}

.header-inner,
.section-inner,
.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #7dd3fc, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #e0f2fe;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.48);
    font-size: 13px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.desktop-nav a,
.mobile-nav a {
    position: relative;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: var(--accent);
    transition: transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #f8fafc;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 8px 16px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-nav a {
    display: block;
    padding: 12px 16px;
    border-radius: 12px;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background: rgba(56, 189, 248, 0.12);
}

.hero {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

.hero-slide img {
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.92) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100% - 1200px) / 2));
    bottom: 72px;
    width: min(720px, calc(100% - 48px));
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #7dd3fc;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-kicker::before,
.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.8);
}

.hero h1 {
    margin: 16px 0;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: 19px;
    line-height: 1.75;
}

.hero-meta,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #cbd5e1;
    font-size: 14px;
}

.hero-meta span,
.detail-meta span,
.rank-meta span {
    padding: 6px 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
}

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

.primary-btn,
.ghost-btn,
.home-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.home-search button {
    color: #f8fafc;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 16px 36px rgba(14, 165, 233, 0.35);
}

.ghost-btn {
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.62);
}

.primary-btn:hover,
.ghost-btn:hover,
.home-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(14, 165, 233, 0.44);
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100% - 1200px) / 2));
    bottom: 38px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.48);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--accent);
}

.search-band,
.section-dark {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.78));
    border-block: 1px solid rgba(148, 163, 184, 0.13);
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 520px);
    align-items: center;
    gap: 28px;
    padding: 34px 0;
}

.search-panel h2,
.section-title h2,
.player-section h2,
.detail-article h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.search-panel p,
.page-hero p,
.category-card p,
.detail-article p,
.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

.home-search,
.filter-panel {
    display: flex;
    gap: 12px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.42);
    outline: none;
    padding: 0 16px;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.filter-panel select {
    max-width: 180px;
}

.block-section {
    padding: 58px 0;
}

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

.section-title a {
    color: #7dd3fc;
    font-weight: 900;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 50px rgba(2, 8, 23, 0.24);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 24px 70px rgba(14, 165, 233, 0.18);
}

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

.poster-wrap img,
.rank-cover img,
.detail-poster img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .poster-wrap img {
    transform: scale(1.08);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.88) 100%);
}

.poster-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(14, 165, 233, 0.82);
    font-size: 12px;
    font-weight: 900;
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-content h3 a:hover,
.breadcrumbs a:hover {
    color: #7dd3fc;
}

.movie-meta,
.movie-desc {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    color: #bae6fd;
    border: 1px solid rgba(56, 189, 248, 0.2);
    background: rgba(14, 165, 233, 0.1);
    font-size: 12px;
    font-weight: 700;
}

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

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

.category-card {
    min-height: 176px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 14rem),
        rgba(15, 23, 42, 0.76);
    box-shadow: 0 18px 50px rgba(2, 8, 23, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.44);
}

.category-card h3 {
    margin: 0;
    font-size: 22px;
}

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

.category-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #e0f2fe;
    background: rgba(14, 165, 233, 0.26);
}

.page-hero {
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.18), transparent 38%),
        linear-gradient(90deg, #020617, #0f172a);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.compact-hero .section-inner {
    padding: 68px 0 58px;
}

.page-hero h1 {
    margin: 12px 0;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.05em;
}

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

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

.rank-item {
    position: relative;
    display: grid;
    grid-template-columns: 88px 48px 1fr;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 16px 44px rgba(2, 8, 23, 0.2);
}

.rank-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: #0f172a;
}

.rank-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #e0f2fe;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    font-weight: 900;
}

.rank-content h3 {
    margin: 0 0 8px;
    font-size: 21px;
}

.rank-content p {
    margin: 0 0 12px;
    color: #cbd5e1;
    line-height: 1.65;
}

.detail-hero {
    padding: 54px 0;
    background:
        radial-gradient(circle at 15% 12%, rgba(56, 189, 248, 0.16), transparent 30rem),
        linear-gradient(180deg, #020617, #0f172a);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 38px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 22px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.detail-info h1 {
    margin: 14px 0 16px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 760px;
    margin: 0 0 20px;
    color: #cbd5e1;
    font-size: 19px;
    line-height: 1.8;
}

.detail-tags {
    margin: 20px 0 26px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #94a3b8;
    font-size: 14px;
}

.player-section {
    padding-top: 54px;
}

.player-shell {
    position: relative;
    margin-top: 20px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #e0f2fe;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 0 42px rgba(14, 165, 233, 0.55);
    font-size: 28px;
}

.play-overlay.is-hidden {
    display: none;
}

.content-section {
    padding: 42px 0 10px;
}

.detail-article {
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 44px rgba(2, 8, 23, 0.2);
}

.detail-article h2:not(:first-child) {
    margin-top: 26px;
}

.detail-article p {
    margin: 14px 0 0;
    color: #d1d5db;
    font-size: 17px;
}

.site-footer {
    margin-top: 40px;
    padding: 36px 0;
    color: #cbd5e1;
    background: #020617;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

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

.footer-inner strong {
    font-size: 20px;
    color: #f8fafc;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 18px;
}

.footer-links a {
    color: #94a3b8;
}

.footer-links a:hover {
    color: #7dd3fc;
}

.hidden-by-filter {
    display: none !important;
}

@media (max-width: 1100px) {
    .poster-grid.six-col,
    .listing-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .hero {
        min-height: 620px;
        height: 78vh;
    }

    .hero-content {
        bottom: 92px;
    }

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

    .hero p {
        font-size: 16px;
    }

    .hero-dots {
        left: 24px;
        right: auto;
    }

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

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

    .poster-grid,
    .poster-grid.six-col,
    .listing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .filter-panel,
    .home-search {
        flex-direction: column;
    }

    .filter-panel select {
        max-width: none;
    }

    .rank-item {
        grid-template-columns: 72px 42px 1fr;
        gap: 12px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .section-inner,
    .footer-inner {
        width: min(100% - 22px, 1200px);
    }

    .logo {
        font-size: 18px;
    }

    .poster-grid,
    .poster-grid.six-col,
    .listing-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .movie-desc,
    .tag-row {
        display: none;
    }

    .rank-item {
        grid-template-columns: 62px 1fr;
    }

    .rank-number {
        position: absolute;
        left: 10px;
        top: 10px;
        width: 34px;
        height: 34px;
    }

    .rank-content h3 {
        font-size: 17px;
    }

    .rank-content p {
        display: none;
    }

    .play-overlay span {
        width: 66px;
        height: 66px;
    }
}
