
:root {
    --red-900: #7f1d1d;
    --red-800: #991b1b;
    --red-700: #b91c1c;
    --red-600: #dc2626;
    --red-100: #fee2e2;
    --red-50: #fef2f2;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 20px 25px -5px rgb(0 0 0 / 0.14), 0 8px 10px -6px rgb(0 0 0 / 0.12);
    --soft-shadow: 0 10px 22px rgb(15 23 42 / 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f9fafb;
    color: var(--gray-900);
    font-family: 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,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--red-900), var(--red-700));
    box-shadow: 0 8px 25px rgb(127 29 29 / 0.35);
}

.nav-wrap {
    max-width: 1280px;
    height: 70px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--white);
    color: var(--red-800);
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.5);
}

.brand-title {
    display: block;
    font-size: 21px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    display: block;
    margin-top: 2px;
    color: var(--red-100);
    font-size: 12px;
}

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

.nav-link {
    color: var(--red-50);
    font-weight: 700;
    padding: 8px 0;
    transition: color 0.2s ease, opacity 0.2s ease;
}

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

.mobile-toggle {
    display: none;
    border: 0;
    color: var(--white);
    background: rgb(255 255 255 / 0.18);
    border-radius: 10px;
    width: 42px;
    height: 42px;
}

.mobile-nav {
    display: none;
    padding: 0 24px 18px;
    background: linear-gradient(90deg, var(--red-900), var(--red-700));
}

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

.mobile-nav a {
    color: var(--white);
    padding: 10px 12px;
    border-radius: 10px;
    background: rgb(255 255 255 / 0.12);
}

.hero-carousel {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: var(--gray-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transition: opacity 0.55s ease;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(0 0 0 / 0.86), rgb(0 0 0 / 0.55), rgb(0 0 0 / 0.12));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 118px 24px 96px;
    color: var(--white);
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: var(--red-600);
    color: var(--white);
    padding: 5px 12px;
    margin: 0 0 18px;
    font-size: 14px;
    font-weight: 800;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 20px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-text {
    max-width: 760px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 20px;
}

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

.hero-tags span,
.movie-meta span {
    border-radius: 999px;
    padding: 5px 11px;
    background: rgb(220 38 38 / 0.86);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
}

.movie-meta span {
    background: var(--red-50);
    color: var(--red-800);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.ghost-light-btn,
.section-link,
.text-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    border: 0;
    color: var(--white);
    background: var(--red-600);
    box-shadow: 0 10px 25px rgb(220 38 38 / 0.35);
    cursor: pointer;
}

.primary-btn:hover,
.section-link:hover,
.text-btn:hover {
    transform: translateY(-2px);
    background: var(--red-700);
    color: var(--white);
}

.ghost-btn,
.ghost-light-btn {
    color: var(--white);
    border: 1px solid rgb(255 255 255 / 0.35);
    background: rgb(255 255 255 / 0.16);
    backdrop-filter: blur(10px);
}

.ghost-light-btn {
    color: var(--red-800);
    background: var(--white);
    border-color: transparent;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgb(255 255 255 / 0.18);
    font-size: 40px;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
    z-index: 6;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.42);
    cursor: pointer;
}

.hero-dot.active {
    width: 32px;
    background: var(--white);
}

.search-band,
.section-block,
.rank-section,
.filter-panel,
.detail-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px;
}

.search-band {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 30px;
    background: var(--white);
    margin-top: -46px;
    position: relative;
    z-index: 7;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-band h2,
.section-heading h2,
.rank-panel h2,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.search-band p,
.section-heading p,
.rank-panel p,
.page-hero p,
.detail-info .lead {
    margin: 0;
    color: var(--gray-600);
}

.quick-search {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: var(--gray-100);
}

.quick-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 13px 14px;
    outline: 0;
    background: var(--white);
}

.quick-search button {
    white-space: nowrap;
    border: 0;
    border-radius: 12px;
    padding: 0 22px;
    color: var(--white);
    background: var(--red-600);
    font-weight: 800;
    cursor: pointer;
}

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

.section-link,
.text-btn {
    color: var(--red-800);
    background: var(--red-50);
}

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

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

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1f2937, #7f1d1d);
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover img,
.category-tile:hover img,
.category-card:hover img {
    transform: scale(1.06);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.play-chip {
    right: 10px;
    bottom: 10px;
    color: var(--white);
    background: rgb(220 38 38 / 0.92);
    padding: 5px 10px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: var(--red-600);
}

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

.movie-card h2 {
    margin: 0 0 8px;
    color: var(--gray-900);
    font-size: 17px;
    line-height: 1.3;
}

.movie-card p {
    margin: 0 0 13px;
    color: var(--gray-600);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-tile,
.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    border-radius: var(--radius);
    color: var(--white);
    background: var(--gray-900);
    box-shadow: var(--soft-shadow);
}

.category-tile img,
.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    transition: transform 0.35s ease;
}

.category-tile span,
.category-tile small,
.category-card span,
.category-card h2,
.category-card p {
    position: relative;
    z-index: 1;
    display: block;
}

