:root {
    color-scheme: light;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #06b6d4;
    --orange: #f97316;
    --red: #ef4444;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --card: #ffffff;
    --dark: #0f172a;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: #f3f4f6;
    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: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 68px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--blue);
    white-space: nowrap;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

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

.nav-link,
.mobile-link {
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 15px;
    color: #374151;
    transition: color 0.2s ease, background 0.2s ease;
}

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

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

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

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

.header-search button,
.mobile-search button,
.hero-search button,
.primary-button,
.light-button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    background: var(--blue);
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.primary-button:hover,
.light-button:hover {
    transform: translateY(-1px);
    background: var(--blue-dark);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

.menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    background: #f3f4f6;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    padding: 10px;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: var(--text);
}

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

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

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

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

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(120deg, #1d4ed8 0%, #2563eb 45%, #06b6d4 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.18), transparent 26%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.24));
}

.hero-inner {
    position: relative;
    min-height: 640px;
    padding: 72px 0 52px;
}

.hero-slider {
    position: relative;
    min-height: 430px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
    align-items: center;
    gap: 46px;
    opacity: 0;
    transform: translateX(28px);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

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

.hero-copy p,
.sub-hero p,
.detail-copy p {
    max-width: 760px;
    margin: 0 0 24px;
    font-size: 19px;
    color: rgba(255, 255, 255, 0.9);
}

.hero-tags,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 14px;
    font-weight: 700;
}

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

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--blue);
}

.primary-button:hover {
    color: #fff;
}

.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 32px 70px rgba(15, 23, 42, 0.34);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.12);
}

.hero-control {
    position: absolute;
    left: 0;
    bottom: 8px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dot.active {
    background: #fff;
}

.hero-search {
    display: flex;
    gap: 12px;
    width: min(760px, 100%);
    margin-top: 36px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
}

.hero-search input {
    border-color: transparent;
}

.category-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.category-strip a,
.inline-links a {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    font-size: 14px;
    font-weight: 700;
}

.category-strip a:hover,
.inline-links a:hover {
    background: rgba(255, 255, 255, 0.24);
}

.page-section,
.content-section {
    padding: 62px 0;
}

.section-heading {
    margin-bottom: 26px;
}

.section-heading h2,
.detail-article h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.2;
    color: var(--text);
}

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

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

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

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

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

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

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e5e7eb;
}

.poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.category-pill,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: #fff;
    background: var(--blue);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.card-body {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 1.5em;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.card-title:hover {
    color: var(--blue);
}

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

.card-meta {
    color: #4b5563;
    font-size: 13px;
}

.card-meta span {
    padding: 3px 8px;
    border-radius: 999px;
    background: #f3f4f6;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.card-tags span,
.tag-list span {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--blue-dark);
    background: #eff6ff;
    font-size: 12px;
    font-weight: 700;
}

.compact .card-title {
    font-size: 16px;
}

.hot-band {
    padding: 66px 0;
    color: #fff;
    background: linear-gradient(120deg, var(--orange), var(--red));
}

.hot-band .section-heading h2,
.hot-band .section-heading p {
    color: #fff;
}

.hot-inner {
    display: grid;
    grid-template-columns: 0.78fr 1.22fr;
    gap: 34px;
    align-items: start;
}

.light-button {
    display: inline-flex;
    margin-top: 10px;
    color: var(--blue);
    background: #fff;
}

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

.media-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.media-row:hover {
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.22);
}

.media-row img {
    width: 110px;
    height: 74px;
    border-radius: 14px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.16);
}

.media-row-body {
    display: grid;
    min-width: 0;
}

.media-row-body strong,
.media-row-body em {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.media-row-body em {
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
    font-size: 14px;
}

.media-row-body small {
    color: rgba(255, 255, 255, 0.7);
}

.list-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 900;
}

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

.category-card,
.catalog-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-card img {
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    background: #e5e7eb;
}

.category-card span,
.catalog-body h2 {
    display: block;
    margin: 18px 18px 8px;
    font-size: 22px;
    font-weight: 900;
}

.category-card p,
.catalog-body p {
    margin: 0 18px 20px;
    color: var(--muted);
}

.catalog-card {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
}

.catalog-cover {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: 220px;
    background: #e5e7eb;
}

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

.catalog-body {
    padding: 22px;
}

.catalog-body h2,
.catalog-body p {
    margin-left: 0;
    margin-right: 0;
}

.catalog-body .text-link {
    color: #fff;
    background: var(--blue);
}

.sub-hero {
    color: #fff;
    background: linear-gradient(120deg, #1d4ed8, #06b6d4);
    padding: 70px 0;
}

.sub-hero.orange {
    background: linear-gradient(120deg, var(--orange), var(--red));
}

.sub-hero p {
    max-width: 820px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.filter-panel {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    padding: 14px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.filter-panel.advanced {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px 150px;
}

.detail-hero {
    color: #fff;
    background: linear-gradient(120deg, #111827, #1d4ed8 55%, #06b6d4);
    padding: 56px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 36px;
    align-items: center;
}

.detail-copy h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.12);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.player-section {
    padding-bottom: 34px;
}

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

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(0, 0, 0, 0.36);
    color: #fff;
    cursor: pointer;
}

.play-overlay[hidden] {
    display: none;
}

.play-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.94);
    font-size: 34px;
    box-shadow: 0 24px 42px rgba(37, 99, 235, 0.32);
    transition: transform 0.2s ease;
}

.play-overlay:hover span {
    transform: scale(1.08);
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 14px;
    margin: 0;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.38);
}

.detail-article {
    max-width: 900px;
    margin: 0 auto;
    padding: 34px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.detail-article h2 {
    margin-top: 0;
    font-size: 26px;
}

.detail-article p {
    margin: 0 0 28px;
    color: #374151;
    font-size: 17px;
    line-height: 1.85;
}

.related-inline a {
    color: var(--blue-dark);
    background: #eff6ff;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1fr;
    gap: 36px;
    padding: 48px 0;
}

.footer-logo {
    color: #fff;
    margin-bottom: 14px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

.site-footer p {
    max-width: 480px;
    color: #9ca3af;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
}

.site-footer a:hover {
    color: #60a5fa;
}

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

.footer-bottom {
    padding: 18px 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: #9ca3af;
}

.back-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 45;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--blue);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.show {
    opacity: 1;
    pointer-events: auto;
}

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

[hidden] {
    display: none !important;
}

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

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

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

    .hero-slide,
    .detail-layout,
    .hot-inner,
    .filter-panel.advanced {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        min-height: 760px;
    }

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

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

    .menu-button {
        display: block;
    }

    .header-inner {
        min-height: 62px;
    }

    .hero-inner {
        min-height: 760px;
        padding-top: 44px;
    }

    .hero-slider {
        min-height: 610px;
    }

    .hero-slide {
        gap: 26px;
    }

    .hero-copy h1,
    .sub-hero h1,
    .detail-copy h1 {
        font-size: 36px;
    }

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

    .hero-search,
    .mobile-search,
    .filter-panel {
        flex-direction: column;
        border-radius: 18px;
    }

    .movie-grid,
    .featured-grid,
    .latest-grid,
    .category-grid,
    .catalog-grid {
        grid-template-columns: 1fr;
    }

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

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

    .media-row img {
        width: 86px;
        height: 62px;
    }

    .detail-article {
        padding: 24px;
    }
}
