:root {
    --bg: #f6f8fc;
    --panel: #ffffff;
    --ink: #101827;
    --muted: #667085;
    --line: #e4e9f2;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #8b5cf6;
    --slate: #0f172a;
    --slate-soft: #1e293b;
    --radius: 18px;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a, #1e293b 52%, #0f172a);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

.header-inner {
    max-width: 1240px;
    height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 26px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.brand-name {
    font-size: 24px;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, #60a5fa, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
}

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

.header-search input,
.mobile-search input,
.hero-search input,
.catalog-tools input,
.catalog-tools select {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input,
.mobile-search input {
    width: 250px;
    padding: 10px 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.58);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: #94a3b8;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.catalog-tools input:focus,
.catalog-tools select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

.header-search button,
.mobile-search button,
.hero-search button,
.primary-btn,
.ghost-btn {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.hero-search button,
.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

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

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #ffffff;
    font-size: 28px;
    background: transparent;
}

.mobile-panel {
    display: none;
    padding: 0 22px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

.mobile-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 16px 0;
}

.mobile-nav a {
    padding: 10px;
    text-align: center;
    border-radius: 12px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    color: #ffffff;
    background: #0f172a;
}

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

.hero-slide {
    display: none;
    align-items: center;
    gap: 50px;
    padding: 82px max(24px, calc((100vw - 1240px) / 2)) 110px;
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    display: flex;
    animation: heroFade 0.6s ease both;
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: scale(1.02);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    color: #60a5fa;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 16px 0 10px;
    font-size: clamp(38px, 5vw, 70px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.14;
    color: #dbeafe;
}

.hero p {
    max-width: 650px;
    margin: 0;
    color: #d1d5db;
    font-size: 18px;
}

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

.hero-tags {
    margin: 24px 0 30px;
}

.hero-tags span,
.tag-list span,
.detail-meta span {
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
}

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

.hero-poster {
    width: min(330px, 28vw);
    flex: 0 0 auto;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(14px);
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #ffffff;
    background: transparent;
    cursor: pointer;
}

.hero-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.12);
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dot.is-active {
    width: 28px;
    border-radius: 999px;
    background: #60a5fa;
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 96px;
    width: min(720px, calc(100vw - 40px));
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(18px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.hero-search input::placeholder {
    color: #cbd5e1;
}

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

.page-main,
.detail-main,
.section-block {
    max-width: 1240px;
    margin: 0 auto;
}

.page-main,
.detail-main {
    padding: 34px 22px 0;
}

.section-block {
    padding: 54px 22px;
}

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

.section-heading.compact {
    align-items: center;
}

.section-heading h2,
.rank-panel-head h2,
.detail-text h2,
.page-hero h1 {
    margin: 6px 0 0;
    color: #111827;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.footer-inner p,
.movie-info p,
.detail-one-line,
.detail-text p {
    color: var(--muted);
}

.section-heading a {
    color: var(--primary);
    font-weight: 900;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0 0;
    height: 52%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.86), transparent);
}

.play-chip,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
}

.play-chip {
    right: 10px;
    bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(37, 99, 235, 0.92);
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.24);
}

.movie-info {
    padding: 14px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.movie-info h3 {
    margin: 8px 0 6px;
    font-size: 17px;
    line-height: 1.28;
}

.movie-info p {
    display: -webkit-box;
    min-height: 43px;
    margin: 0 0 12px;
    overflow: hidden;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-list span {
    color: #1d4ed8;
    background: #eff6ff;
}

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

.rank-panel {
    padding: 22px;
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(180deg, #0f172a, #1e293b);
    box-shadow: var(--shadow);
}

.sticky-panel {
    position: sticky;
    top: 92px;
}

.rank-panel-head h2 {
    color: #ffffff;
    font-size: 28px;
}

.rank-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.rank-row:last-child {
    border-bottom: 0;
}

.rank-no {
    grid-row: span 2;
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 900;
    background: rgba(96, 165, 250, 0.22);
}

.rank-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 900;
}

.rank-extra {
    color: #94a3b8;
    font-size: 13px;
}

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

.category-card {
    min-height: 160px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card span {
    display: block;
    margin-bottom: 10px;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
}

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

.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    padding: 44px;
    border-radius: 28px;
    color: #ffffff;
    background: radial-gradient(circle at 12% 0%, rgba(96, 165, 250, 0.50), transparent 32%), linear-gradient(135deg, #0f172a, #1e3a8a 56%, #312e81);
    box-shadow: var(--shadow);
}

.page-hero h1,
.page-hero p {
    color: #ffffff;
}

.page-hero p {
    max-width: 780px;
    color: #dbeafe;
}

.catalog-tools {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.catalog-tools label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

.catalog-search {
    flex: 1;
}

.catalog-tools input,
.catalog-tools select {
    min-height: 44px;
    padding: 0 14px;
    color: #111827;
    background: #f8fafc;
}

.catalog-selects {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.movie-card.is-hidden {
    display: none;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 24px;
    color: #64748b;
    font-weight: 800;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 34px;
    border-radius: 28px;
    color: #ffffff;
    background: radial-gradient(circle at 82% 20%, rgba(139, 92, 246, 0.38), transparent 28%), linear-gradient(135deg, #0f172a, #1d4ed8 60%, #312e81);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

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

.detail-info h1 {
    margin: 10px 0 14px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.detail-one-line {
    max-width: 760px;
    color: #dbeafe;
    font-size: 18px;
}

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

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

.detail-tags {
    margin-bottom: 28px;
}

.player-section {
    margin: 34px 0 0;
    padding: 28px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.56));
    cursor: pointer;
}

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

.player-icon {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    padding-left: 6px;
    font-size: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.38);
}

.detail-text {
    padding-top: 38px;
    padding-bottom: 20px;
}

.detail-text h2 {
    margin-top: 24px;
    margin-bottom: 10px;
    font-size: 28px;
}

.detail-text p {
    margin: 0;
    font-size: 17px;
}

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

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 22px;
    display: flex;
    justify-content: space-between;
    gap: 32px;
}

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

.footer-inner p {
    max-width: 560px;
    margin: 0;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-weight: 800;
}

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

.footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 22px 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: #94a3b8;
    font-size: 14px;
}

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

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

    .split-layout {
        grid-template-columns: 1fr;
    }

    .sticky-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .header-inner {
        gap: 14px;
    }

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

    .hero-slide {
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 54px 22px 154px;
    }

    .hero-poster {
        width: 190px;
    }

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

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

    .page-hero,
    .catalog-tools,
    .footer-inner,
    .section-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .catalog-selects {
        width: 100%;
    }

    .catalog-selects label {
        flex: 1;
        min-width: 160px;
    }

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

@media (max-width: 640px) {
    .brand-name {
        font-size: 20px;
    }

    .mobile-nav {
        grid-template-columns: repeat(2, 1fr);
    }

    .mobile-search {
        align-items: stretch;
    }

    .mobile-search input {
        width: 100%;
    }

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

    .hero h2 {
        font-size: 28px;
    }

    .hero-search {
        flex-direction: column;
        border-radius: 24px;
    }

    .hero-search button {
        min-height: 46px;
    }

    .hero-controls {
        bottom: 24px;
    }

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

    .section-block,
    .page-main,
    .detail-main {
        padding-left: 14px;
        padding-right: 14px;
    }

    .page-hero,
    .detail-hero,
    .player-section {
        padding: 22px;
        border-radius: 22px;
    }

    .player-icon {
        width: 68px;
        height: 68px;
        font-size: 30px;
    }
}
