:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --red: #dc2626;
    --red-dark: #b91c1c;
    --orange: #f97316;
    --dark: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    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;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.96);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(14px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand span:last-child {
    background: linear-gradient(90deg, #fb7185, var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.35);
    font-size: 14px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
    color: rgba(255, 255, 255, 0.86);
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #fb7185;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    flex-direction: column;
    gap: 12px;
    font-weight: 700;
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.8s ease, transform 1.2s ease;
    pointer-events: none;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 30%, rgba(249, 115, 22, 0.22), transparent 32%), linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.24) 100%);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.92) 0%, transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 640px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1180px;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.03;
    font-weight: 950;
    letter-spacing: -0.04em;
    text-shadow: 0 16px 45px rgba(0, 0, 0, 0.45);
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 28px;
    color: rgba(226, 232, 240, 0.94);
    font-size: clamp(18px, 2.2vw, 24px);
}

.hero-badge,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.28);
}

.eyebrow {
    color: var(--red);
    background: #fee2e2;
    box-shadow: none;
}

.hero-meta,
.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta {
    margin-bottom: 34px;
}

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 16px 34px rgba(220, 38, 38, 0.32);
}

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

.ghost-button.light {
    color: #ffffff;
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
    transform: translateY(-2px);
}

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

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

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

.content-section,
.catalog-section,
.detail-page {
    padding: 54px 0;
}

.section-head {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 28px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.section-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.14;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-more {
    min-height: 40px;
    color: var(--red);
    background: #fee2e2;
}

.movie-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px;
}

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

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

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

.poster-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.48), transparent 30%), linear-gradient(135deg, #111827, #7f1d1d 54%, #f97316);
}

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

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

.rating-badge,
.rank-number {
    position: absolute;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
}

.rating-badge {
    top: 12px;
    right: 12px;
    min-width: 44px;
    height: 30px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(8px);
}

.rank-number {
    left: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.movie-meta span {
    color: var(--muted);
    font-size: 13px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-list span {
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--red-dark);
    background: #fee2e2;
    font-size: 12px;
    font-weight: 800;
}

.tag-list.large span {
    padding: 6px 12px;
    font-size: 14px;
}

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.26), transparent 28%), linear-gradient(135deg, #0f172a 0%, #1e293b 52%, #7f1d1d 100%);
}

.compact-hero {
    padding: 76px 0;
}

.compact-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.compact-hero p {
    max-width: 760px;
    margin: 0 0 26px;
    color: rgba(226, 232, 240, 0.92);
    font-size: 19px;
}

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

.category-tile {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border-radius: 24px;
    color: #ffffff;
    background: #111827;
    box-shadow: var(--shadow);
}

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

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.2));
}

.category-tile div {
    position: absolute;
    z-index: 2;
    left: 24px;
    right: 24px;
    bottom: 24px;
}

.category-tile span {
    color: #fb7185;
    font-weight: 900;
}

.category-tile h2 {
    margin: 6px 0 8px;
    font-size: 28px;
    line-height: 1.15;
}

.category-tile p {
    margin: 0;
    color: rgba(226, 232, 240, 0.9);
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.62;
}

.catalog-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.search-box input,
.catalog-toolbar select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--text);
    padding: 0 14px;
    outline: 0;
}

.search-box input:focus,
.catalog-toolbar select:focus {
    border-color: #fb7185;
    box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.15);
}

.chip-row {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip-row button {
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    padding: 8px 13px;
    font-weight: 800;
    cursor: pointer;
}

.chip-row button.active,
.chip-row button:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
}

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

.ranking-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 26px;
}

.rank-list,
.aside-card,
.detail-block,
.player-panel {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.rank-list {
    padding: 18px;
}

.rank-card {
    display: grid;
    grid-template-columns: 54px 110px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-card:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.rank-index {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    font-weight: 950;
}

.rank-thumb {
    width: 110px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #111827, #7f1d1d);
}

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

.rank-info h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 900;
}

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

.rank-card strong {
    color: var(--red);
    font-size: 20px;
}

.detail-page {
    background: #f8fafc;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 24px;
    color: var(--muted);
    font-weight: 700;
}

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

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

.detail-main {
    min-width: 0;
}

.player-panel {
    overflow: hidden;
    margin-bottom: 24px;
}

.player-shell {
    position: relative;
    background: #030712;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.36), rgba(3, 7, 18, 0.12));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    position: relative;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.34);
}

.player-overlay span::after {
    content: "";
    position: absolute;
    left: 35px;
    top: 25px;
    border-left: 26px solid var(--red);
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
}

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

.detail-block {
    padding: 26px;
    margin-bottom: 24px;
}

.detail-intro h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.detail-meta {
    margin-bottom: 16px;
}

.detail-meta span {
    color: #334155;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.detail-block h2 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 950;
}

.detail-block p,
.lead {
    margin: 0;
    color: #334155;
    font-size: 17px;
    line-height: 1.9;
}

.lead {
    margin-top: 18px;
    color: #0f172a;
    font-size: 19px;
    font-weight: 700;
}

.detail-aside {
    position: sticky;
    top: 94px;
}

.aside-card {
    padding: 18px;
}

.aside-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.side-ranks .rank-card {
    grid-template-columns: 34px 84px 1fr;
    gap: 10px;
    padding: 10px;
}

.side-ranks .rank-card strong {
    display: none;
}

.side-ranks .rank-thumb {
    width: 84px;
}

.side-ranks .rank-index {
    width: 30px;
    height: 30px;
    border-radius: 10px;
}

.side-ranks .rank-info h3 {
    font-size: 14px;
}

.side-ranks .rank-info p,
.side-ranks .movie-meta {
    display: none;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
    padding: 44px 0 26px;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 28px;
}

.footer-brand {
    color: #ffffff;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-content: flex-start;
    font-weight: 800;
}

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

.footer-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    font-size: 14px;
}

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

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

    .detail-aside {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

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

    .hero,
    .hero-content {
        min-height: 560px;
    }

    .hero-actions,
    .section-head,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .catalog-toolbar {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 42px 90px 1fr;
    }

    .rank-card strong {
        display: none;
    }
}

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

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

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

    .movie-card p,
    .tag-list {
        display: none;
    }

    .compact-hero {
        padding: 56px 0;
    }

    .hero,
    .hero-content {
        min-height: 500px;
    }

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

    .rank-card {
        grid-template-columns: 36px 76px 1fr;
        padding: 10px 0;
    }

    .detail-block {
        padding: 20px;
    }
}
