:root {
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --sky-700: #0369a1;
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-900: #0f172a;
    --white: #ffffff;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.18);
    --radius-lg: 18px;
    --radius-xl: 26px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-900);
    background: linear-gradient(180deg, var(--slate-50), var(--white));
    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 {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    color: var(--white);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--sky-600), var(--cyan-500));
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.32);
}

.brand-text {
    font-size: 21px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--slate-700);
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--sky-600);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: var(--slate-100);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--slate-900);
}

.mobile-menu {
    display: none;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-menu.open {
    display: grid;
    gap: 10px;
}

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--slate-700);
    background: var(--slate-50);
    font-weight: 700;
}

.mobile-nav-link.active {
    color: var(--sky-700);
    background: var(--sky-50);
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: var(--white);
    background: var(--slate-900);
}

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

.hero-slide {
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    transition: opacity 0.65s ease, transform 0.65s ease;
    transform: scale(1.02);
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 80% 12%, rgba(34, 211, 238, 0.28), transparent 28%), radial-gradient(circle at 10% 80%, rgba(14, 165, 233, 0.26), transparent 35%);
}

.hero-copy {
    position: relative;
    z-index: 2;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 110px 0 130px;
}

.eyebrow {
    margin: 0 0 14px;
    color: #bae6fd;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(36px, 7vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-copy .lead {
    max-width: 680px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags,
.detail-tags {
    margin-top: 24px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    color: var(--sky-700);
    background: var(--sky-50);
    font-size: 12px;
    font-weight: 800;
}

.hero-tags .tag,
.detail-tags .tag {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

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

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

.primary-btn {
    color: var(--sky-700);
    background: var(--white);
    box-shadow: 0 14px 36px rgba(255, 255, 255, 0.2);
}

.ghost-btn {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.12);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.28);
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

.hero-control.prev {
    left: 22px;
}

.hero-control.next {
    right: 22px;
}

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

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

.hero-dot.active {
    width: 28px;
    background: var(--white);
}

.stats-strip {
    position: relative;
    z-index: 10;
    width: min(var(--container), calc(100% - 32px));
    margin: -54px auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.stat-card span {
    display: block;
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 800;
}

.stat-card strong {
    display: block;
    margin-top: 4px;
    color: var(--slate-900);
    font-size: 24px;
    line-height: 1.15;
}

.section-panel,
.category-section,
.player-section {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 74px 0;
}

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

.section-heading.centered {
    text-align: center;
}

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

.section-heading h2,
.content-section h2 {
    margin: 0 0 10px;
    color: var(--slate-900);
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading p,
.content-section p {
    margin: 0;
    color: var(--slate-500);
    font-size: 17px;
}

.section-link {
    color: var(--sky-700);
    background: var(--sky-50);
}

.search-panel {
    padding-bottom: 24px;
}

.home-search,
.filter-bar {
    display: grid;
    gap: 12px;
}

.home-search {
    max-width: 720px;
    margin: 0 auto;
    grid-template-columns: 1fr auto;
    padding: 10px;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.home-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    padding: 0 16px;
    color: var(--slate-900);
    background: var(--white);
    outline: none;
}

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

.home-search button {
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-600), var(--cyan-500));
    font-weight: 900;
    cursor: pointer;
}

.filter-bar {
    grid-template-columns: 1fr 170px;
    align-items: center;
    margin-bottom: 28px;
}

.wide-filter {
    grid-template-columns: 1fr 180px 160px;
}

.result-title {
    margin-bottom: 20px;
    color: var(--slate-700);
    font-weight: 900;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--slate-100);
}

.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.movie-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 900;
}

.movie-year {
    right: 12px;
    bottom: 12px;
    background: rgba(15, 23, 42, 0.74);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 32px;
    background: linear-gradient(135deg, #fb923c, #ef4444);
}

.movie-body {
    padding: 17px;
}

.movie-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--sky-700);
    font-size: 12px;
    font-weight: 900;
}

.movie-card h3 {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--slate-900);
    font-size: 18px;
    line-height: 1.34;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.movie-card-compact {
    display: grid;
    grid-template-columns: 140px 1fr;
}

.movie-card-compact .movie-poster-wrap {
    aspect-ratio: auto;
    height: 100%;
    min-height: 150px;
}

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

