:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --soft: #e2e8f0;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --red: #dc2626;
    --dark: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    font-size: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), #7c3aed);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

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

.nav-link,
.mobile-nav-link {
    color: #334155;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: var(--blue);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 280px;
}

.header-search input,
.wide-search input,
.inline-filter input,
.inline-filter select {
    width: 100%;
    border: 1px solid var(--soft);
    border-radius: 999px;
    padding: 11px 16px;
    color: var(--text);
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.inline-filter select {
    cursor: pointer;
}

.header-search input:focus,
.wide-search input:focus,
.inline-filter input:focus,
.inline-filter select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.header-search button,
.wide-search button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #ffffff;
    background: var(--blue);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.wide-search button:hover,
.primary-button:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid var(--soft);
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #0f172a;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 24px 16px;
    border-top: 1px solid var(--soft);
}

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

.hero-carousel {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.48) 45%, rgba(15, 23, 42, 0.25));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 72px;
    display: flex;
    align-items: flex-end;
}

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

.hero-badges,
.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.hero-badges span,
.detail-badges span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    background: var(--blue);
}

.hero-badges span:first-child,
.detail-badges span:first-child {
    background: var(--red);
}

.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p {
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.7;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 26px;
    color: #cbd5e1;
}

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

.primary-button,
.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    padding: 13px 26px;
    color: #ffffff;
    background: var(--blue);
}

.ghost-button {
    padding: 12px 24px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.08);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.hero-search-panel,
.page-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-search-panel {
    position: relative;
    z-index: 6;
    margin-top: -48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 28px;
    align-items: center;
    border-radius: 28px;
    padding-top: 30px;
    padding-bottom: 30px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.hero-search-panel h1,
.page-hero-card h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.hero-search-panel p,
.page-hero-card p,
.section-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.wide-search {
    display: flex;
    gap: 10px;
}

.page-top {
    padding-top: 38px;
}

.content-section,
.page-hero-card,
.category-overview-card,
.podium-card {
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: var(--shadow-soft);
}

.content-section {
    margin: 34px 0;
    padding: 28px;
}

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

.section-heading h2,
.detail-article h2,
.side-panel h2 {
    margin: 0 0 8px;
    font-size: clamp(22px, 3vw, 32px);
    letter-spacing: -0.03em;
}

.section-more {
    flex: 0 0 auto;
    padding: 10px 16px;
    color: var(--blue);
    background: #eff6ff;
}

.section-more:hover {
    color: #ffffff;
    background: var(--blue);
}

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

.movie-card {
    min-width: 0;
}

.card-link,
.list-card a,
.category-card,
.category-overview-card a,
.podium-card {
    display: block;
}

.card-link {
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.16);
}

.card-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #334155);
}

.card-poster img,
.list-poster img,
.detail-poster img,
.category-preview img,
.podium-card img {
    transition: transform 0.35s ease;
}

.card-link:hover .card-poster img,
.list-card a:hover img,
.category-card:hover img,
.category-overview-card a:hover img,
.podium-card:hover img {
    transform: scale(1.08);
}

.card-duration {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border-radius: 8px;
    padding: 5px 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.72);
}

.card-body {
    padding: 16px;
}

.card-body h3,
.list-body h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.card-link:hover h3,
.list-card a:hover h3 {
    color: var(--blue);
}

.card-body p,
.list-body p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.card-meta,
.list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    color: #64748b;
    font-size: 13px;
}

.card-meta span:first-child {
    color: var(--blue);
    border-radius: 999px;
    padding: 5px 9px;
    background: #eff6ff;
    font-weight: 800;
}

.category-section {
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

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

.category-card {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border-radius: 20px;
    color: #ffffff;
    background: #0f172a;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.28));
}

.category-card img {
    position: absolute;
    inset: 0;
}

.category-card div {
    position: relative;
    z-index: 2;
    padding: 24px;
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    max-width: 300px;
    color: #dbeafe;
    line-height: 1.6;
}

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

.compact-section {
    margin: 0 0 34px;
}

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

.list-card a {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    border-radius: 16px;
    padding: 10px;
    background: #ffffff;
    transition: background 0.2s ease, transform 0.2s ease;
}

.list-card a:hover {
    background: #f8fafc;
    transform: translateX(3px);
}

.list-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background: #1e293b;
}

