:root {
    --bg: #f9fafb;
    --surface: #ffffff;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f3f4f6;
    --dark: #0f172a;
    --rose: #e11d48;
    --rose-dark: #be123c;
    --emerald: #059669;
    --emerald-dark: #047857;
    --teal: #0d9488;
    --amber: #f59e0b;
    --shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

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

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

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(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.site-header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--rose), var(--emerald));
    box-shadow: 0 12px 24px rgba(225, 29, 72, 0.22);
}

.logo-text {
    white-space: nowrap;
    font-size: 20px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--rose);
    background: #fff1f2;
}

.top-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.top-search input,
.mobile-search input {
    width: 190px;
    border: 0;
    outline: 0;
    padding: 8px 4px 8px 12px;
    background: transparent;
    color: var(--ink);
}

.top-search button,
.mobile-search button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 8px 14px;
    color: #ffffff;
    background: var(--emerald);
    font-weight: 700;
}

.menu-toggle {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--soft);
    display: none;
    place-items: center;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    margin: 3px 0;
    display: block;
    background: var(--ink);
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-nav {
    display: grid;
    gap: 8px;
    padding-top: 14px;
}

.mobile-search {
    margin-top: 14px;
}

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

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: linear-gradient(120deg, #0f172a, #334155);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 2;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.2));
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100% - 1180px) / 2));
    right: 32px;
    bottom: 74px;
    max-width: 760px;
    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    margin: 0 0 10px;
    color: var(--rose);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-desc {
    max-width: 700px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
}

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

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

.primary-btn {
    color: #ffffff;
    background: var(--emerald);
    box-shadow: 0 18px 34px rgba(5, 150, 105, 0.28);
}

.primary-btn:hover {
    background: var(--emerald-dark);
    transform: translateY(-2px);
}

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

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    font-size: 13px;
    font-weight: 700;
}

.tag-row span {
    color: var(--rose);
    background: #fff1f2;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.section {
    padding: 72px 0;
}

.white-section {
    background: #ffffff;
}

.cool-section {
    background: linear-gradient(135deg, #ecfeff, #f0fdfa);
}

.warm-section {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

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

.section-heading h2,
.category-block-head h2,
.detail-article h2,
.detail-side h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.section-heading a,
.text-link {
    color: var(--rose);
    font-weight: 800;
}

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

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

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

.compact-grid {
    gap: 18px;
}

.movie-card,
.wide-card,
.rank-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover,
.wide-card:hover,
.rank-card:hover {
    transform: translateY(-4px);
    border-color: rgba(225, 29, 72, 0.28);
    box-shadow: var(--shadow);
}

.card-cover,
.wide-cover,
.rank-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e5e7eb;
}

.card-cover {
    aspect-ratio: 3 / 4;
}

.card-cover img,
.wide-cover img,
.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover img,
.wide-card:hover img,
.rank-card:hover img {
    transform: scale(1.07);
}

.year-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 9px;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.68);
    font-size: 13px;
    font-weight: 800;
}

.play-hover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.42);
    font-size: 44px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.card-content,
.wide-body,
.rank-body {
    padding: 16px;
}

.card-content h3,
.wide-body h3,
.rank-body h3 {
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.35;
}

.card-content h3 a,
.wide-body h3 a,
.rank-body h3 a {
    transition: color 0.2s ease;
}

.card-content h3 a:hover,
.wide-body h3 a:hover,
.rank-body h3 a:hover {
    color: var(--rose);
}

.card-meta,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-content p,
.wide-body p,
.rank-body p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.wide-grid,
.feature-strip {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide-card {
    display: grid;
    grid-template-columns: 210px 1fr;
}

.wide-cover {
    min-height: 180px;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border-radius: 22px;
    color: #ffffff;
    box-shadow: var(--shadow-soft);
}

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

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.15));
}

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

