:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --teal: #0d9488;
    --dark: #020617;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.26);
}

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

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

.nav-link,
.mobile-link {
    color: #334155;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--blue);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #eff6ff;
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}

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

main {
    min-height: 70vh;
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb, #0891b2 52%, #0f766e);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: blur(18px) saturate(1.1);
    transform: scale(1.06);
    opacity: 0.34;
}

.hero-overlay,
.detail-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.24), transparent 28%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(37, 99, 235, 0.72) 45%, rgba(13, 148, 136, 0.76));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 380px;
    align-items: center;
    gap: 56px;
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    color: #bae6fd;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-main h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-desc {
    max-width: 690px;
    margin: 22px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 650;
}

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

.primary-btn,
.ghost-btn,
.quick-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    border: 0;
    font-weight: 800;
    cursor: pointer;
}

.primary-btn,
.quick-search button {
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
}

.ghost-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 32px 70px rgba(2, 6, 23, 0.42);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.15;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    min-width: 12px;
    padding: 0;
    opacity: 0.7;
}

.hero-dots button.active {
    width: 30px;
    opacity: 1;
    background: #fff;
}

.search-strip,
.section-block,
.footer-grid,
.footer-bottom,
.page-hero,
.detail-content,
.player-section {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.search-strip {
    margin-top: -48px;
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}

.search-strip strong {
    display: block;
    font-size: 20px;
}

.search-strip span {
    color: var(--muted);
}

.quick-search,
.filter-bar {
    display: flex;
    gap: 10px;
}

.quick-search input,
.filter-bar input {
    width: min(420px, 70vw);
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 16px;
    outline: none;
    background: #fff;
}

.quick-search input:focus,
.filter-bar input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

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

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

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

.section-head a {
    color: var(--blue);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.32);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.15);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.poster-wrap img {
    width: 100%;
    aspect-ratio: 3 / 4.1;
    object-fit: cover;
    transition: transform 0.32s ease;
}

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

.poster-chip,
.rank-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.rank-badge {
    left: 10px;
    right: auto;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 14px;
}

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

.movie-info p {
    flex: 1;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.tag-row {
    margin-top: 10px;
}

.tag-row span {
    color: #2563eb;
    background: #eff6ff;
}

.soft-panel {
    padding: 44px;
    margin-top: 72px;
    border-radius: 34px;
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.category-card,
.category-wide-card,
.feature-tile,
.text-card,
.rank-panel,
.new-panel {
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    padding: 18px;
    color: #fff;
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
    transition: transform 0.28s ease;
}

.category-card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.78));
}

.category-card span,
.category-card em {
    position: relative;
    z-index: 1;
    display: block;
}

.category-card span {
    margin-top: 76px;
    font-size: 20px;
    font-weight: 900;
}

.category-card em {
    font-style: normal;
    opacity: 0.86;
}

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

.split-section {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 24px;
}

.rank-panel,
.new-panel {
    padding: 26px;
}

.compact-head {
    margin-bottom: 18px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 34px 48px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.rank-item:hover {
    background: #f1f5f9;
}

.rank-item img {
    width: 48px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-number {
    color: var(--blue);
    font-weight: 900;
}

.rank-title {
    font-weight: 800;
}

.rank-meta {
    color: var(--muted);
    font-size: 13px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 36px;
    align-items: center;
    margin-top: 42px;
    padding: 54px;
    border-radius: 34px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22), transparent 28%),
        linear-gradient(135deg, #2563eb, #0891b2 56%, #0f766e);
    box-shadow: var(--shadow);
}

.slim-hero {
    display: block;
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
}

.category-hero .filter-bar,
.slim-hero .filter-bar {
    margin-top: 24px;
}

.feature-tile {
    overflow: hidden;
    color: var(--text);
}

.feature-tile img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.feature-tile strong,
.feature-tile span {
    display: block;
    padding: 0 18px;
}

.feature-tile strong {
    padding-top: 16px;
    font-size: 18px;
}

.feature-tile span {
    padding-bottom: 18px;
    color: var(--muted);
    font-size: 13px;
}

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

.category-wide-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 18px;
    align-items: center;
}

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

.category-collage img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 14px;
    object-fit: cover;
}

.category-wide-card h2 {
    margin: 0 0 8px;
}

.category-wide-card p {
    margin: 0;
    color: var(--muted);
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(--dark);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: blur(18px);
    transform: scale(1.06);
    opacity: 0.48;
}

.detail-content {
    position: relative;
    z-index: 2;
    padding: 42px 0 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fff;
}

.detail-grid {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    width: 250px;
    aspect-ratio: 3 / 4.1;
    border-radius: 26px;
    object-fit: cover;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}

.detail-main h1 {
    max-width: 880px;
}

.detail-one-line {
    max-width: 880px;
    margin: 18px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.detail-tags span {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.14);
}

.player-section {
    margin-top: -34px;
    position: relative;
    z-index: 5;
}

.player-shell {
    padding: 14px;
    border-radius: 30px;
    background: #fff;
    box-shadow: var(--shadow);
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    aspect-ratio: 16 / 9;
    cursor: pointer;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.24), rgba(2, 6, 23, 0.64));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 24px 55px rgba(37, 99, 235, 0.44);
    font-size: 34px;
    text-indent: 5px;
}

.play-overlay strong {
    font-size: 20px;
}

.detail-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.text-card {
    padding: 28px;
}

.text-card h2 {
    margin: 0 0 12px;
}

.text-card p {
    margin: 0;
    color: #475569;
}

.movie-card.hidden-by-filter {
    display: none;
}

.site-footer {
    margin-top: 78px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 1fr;
    gap: 44px;
    padding: 52px 0 34px;
}

.footer-brand {
    color: #fff;
    font-size: 20px;
}

.site-footer p {
    max-width: 520px;
    color: #94a3b8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

.site-footer a:hover {
    color: #38bdf8;
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tags a {
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    padding: 18px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 14px;
}

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

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

    .hero-content {
        grid-template-columns: 1fr 300px;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-content,
    .page-hero,
    .split-section,
    .detail-grid,
    .detail-text,
    .footer-grid,
    .category-wide-card {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 54px 0 96px;
        gap: 28px;
    }

    .hero-poster {
        width: min(280px, 86vw);
        margin: 0 auto;
    }

    .search-strip {
        display: grid;
    }

    .quick-search,
    .filter-bar {
        width: 100%;
    }

    .quick-search input,
    .filter-bar input {
        width: 100%;
    }

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

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

    .rank-meta {
        display: none;
    }

    .page-hero {
        padding: 34px;
    }

    .detail-poster {
        width: min(240px, 70vw);
    }
}

@media (max-width: 560px) {
    .nav-shell,
    .search-strip,
    .section-block,
    .footer-grid,
    .footer-bottom,
    .page-hero,
    .detail-content,
    .player-section {
        width: min(100% - 22px, 1180px);
    }

    .hero h1,
    .page-hero h1,
    .detail-main h1 {
        font-size: 34px;
    }

    .hero-desc,
    .detail-one-line {
        font-size: 16px;
    }

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

    .soft-panel {
        padding: 24px;
    }

    .section-block {
        padding-top: 46px;
    }

    .footer-grid {
        gap: 20px;
    }
}
