:root {
    --bg: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --card: #ffffff;
    --line: #e2e8f0;
    --primary: #ef4444;
    --primary-dark: #dc2626;
    --primary-soft: #fee2e2;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(239, 68, 68, 0.08), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 32%, #eef2f7 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
}

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

.topbar {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ef4444, #fb923c);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(239, 68, 68, 0.32);
}

.brand-text {
    font-size: 24px;
    background: linear-gradient(90deg, #f87171, #fecaca);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.primary-nav,
.category-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.primary-nav a,
.category-nav a {
    color: #e5e7eb;
    border-radius: 12px;
    transition: 0.2s ease;
}

.primary-nav a {
    padding: 9px 13px;
    font-size: 14px;
}

.primary-nav a:hover,
.primary-nav a.active,
.category-nav a:hover {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.92);
}

.category-nav {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 12px;
    overflow-x: auto;
}

.category-nav a {
    flex: 0 0 auto;
    padding: 6px 14px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 99px;
}

main {
    min-height: 64vh;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
    background: linear-gradient(135deg, #0f172a, #1e293b 50%, #991b1b);
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.36;
    filter: saturate(1.1) contrast(1.04);
}

.hero-bg.is-missing,
.poster img.is-missing,
.hero-poster img.is-missing,
.rank-thumb img.is-missing,
.player-cover img.is-missing {
    opacity: 0;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.74) 48%, rgba(15, 23, 42, 0.22) 100%),
        radial-gradient(circle at 78% 20%, rgba(239, 68, 68, 0.42), transparent 32%);
}

.hero-inner {
    position: relative;
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    padding: 84px 24px 96px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 64px;
    align-items: center;
}

.hero-copy {
    max-width: 760px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fecaca;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.24);
    font-size: 13px;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 0 0 20px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.03;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 680px;
    color: #cbd5e1;
    font-size: 20px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    padding: 7px 12px;
    color: #fee2e2;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: 0.22s ease;
}

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.34);
}

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

.btn:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    background: linear-gradient(145deg, #1e293b, #991b1b);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.44);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(239, 68, 68, 0.94);
    font-weight: 800;
}

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

.hero-controls button {
    color: #ffffff;
    cursor: pointer;
}

.hero-controls > button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 30px;
    line-height: 1;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.32);
    transition: 0.2s ease;
}

.hero-dot.active {
    width: 28px;
    background: #ef4444;
}

.stats-grid,
.content-section,
.footer-grid,
.footer-bottom,
.breadcrumb,
.detail-layout {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: -46px;
    padding: 0 24px;
    position: relative;
    z-index: 3;
}

.stats-grid article {
    padding: 24px;
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.stats-grid strong {
    display: block;
    color: #dc2626;
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
}

.stats-grid span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-weight: 700;
}

.content-section {
    padding: 64px 24px;
}

.content-section.tinted {
    max-width: none;
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.82), rgba(255, 255, 255, 0));
}

.content-section.tinted > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-text h2 {
    margin: 0;
    color: #0f172a;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: 32px;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    color: #dc2626;
    font-weight: 800;
}

.movie-grid {
    display: grid;
    gap: 20px;
}

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

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

.two-column-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

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

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.poster,
.rank-thumb,
.player-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(145deg, #1e293b, #7f1d1d);
}

.poster {
    aspect-ratio: 2 / 3;
}

.poster img,
.rank-thumb img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

.poster-year,
.poster-play {
    position: absolute;
    z-index: 1;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.poster-year {
    left: 10px;
    top: 10px;
    padding: 5px 8px;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(8px);
}

.poster-play {
    right: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.92);
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.28);
}

.movie-card-content {
    padding: 15px;
}

.movie-card-content h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card-content h3 a {
    color: var(--text);
}