.category-tile span,
.category-tile em {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-tile span {
    bottom: 48px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile em {
    bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-style: normal;
}

.page-hero {
    padding: 78px 0;
    color: #ffffff;
    background: radial-gradient(circle at 20% 10%, rgba(225, 29, 72, 0.55), transparent 34%), linear-gradient(135deg, #0f172a, #1e293b);
}

.slim-hero,
.category-hero,
.ranking-hero,
.search-hero {
    min-height: 300px;
    display: flex;
    align-items: center;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(38px, 6vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.page-hero p:not(.section-kicker) {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.category-stack {
    display: grid;
    gap: 44px;
}

.category-block {
    padding-bottom: 42px;
    border-bottom: 1px solid var(--line);
}

.category-block:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.category-block-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.category-block-head p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
}

.filter-panel {
    margin-bottom: 28px;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.catalog-search,
.catalog-filter {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: 0;
    padding: 0 14px;
    color: var(--ink);
    background: #ffffff;
}

.catalog-search:focus,
.catalog-filter:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.08);
}

.filter-selects {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-selects select {
    min-width: 130px;
}

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

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

.rank-card {
    display: grid;
    grid-template-columns: 126px 1fr;
    align-items: stretch;
}

.rank-cover {
    aspect-ratio: 3 / 4;
}

.rank-body {
    position: relative;
}

.rank-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--rose), var(--amber));
    font-weight: 900;
}

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

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(5px);
    transform: scale(1.06);
    opacity: 0.68;
}

.detail-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.42));
}

.detail-layout {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    align-items: center;
    grid-template-columns: 330px 1fr;
    gap: 48px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

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

.breadcrumb {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 70px);
    line-height: 1.03;
    letter-spacing: -0.06em;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
}

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

.dark-player-section {
    padding: 58px 0;
    background: #020617;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.94);
    box-shadow: 0 22px 44px rgba(5, 150, 105, 0.32);
    font-size: 42px;
    transform: translateX(4px);
}

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

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

.detail-article,
.detail-side {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.detail-article h2,
.detail-side h2 {
    margin-bottom: 16px;
}

.detail-article p {
    color: #374151;
    font-size: 17px;
}

.movie-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 26px 0 0;
}

.movie-facts div {
    padding: 14px;
    border-radius: 14px;
    background: #f9fafb;
}

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

.movie-facts dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.side-list {
    display: grid;
    gap: 14px;
}

.side-list a {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: #f9fafb;
    transition: background 0.2s ease, color 0.2s ease;
}

.side-list a:hover {
    color: var(--rose);
    background: #fff1f2;
}

.side-list img {
    width: 72px;
    height: 92px;
    border-radius: 10px;
    object-fit: cover;
}

.side-list span {
    font-weight: 800;
    line-height: 1.35;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0 34px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
}

.footer-logo {
    color: #ffffff;
    font-size: 24px;
}

.footer-brand p {
    max-width: 360px;
    margin: 18px 0 0;
    color: #9ca3af;
}

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

.footer-links h3 {
    margin: 0 0 16px;
    color: #ffffff;
}

.footer-links a,
.footer-links p {
    display: block;
    margin: 9px 0;
    color: #9ca3af;
    font-size: 14px;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid #1f2937;
    color: #9ca3af;
    font-size: 14px;
}

@media (max-width: 1040px) {
    .top-search {
        display: none;
    }

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

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

    .wide-grid,
    .feature-strip,
    .detail-content-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

    .menu-toggle {
        display: grid;
        margin-left: auto;
    }

    body.menu-open .mobile-panel {
        display: block;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 78px;
    }

    .hero-desc,
    .detail-one-line {
        font-size: 17px;
    }

    .section {
        padding: 50px 0;
    }

    .section-heading,
    .category-block-head,
    .footer-bottom {
        align-items: start;
        flex-direction: column;
    }

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

    .wide-card,
    .rank-card {
        grid-template-columns: 1fr;
    }

    .wide-cover {
        aspect-ratio: 16 / 9;
    }

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

    .filter-selects {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-layout {
        padding: 44px 0;
        grid-template-columns: 1fr;
        gap: 28px;
    }

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

    .movie-facts,
    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .container,
    .site-header-inner,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, 1180px);
    }

    .logo-text {
        font-size: 17px;
    }

    .hero-carousel {
        height: 530px;
    }

    .hero-actions {
        display: grid;
    }

    .four-cols,
    .three-cols,
    .category-grid,
    .filter-selects {
        grid-template-columns: 1fr;
    }

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

    .detail-hero,
    .detail-layout {
        min-height: auto;
    }

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

    .detail-article,
    .detail-side {
        padding: 20px;
    }

    .play-overlay span {
        width: 72px;
        height: 72px;
        font-size: 34px;
    }
}
