@font-face {
    font-family: "InterVar";
    src: local("Arial");
    font-display: swap;
}

:root {
    --blue: #2563eb;
    --cyan: #06b6d4;
    --deep: #0f172a;
    --muted: #64748b;
    --soft: #f8fafc;
    --line: #e2e8f0;
    --card: #ffffff;
    --radius-xl: 28px;
    --shadow-card: 0 18px 50px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 30px rgba(37, 99, 235, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: InterVar, Arial, "Microsoft YaHei", sans-serif;
    color: #1e293b;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 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;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1800px;
    height: 80px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: max-content;
}

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

.brand-copy strong {
    display: block;
    font-size: 26px;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-copy small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    color: #334155;
    background: #f1f5f9;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 20px 20px;
}

.mobile-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
}

.mobile-category-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #475569;
    background: #f8fafc;
}

.hero-section {
    position: relative;
    padding: 16px;
}

.hero-grid {
    min-height: calc(85vh - 112px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
    background: #0f172a;
}

.hero-card a,
.hero-card img,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

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

.hero-shade {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.45) 36%, rgba(2, 6, 23, 0.92));
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 34px;
    color: #ffffff;
}

.hero-label,
.section-heading span,
.detail-label {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-content h1 {
    margin: 18px 0 14px;
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1.06;
    letter-spacing: -0.06em;
}

.hero-content p {
    margin: 0 0 20px;
    color: #dbeafe;
    line-height: 1.75;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: #2563eb;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 800;
}

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

.hero-button,
.primary-action,
.feature-copy a,
.category-panel-head a,
.search-page-form button,
.hero-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    box-shadow: var(--shadow-soft);
    font-weight: 800;
    cursor: pointer;
}

.hero-button {
    margin-top: 22px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--blue);
}

.hero-search {
    max-width: 1040px;
    margin: -42px auto 0;
    position: relative;
    z-index: 3;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
}

.hero-search label,
.filter-box label {
    display: block;
    margin-bottom: 10px;
    color: #0f172a;
    font-weight: 800;
}

.hero-search div,
.search-page-form {
    display: flex;
    gap: 12px;
}

.hero-search input,
.search-page-form input,
.filter-box input {
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    background: #ffffff;
}

.hero-search input:focus,
.search-page-form input:focus,
.filter-box input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.section-wrap {
    max-width: 1600px;
    margin: 0 auto;
    padding: 58px 28px;
}

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

.section-heading h2 {
    margin: 0;
    flex: 1;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    color: #0f172a;
    letter-spacing: -0.06em;
}

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

.category-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-strip a {
    padding: 12px 18px;
    border-radius: 999px;
    color: #334155;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e2e8f0;
}

.wide-grid .card-cover {
    aspect-ratio: 16 / 10;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.62));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-overlay {
    opacity: 1;
}