.category-section,
.soft-bg {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100% - var(--container)) / 2));
    padding-right: max(16px, calc((100% - var(--container)) / 2));
    background: linear-gradient(180deg, var(--slate-50), var(--white));
}

.category-grid,
.category-list-grid {
    display: grid;
    gap: 18px;
}

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

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

.category-tile,
.category-card-large {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    padding: 26px;
    border-radius: var(--radius-xl);
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-600), var(--cyan-500));
    box-shadow: var(--shadow-md);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.category-card-large:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.category-tile::after,
.category-card-large::after {
    content: "";
    position: absolute;
    right: -36px;
    bottom: -52px;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.category-icon,
.category-icon-large {
    display: block;
    margin-bottom: 16px;
    font-size: 42px;
}

.category-tile strong,
.category-card-large h2 {
    display: block;
    position: relative;
    z-index: 2;
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile small,
.category-card-large p {
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.86);
}

.category-card-large {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 18px;
    align-items: center;
}

.category-card-large span:not(.category-icon-large) {
    display: inline-flex;
    margin-top: 14px;
    font-weight: 900;
}

.from-red {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.from-blue {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.from-pink {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
}

.from-purple {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.from-amber {
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

.from-orange {
    background: linear-gradient(135deg, #f97316, #dc2626);
}

.from-green {
    background: linear-gradient(135deg, #16a34a, #0d9488);
}

.from-cyan {
    background: linear-gradient(135deg, #0891b2, #0284c7);
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-600), var(--cyan-500));
}

.compact-hero,
.category-hero {
    padding: 98px max(16px, calc((100% - var(--container)) / 2));
}

.compact-hero::after,
.category-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.chip-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--slate-700);
    background: var(--slate-100);
    font-weight: 800;
}

.chip-link.active,
.chip-link:hover {
    color: var(--white);
    background: var(--sky-600);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: var(--slate-900);
}

.detail-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: saturate(1.08);
}

.detail-content {
    position: relative;
    z-index: 2;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 82px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

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

.detail-copy h1 {
    max-width: 820px;
}

.detail-meta {
    display: grid;
    gap: 9px;
    margin: 26px 0;
    color: rgba(255, 255, 255, 0.82);
}

.detail-copy .primary-btn {
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-600), var(--cyan-500));
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #020617;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 9;
}

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

.video-player {
    z-index: 1;
    background: #020617;
}

.player-cover {
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background-position: center;
    background-size: cover;
    cursor: pointer;
}

.player-cover strong,
.player-cover small,
.play-icon {
    position: relative;
    z-index: 3;
}

.player-cover strong {
    margin-top: 18px;
    font-size: clamp(22px, 4vw, 42px);
    text-align: center;
}

.player-cover small {
    display: inline-flex;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 800;
}

.play-icon {
    width: 76px;
    height: 76px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--sky-700);
    background: var(--white);
    box-shadow: 0 22px 52px rgba(2, 6, 23, 0.28);
}

.player-start {
    position: absolute;
    right: 22px;
    bottom: 22px;
    z-index: 3;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-600), var(--cyan-500));
    font-weight: 900;
    cursor: pointer;
}

.player-shell.is-playing .player-cover,
.player-shell.is-playing .player-start {
    opacity: 0;
    pointer-events: none;
}

.content-section {
    max-width: 920px;
    padding-top: 42px;
}

.content-section h2 {
    margin-top: 28px;
    font-size: 30px;
}

.content-section p {
    color: var(--slate-700);
    font-size: 18px;
}

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

.footer-grid {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0 36px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 38px;
}

.footer-brand {
    margin-bottom: 12px;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    text-align: center;
}

@media (max-width: 1100px) {
    .movie-grid,
    .all-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        min-height: 560px;
    }

    .hero-copy {
        padding: 86px 0 120px;
    }

    .stats-strip {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

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

    .filter-bar,
    .wide-filter,
    .home-search {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .hero-control {
        display: none;
    }

    .stats-strip,
    .featured-grid,
    .movie-grid,
    .all-grid,
    .movie-list-grid,
    .category-grid,
    .category-list-grid {
        grid-template-columns: 1fr;
    }

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

    .movie-card-compact {
        grid-template-columns: 116px 1fr;
    }

    .movie-card-compact .movie-poster-wrap {
        min-height: 170px;
    }

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

    .compact-hero,
    .category-hero {
        padding-top: 74px;
        padding-bottom: 74px;
    }
}