.movie-meta,
.movie-line {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.movie-line {
    color: #334155;
}

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

.tag-row span,
.detail-tags span {
    padding: 5px 9px;
}

.movie-card.compact .movie-card-content h3 {
    font-size: 15px;
}

.movie-card.compact .movie-line {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ranking-preview {
    background: transparent;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 70px minmax(0, 1fr) 58px;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #fb923c);
    font-weight: 900;
}

.rank-thumb {
    width: 70px;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
}

.rank-row h3 {
    margin: 0;
    font-weight: 900;
}

.rank-row h3 a {
    color: var(--text);
}

.rank-row p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.rank-row strong {
    color: #dc2626;
    font-size: 22px;
}

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

.portal-card,
.info-card {
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.portal-card {
    display: grid;
    gap: 8px;
    padding: 24px;
    color: var(--text);
}

.portal-card span {
    color: #dc2626;
    font-weight: 900;
}

.portal-card strong {
    font-size: 34px;
    line-height: 1;
}

.portal-card em {
    color: var(--muted);
    font-style: normal;
    font-weight: 700;
}

.portal-card.accent {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #7f1d1d);
}

.portal-card.accent span,
.portal-card.accent em {
    color: #ffffff;
}

.page-hero {
    background: linear-gradient(135deg, #0f172a, #1e293b 54%, #7f1d1d);
    color: #ffffff;
}

.page-hero > div {
    max-width: 1280px;
    margin: 0 auto;
    padding: 78px 24px;
}

.compact-hero > div,
.catalog-hero > div {
    padding-top: 70px;
    padding-bottom: 70px;
}

.page-hero h1 {
    color: #ffffff;
    font-size: clamp(36px, 5vw, 58px);
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.75;
}

.catalog-section {
    padding-top: 36px;
}

.filter-panel {
    margin-bottom: 24px;
}

.filter-search input {
    width: 100%;
    height: 52px;
    padding: 0 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    outline: none;
}

.filter-search input:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.filter-buttons button {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: #334155;
    background: #ffffff;
    cursor: pointer;
    font-weight: 800;
}

.filter-buttons button.active,
.filter-buttons button:hover {
    color: #ffffff;
    background: #ef4444;
    border-color: #ef4444;
}

.filter-empty {
    padding: 24px;
    border-radius: 18px;
    background: #ffffff;
    color: var(--muted);
    text-align: center;
    border: 1px solid var(--line);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 24px 24px 0;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #dc2626;
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.75fr);
    gap: 34px;
    padding: 28px 24px 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    aspect-ratio: 16 / 9;
}

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

.movie-player {
    background: #000000;
}

.player-cover {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    z-index: 2;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 42%, rgba(239, 68, 68, 0.42), transparent 28%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.32), rgba(2, 6, 23, 0.88));
}

.big-play,
.play-text {
    position: relative;
    z-index: 3;
}

.big-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 16px 32px rgba(239, 68, 68, 0.36);
    font-size: 34px;
}

.play-text {
    display: block;
    margin-top: 16px;
    font-size: 18px;
    font-weight: 900;
}

.player-cover[hidden] {
    display: none;
}

.detail-info {
    padding: 30px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.detail-info h1 {
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.12;
}

.detail-line {
    margin: 18px 0;
    color: #334155;
    font-size: 17px;
    line-height: 1.75;
}

.detail-meta {
    display: grid;
    gap: 10px;
    margin: 22px 0 0;
}

.detail-meta div {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.detail-meta dt {
    color: var(--muted);
    font-weight: 800;
}

.detail-meta dd {
    margin: 0;
    color: var(--text);
    font-weight: 700;
}

.detail-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-top: 28px;
}

.detail-text article,
.next-links a,
.info-card {
    padding: 28px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.detail-text h2 {
    margin-bottom: 14px;
    font-size: 26px;
}

.detail-text p,
.info-card p {
    margin: 0;
    color: #334155;
    line-height: 1.9;
}

.next-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding-top: 0;
    padding-bottom: 24px;
}

.next-links a {
    color: var(--text);
    font-weight: 900;
}

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

.info-card h2 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 22px;
    font-weight: 900;
}

.site-footer {
    margin-top: 30px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #020617, #0f172a 48%, #1e293b);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 34px;
    padding: 50px 24px 30px;
}

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

.footer-grid p {
    margin: 12px 0 0;
    color: #94a3b8;
    line-height: 1.8;
}

.footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-grid li + li {
    margin-top: 9px;
}

.footer-grid a {
    color: #cbd5e1;
}

.footer-grid a:hover {
    color: #f87171;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 24px 32px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    font-size: 14px;
}

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

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

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

@media (max-width: 860px) {
    .topbar {
        height: auto;
        min-height: 64px;
        align-items: flex-start;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .primary-nav {
        display: none;
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: #0f172a;
        box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
    }

    .primary-nav.open {
        display: flex;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 60px;
    }

    .hero-poster {
        max-width: 230px;
    }

    .stats-grid,
    .two-column-section,
    .detail-text,
    .next-links,
    .footer-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .featured-grid,
    .slim-grid,
    .catalog-grid,
    .portal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .footer-bottom {
        flex-direction: column;
    }
}

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

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

    .hero-copy p {
        font-size: 16px;
    }

    .stats-grid,
    .featured-grid,
    .slim-grid,
    .catalog-grid,
    .portal-grid {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 44px 58px minmax(0, 1fr);
    }

    .rank-row strong {
        grid-column: 3;
    }

    .detail-info,
    .detail-text article,
    .next-links a,
    .info-card {
        padding: 22px;
    }
}