.card-badge,
.play-chip {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.card-badge {
    top: 12px;
    right: 12px;
    background: linear-gradient(90deg, #f97316, #ef4444);
}

.play-chip {
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%) translateY(10px);
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .play-chip {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.card-body {
    padding: 18px;
}

.card-body h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 19px;
    line-height: 1.35;
}

.card-body h2 a:hover {
    color: var(--blue);
}

.card-meta {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 13px;
}

.card-summary {
    margin: 0 0 14px;
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
}

.feature-band {
    max-width: 1600px;
    margin: 56px auto;
    padding: 32px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 38px;
    border-radius: 34px;
    color: #ffffff;
    background: linear-gradient(120deg, var(--blue), var(--cyan));
    box-shadow: 0 24px 70px rgba(37, 99, 235, 0.28);
}

.feature-media {
    position: relative;
    overflow: hidden;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
}

.feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-media span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
    font-size: 36px;
}

.feature-copy span {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 800;
}

.feature-copy h2 {
    margin: 18px 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.feature-copy p {
    margin: 0 0 24px;
    color: #eff6ff;
    line-height: 1.8;
}

.feature-copy a {
    color: var(--blue);
    background: #ffffff;
}

.rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 300px;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 20px;
    scroll-snap-type: x proximity;
}

.rail .movie-card {
    scroll-snap-align: start;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 36px;
}

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

.rank-list.compact {
    position: sticky;
    top: 104px;
}

.rank-item {
    display: grid;
    grid-template-columns: auto 86px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.rank-num {
    min-width: 44px;
    color: transparent;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    font-size: 28px;
    font-weight: 950;
    text-align: center;
}

.rank-thumb {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 3 / 4;
    background: #e2e8f0;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-copy h2 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #0f172a;
}

.rank-copy p,
.rank-copy span {
    display: block;
    margin: 0 0 6px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

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

.category-card {
    padding: 22px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

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

.category-card p {
    margin: 0 0 14px;
    color: #64748b;
    line-height: 1.7;
}

.category-card div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-card div a {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--blue);
    background: #eff6ff;
    font-size: 12px;
    font-weight: 800;
}

.inner-hero {
    max-width: 1600px;
    margin: 28px auto 0;
    padding: 70px 32px;
    border-radius: 34px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.75), transparent 35%), linear-gradient(135deg, #0f172a, #1d4ed8);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.inner-hero span {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 900;
}

.inner-hero h1 {
    margin: 18px 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -0.08em;
}

.inner-hero p {
    max-width: 850px;
    margin: 0;
    color: #dbeafe;
    line-height: 1.8;
}

.filter-box {
    max-width: 720px;
    margin-top: 28px;
}

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

.category-index-grid a {
    min-height: 168px;
    padding: 24px;
    border-radius: 26px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: var(--shadow-soft);
}

.category-index-grid strong {
    display: block;
    margin-bottom: 14px;
    font-size: 24px;
}

.category-index-grid span {
    color: #eff6ff;
    line-height: 1.65;
}

.category-panels {
    display: grid;
    gap: 30px;
}

.category-panel {
    padding: 24px;
    border-radius: 30px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

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

.category-panel-head span {
    color: var(--blue);
    font-weight: 900;
}

.category-panel-head h2 {
    margin: 8px 0;
    color: #0f172a;
    font-size: 34px;
}

.category-panel-head p {
    margin: 0;
    color: #64748b;
}

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

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

.breadcrumb {
    max-width: 1600px;
    margin: 28px auto 0;
    padding: 0 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-size: 14px;
}

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

.detail-shell {
    max-width: 1600px;
    margin: 24px auto 0;
    padding: 0 28px 40px;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(340px, 0.8fr);
    gap: 28px;
}

.player-panel,
.detail-info,
.detail-copy {
    border-radius: 30px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.player-panel {
    overflow: hidden;
    padding: 18px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #020617;
}

.video-frame video,
.player-cover,
.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-frame video,
.player-cover img {
    object-fit: cover;
}

.player-cover {
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

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

.player-cover button {
    position: relative;
    z-index: 4;
    width: 98px;
    height: 98px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(18px);
    font-size: 42px;
    cursor: pointer;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.35);
}

.detail-info {
    padding: 24px;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 22px;
    align-content: start;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
}

.detail-info h1 {
    margin: 16px 0 12px;
    color: #0f172a;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.detail-info p {
    color: #475569;
    line-height: 1.75;
}

.detail-meta {
    color: #64748b;
    font-weight: 700;
}

.detail-tags {
    margin: 18px 0;
}

.detail-copy {
    line-height: 1.9;
}

.detail-copy h2 {
    margin: 0 0 16px;
    color: #0f172a;
    font-size: 30px;
}

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

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

.search-page-form {
    max-width: 760px;
    margin-top: 28px;
}

.site-footer {
    margin-top: 60px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.footer-grid {
    max-width: 1600px;
    margin: 0 auto;
    padding: 58px 28px;
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 38px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 24px;
}

.site-footer p {
    color: #bfdbfe;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 16px;
    font-size: 19px;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    max-width: 1600px;
    margin: 0 auto;
    padding: 22px 28px;
    border-top: 1px solid rgba(191, 219, 254, 0.25);
    color: #bfdbfe;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

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

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

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

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

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

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

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

    .hero-grid {
        min-height: 72vh;
        display: block;
    }

    .hero-card {
        min-height: 72vh;
        display: none;
    }

    .hero-card.is-active,
    .hero-card:first-child {
        display: block;
    }

    .hero-search {
        margin-top: 18px;
    }

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

    .feature-band,
    .split-section,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .header-inner {
        height: 70px;
        padding: 0 16px;
    }

    .brand-mark {
        width: 42px;
        height: 42px;
    }

    .brand-copy strong {
        font-size: 22px;
    }

    .brand-copy small {
        display: none;
    }

    .hero-section {
        padding: 10px;
    }

    .hero-card,
    .hero-grid {
        min-height: 68vh;
    }

    .hero-content {
        padding: 24px;
    }

    .hero-search div,
    .search-page-form {
        flex-direction: column;
    }

    .section-wrap,
    .detail-shell,
    .breadcrumb {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

    .rank-item {
        grid-template-columns: auto 72px minmax(0, 1fr);
        gap: 12px;
    }

    .feature-band,
    .category-panel,
    .inner-hero {
        border-radius: 24px;
        margin-left: 10px;
        margin-right: 10px;
    }
}