.rank-number {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    background: var(--red);
}

.page-hero-card {
    padding: 34px;
    background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.category-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
    gap: 28px;
    align-items: end;
}

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

.inline-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 10px;
}

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

.category-overview-card {
    overflow: hidden;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 145px;
    overflow: hidden;
    background: #0f172a;
}

.category-overview-body {
    padding: 22px;
}

.category-overview-body h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-overview-body p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.7;
}

.category-overview-body span {
    color: var(--blue);
    font-weight: 800;
}

.podium-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 20px;
    margin: 34px 0;
}

.podium-card {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    color: #ffffff;
}

.podium-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.1));
}

.podium-card img {
    position: absolute;
    inset: 0;
}

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

.podium-card span {
    display: inline-flex;
    margin-bottom: 10px;
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--red);
    font-weight: 900;
}

.podium-card h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.podium-card p {
    margin: 0;
    color: #e2e8f0;
    line-height: 1.6;
}

.ranking-stack .list-card a {
    grid-template-columns: 190px minmax(0, 1fr);
}

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

.empty-state {
    display: none;
    margin-top: 20px;
    border-radius: 18px;
    padding: 28px;
    color: var(--muted);
    text-align: center;
    background: #f8fafc;
}

.empty-state.is-visible {
    display: block;
}

.detail-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--muted);
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    align-items: stretch;
    border-radius: 28px;
    padding: 28px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.75), transparent 40%), linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 2 / 3;
    background: #1e293b;
    box-shadow: 0 24px 45px rgba(0, 0, 0, 0.25);
}

.detail-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.detail-one-line {
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.75;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.detail-meta-grid div {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.detail-meta-grid strong,
.detail-meta-grid span {
    display: block;
}

.detail-meta-grid strong {
    margin-bottom: 6px;
    color: #bfdbfe;
    font-size: 13px;
}

.detail-meta-grid span {
    color: #ffffff;
    font-weight: 800;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.tag-cloud span {
    border-radius: 999px;
    padding: 7px 11px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.1);
}

.player-section {
    scroll-margin-top: 90px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.45));
    cursor: pointer;
    z-index: 2;
}

.play-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    padding-left: 7px;
    border-radius: 999px;
    font-size: 36px;
    background: rgba(37, 99, 235, 0.95);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.35);
}

.play-overlay.is-hidden {
    display: none;
}

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

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

.side-panel {
    align-self: start;
    position: sticky;
    top: 96px;
}

.side-panel dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.side-panel dl div {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 14px;
    border-bottom: 1px solid var(--soft);
    padding-bottom: 14px;
}

.side-panel dt {
    color: var(--muted);
    font-weight: 800;
}

.side-panel dd {
    margin: 0;
    color: #0f172a;
}

.site-footer {
    margin-top: 60px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px 30px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
}

.footer-inner h2,
.footer-inner h3 {
    margin: 0 0 16px;
    color: #ffffff;
}

.footer-inner p {
    margin: 0;
    max-width: 520px;
    line-height: 1.7;
}

.footer-inner ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

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

.footer-copy {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 18px 24px 24px;
    text-align: center;
    color: #94a3b8;
}

@media (max-width: 1100px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

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

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

    .detail-hero,
    .detail-layout,
    .split-section,
    .category-hero,
    .hero-search-panel {
        grid-template-columns: 1fr;
    }

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

    .side-panel {
        position: static;
    }
}

@media (max-width: 780px) {
    .header-inner,
    .hero-content,
    .hero-search-panel,
    .page-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-control {
        display: none;
    }

    .hero-search-panel {
        margin-top: 0;
        border-radius: 0;
    }

    .wide-search,
    .inline-filter {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .wide-search {
        display: grid;
    }

    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .podium-grid {
        grid-template-columns: 1fr;
    }

    .content-section,
    .page-hero-card,
    .detail-hero {
        border-radius: 20px;
        padding: 20px;
    }

    .list-card a,
    .ranking-stack .list-card a {
        grid-template-columns: 120px minmax(0, 1fr);
    }

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

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .site-logo {
        font-size: 17px;
    }

    .logo-mark {
        width: 34px;
        height: 34px;
    }

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

    .section-heading {
        display: grid;
    }

    .list-card a,
    .ranking-stack .list-card a {
        grid-template-columns: 1fr;
    }

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