:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #38bdf8;
    --slate: #111827;
    --slate-soft: #1e293b;
    --radius: 22px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.7;
}

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #1e293b, #334155, #1e293b);
    color: #ffffff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.22);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 21px;
    letter-spacing: 0.03em;
}

.brand-text em {
    font-style: normal;
    color: #cbd5e1;
    font-size: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 650;
    color: #e2e8f0;
}

.nav-link {
    transition: color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--accent);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 2px;
}

.mobile-menu {
    display: none;
    background: #1e293b;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu.open {
    display: grid;
}

.mobile-nav-link {
    padding: 13px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.2), transparent 35%), linear-gradient(135deg, #0f172a 0%, #1e3a8a 48%, #111827 100%);
    color: #ffffff;
}

.hero-inner {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) 420px;
    gap: 56px;
    align-items: center;
    opacity: 0;
    transform: translateY(28px);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

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

.eyebrow {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-carousel .eyebrow,
.gradient-section .eyebrow,
.page-hero .eyebrow,
.detail-hero .eyebrow {
    color: #7dd3fc;
}

.hero-copy h1 {
    margin: 0 0 22px;
    font-size: clamp(42px, 6vw, 74px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-text {
    margin: 0 0 34px;
    max-width: 660px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.32);
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.ghost-btn.dark {
    border-color: var(--line);
    background: #ffffff;
    color: var(--ink);
}

.hero-poster {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    transform: perspective(900px) rotateY(-6deg);
    background: rgba(255, 255, 255, 0.08);
}

.hero-poster img,
.movie-card img,
.rank-cover img,
.detail-poster img,
.category-thumb-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster span,
.play-icon {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 54px;
    opacity: 0;
    background: rgba(0, 0, 0, 0.28);
    transition: opacity 0.25s ease;
}

.hero-poster:hover span,
.movie-card:hover .play-icon {
    opacity: 1;
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 42px;
    display: flex;
    gap: 10px;
    z-index: 4;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.hero-dots button.active {
    width: 34px;
    background: #60a5fa;
}

.hero-glow {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    filter: blur(60px);
    opacity: 0.42;
}

.hero-glow-one {
    top: 80px;
    right: 12%;
    background: #38bdf8;
}

.hero-glow-two {
    bottom: -120px;
    left: 10%;
    background: #2563eb;
}

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

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

.section-title h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.section-title a,
.text-link {
    color: var(--primary);
    font-weight: 800;
}

.light-title {
    color: #ffffff;
}

.light-title a {
    color: #bfdbfe;
}

.quick-search {
    margin-top: -42px;
    position: relative;
    z-index: 6;
}

.quick-search-card,
.filter-panel {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.quick-search-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 24px;
    align-items: center;
    padding: 26px;
}

.quick-search h2,
.filter-head h2 {
    margin: 0;
    font-size: 24px;
}

.quick-input,
.filter-controls label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.quick-input input,
.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    background: #ffffff;
    color: var(--ink);
    outline: none;
}

.quick-input input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16);
}

.hidden-filter-result {
    display: none;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #dbe4ee;
}

.poster-link img {
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.55));
    opacity: 0.92;
}

.corner-label,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.corner-label {
    right: 12px;
    background: rgba(37, 99, 235, 0.92);
}

.rank-badge {
    left: 12px;
    background: rgba(220, 38, 38, 0.92);
}

.movie-body {
    padding: 16px;
}

.movie-meta {
    margin: 0 0 6px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.movie-body h2 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-body h2 a:hover {
    color: var(--primary);
}

.movie-desc {
    margin: 0 0 12px;
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.compact-card .movie-body h2 {
    font-size: 15px;
}

.compact-card .movie-desc {
    display: none;
}

.gradient-section {
    background: linear-gradient(135deg, #0f172a, #1e3a8a 55%, #111827);
}

.muted-section {
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

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

.category-card {
    min-height: 180px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-large-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-card span {
    color: var(--primary);
    font-size: 20px;
    font-weight: 900;
}

.category-card strong {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.category-card em {
    color: var(--primary);
    font-style: normal;
    font-weight: 900;
}

.page-hero,
.detail-hero {
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.2), transparent 38%), linear-gradient(135deg, #111827, #1e3a8a);
    color: #ffffff;
    padding: 86px 0;
}

.page-hero h1,
.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p,
.detail-one-line {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: 19px;
}

.small-actions {
    margin-top: 26px;
}

.filter-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 36px auto 0;
    padding: 26px;
}

.filter-head {
    margin-bottom: 20px;
}

.filter-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.filter-controls {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 16px;
}

.empty-state {
    margin: 18px 0 0;
    padding: 18px;
    border-radius: 16px;
    background: #fff7ed;
    color: #9a3412;
    font-weight: 800;
}

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

.category-large-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-thumb-stack img {
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    background: #dbe4ee;
}

.category-large-card h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.rank-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: #dbe4ee;
}

.rank-cover b {
    position: absolute;
    left: 8px;
    top: 8px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 12px;
}

.rank-content p {
    margin: 0 0 4px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.rank-content h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-content h2 a:hover {
    color: var(--primary);
}

.rank-content span {
    color: var(--muted);
    font-size: 14px;
}

.detail-hero {
    padding: 64px 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.large-tags {
    margin: 24px 0;
}

.player-section {
    padding: 48px 0 22px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #030712;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.main-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #030712;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.62));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.95);
    color: #ffffff;
    font-size: 36px;
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.34);
}

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

.detail-content {
    padding: 34px 0 0;
}

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

.breadcrumb a {
    color: var(--primary);
    font-weight: 800;
}

.detail-content section {
    margin-bottom: 30px;
    padding: 26px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.detail-content h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.detail-content p {
    margin: 0;
    color: #334155;
    font-size: 17px;
}

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

.info-list div {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.info-list dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.info-list dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.site-footer {
    margin-top: 60px;
    background: linear-gradient(180deg, #0f172a, #020617);
    color: #cbd5e1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 32px;
    padding: 54px 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 20px;
    margin-bottom: 14px;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

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

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.site-footer a:hover {
    color: #60a5fa;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 18px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

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

    .menu-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr 310px;
        gap: 32px;
    }

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

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

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

@media (max-width: 760px) {
    .container,
    .nav-inner,
    .hero-inner,
    .filter-panel {
        width: min(100% - 24px, 1180px);
    }

    .brand-text em {
        display: none;
    }

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

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 38px 0 90px;
    }

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

    .hero-dots {
        bottom: 24px;
    }

    .quick-search {
        margin-top: 20px;
    }

    .quick-search-card,
    .filter-controls,
    .detail-grid,
    .footer-grid,
    .category-large-card {
        grid-template-columns: 1fr;
    }

    .section-title {
        display: grid;
        align-items: start;
    }

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

    .movie-body {
        padding: 13px;
    }

    .movie-body h2 {
        font-size: 15px;
    }

    .movie-desc {
        font-size: 13px;
    }

    .page-hero,
    .detail-hero {
        padding: 54px 0;
    }

    .detail-poster {
        width: min(280px, 100%);
        margin: 0 auto;
    }

    .info-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .latest-grid,
    .catalog-grid,
    .compact-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .detail-actions {
        display: grid;
    }
}