.category-tile span,
.category-card h2 {
    padding: 88px 18px 4px;
    font-size: 24px;
    font-weight: 900;
}

.category-card span {
    margin: 18px 18px 0;
    padding: 4px 10px;
    width: fit-content;
    border-radius: 999px;
    background: var(--red-600);
    font-size: 12px;
    font-weight: 800;
}

.category-card h2 {
    padding-top: 48px;
    margin: 0;
}

.category-tile small,
.category-card p {
    padding: 0 18px 18px;
    color: #e5e7eb;
}

.rank-section {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 26px;
}

.rank-panel,
.rank-list,
.story-card,
.side-card,
.filter-panel {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.rank-panel {
    padding: 34px;
    background: linear-gradient(135deg, var(--red-900), var(--red-700));
    color: var(--white);
}

.rank-panel p {
    color: var(--red-50);
}

.rank-list {
    overflow: hidden;
}

.rank-row {
    display: grid;
    grid-template-columns: 44px 64px 1fr;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--gray-100);
}

.rank-row strong {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: var(--white);
    background: var(--red-600);
}

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

.rank-row b,
.rank-row em {
    display: block;
}

.rank-row em {
    margin-top: 4px;
    color: var(--gray-500);
    font-size: 13px;
    font-style: normal;
}

.page-main,
.detail-main {
    background: #f9fafb;
}

.page-hero {
    min-height: 310px;
    padding: 78px 24px;
    color: var(--white);
    background: radial-gradient(circle at 20% 20%, #ef4444, transparent 32%), linear-gradient(135deg, var(--red-900), var(--gray-950));
}

.compact-hero {
    display: grid;
    align-content: center;
    text-align: center;
}

.compact-hero .eyebrow {
    margin-left: auto;
    margin-right: auto;
}

.compact-hero p {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
    color: #fee2e2;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 14px;
    margin-top: -34px;
    position: relative;
    z-index: 3;
    padding: 22px;
}

.search-grid .is-hidden {
    display: none;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 34px;
}

.pagination a {
    min-width: 42px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--red-800);
    background: var(--red-50);
    text-align: center;
    font-weight: 800;
}

.pagination a.active,
.pagination a:hover {
    color: var(--white);
    background: var(--red-700);
}

.catalog-pages {
    justify-content: flex-start;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 22px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 2 / 3;
}

.ranking-poster strong {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: var(--red-600);
}

.ranking-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.ranking-card p {
    margin: 0 0 14px;
    color: var(--gray-600);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: var(--gray-950);
}

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

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(3 7 18 / 0.96), rgb(127 29 29 / 0.72));
}

.detail-layout {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    align-items: center;
    gap: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    box-shadow: 0 30px 65px rgb(0 0 0 / 0.38);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgb(0 0 0 / 0.12), rgb(0 0 0 / 0.48));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.player-cover span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--red-600);
    box-shadow: 0 20px 45px rgb(220 38 38 / 0.45);
    font-size: 38px;
    line-height: 1;
    padding-left: 6px;
}

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

.detail-info .lead {
    color: #e5e7eb;
    font-size: 18px;
}

.detail-tags span {
    background: rgb(255 255 255 / 0.16);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 26px;
}

.story-card,
.side-card {
    padding: 28px;
}

.story-card h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 25px;
}

.story-card p {
    margin: 0 0 24px;
    color: var(--gray-700);
    font-size: 17px;
}

.side-card dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.side-card dt {
    color: var(--gray-500);
    font-size: 13px;
}

.side-card dd {
    margin: -8px 0 0;
    color: var(--gray-900);
    font-weight: 800;
}

.site-footer {
    margin-top: 60px;
    color: var(--gray-300);
    background: var(--gray-950);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: grid;
    grid-template-columns: 1.2fr 0.6fr 0.6fr;
    gap: 32px;
}

.footer-logo {
    color: var(--white);
    font-size: 23px;
    font-weight: 900;
    margin-bottom: 10px;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: var(--white);
    font-size: 17px;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: var(--gray-300);
}

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

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

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

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero-carousel {
        min-height: 560px;
    }

    .hero-content {
        padding-top: 96px;
    }

    .hero-arrow {
        display: none;
    }

    .search-band,
    .rank-section,
    .detail-layout,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        grid-template-columns: 1fr 1fr;
    }

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

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

@media (max-width: 540px) {
    .nav-wrap {
        height: 64px;
        padding: 0 16px;
    }

    .brand-title {
        font-size: 18px;
    }

    .brand-subtitle {
        display: none;
    }

    .hero-content,
    .search-band,
    .section-block,
    .rank-section,
    .filter-panel,
    .detail-content,
    .detail-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .quick-search,
    .filter-panel {
        grid-template-columns: 1fr;
        display: grid;
    }

    .quick-search button {
        height: 46px;
    }

    .movie-grid,
    .catalog-grid,
    .category-grid,
    .category-card-grid {
        gap: 14px;
    }

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

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

    .ranking-card {
        grid-template-columns: 94px 1fr;
    }

    .player-cover span {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }
}
