:root {
    color-scheme: dark;
    --bg-950: #020617;
    --bg-900: #0f172a;
    --bg-800: #1e293b;
    --bg-700: #334155;
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --line: rgba(148, 163, 184, 0.22);
    --accent: #ef4444;
    --accent-2: #3b82f6;
    --card: rgba(15, 23, 42, 0.74);
    --card-strong: rgba(30, 41, 59, 0.82);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    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;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--bg-950), var(--bg-900) 48%, var(--bg-950));
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #475569, #1e293b);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 25px rgba(0, 0, 0, 0.28);
    color: white;
    font-size: 15px;
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: -0.02em;
    line-height: 1;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--soft);
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(51, 65, 85, 0.72);
    color: white;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.5);
    color: white;
    padding: 9px;
}

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

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.92);
}

.mobile-nav a {
    display: block;
    padding: 12px 10px;
    border-radius: 10px;
    color: var(--soft);
}

.mobile-nav a:hover {
    background: rgba(51, 65, 85, 0.65);
    color: white;
}

.mobile-nav.is-open {
    display: block;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--bg-950);
}

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

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

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

.hero-shade,
.hero-side-shade {
    position: absolute;
    inset: 0;
}

.hero-shade {
    background: linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.78) 52%, rgba(2, 6, 23, 0.42));
}

.hero-side-shade {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.18) 54%, rgba(2, 6, 23, 0.72));
}

.hero-content {
    position: absolute;
    inset: 0;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1280px;
}

.hero-content > * {
    max-width: 720px;
}

.hero-kicker,
.detail-kicker,
.sub-hero span,
.quick-search span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--soft);
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    margin: 14px 0 0;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.055em;
    text-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}

.hero-content h2 + p,
.hero-content h1 + h2 + p {
    margin-top: 22px;
}

.hero-content p,
.sub-hero p,
.detail-lead {
    color: #dbeafe;
    font-size: 17px;
    line-height: 1.8;
}

.hero-tags,
.movie-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.movie-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    color: var(--soft);
    font-size: 12px;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    background: white;
    color: #0f172a;
    box-shadow: 0 14px 40px rgba(255, 255, 255, 0.14);
}

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

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.55);
    color: white;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    transition: width 0.25s ease, background 0.25s ease;
}

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

.page-section,
.detail-layout {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.compact-section {
    padding: 36px 0 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

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

.section-more {
    color: #bfdbfe;
    font-weight: 700;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(203, 213, 225, 0.36);
    background: var(--card-strong);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #020617;
}

.poster-link img,
.ranking-poster img,
.category-tile img,
.category-panel-cover img,
.detail-poster,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-card:hover .poster-link img,
.category-tile:hover img,
.ranking-item:hover img {
    transform: scale(1.06);
}

.poster-link img,
.category-tile img,
.ranking-poster img {
    transition: transform 0.35s ease;
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.74);
    color: white;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

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

.movie-title {
    display: block;
    color: white;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 10px;
}

.movie-title:hover,
.ranking-title:hover,
.category-panel-title:hover,
.category-samples a:hover {
    color: #bfdbfe;
}

.movie-meta {
    margin-bottom: 12px;
}

.movie-card p,
.ranking-item p,
.category-panel p,
.footer-inner p,
.detail-article p {
    color: var(--muted);
    line-height: 1.75;
}

.tag-row {
    margin-top: 14px;
}

.tag-row span {
    color: #cbd5e1;
    background: rgba(51, 65, 85, 0.52);
}

.quick-search,
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    padding: 18px;
    box-shadow: var(--shadow);
}

.quick-search strong {
    display: block;
    margin-top: 4px;
    font-size: 20px;
}

.quick-search input,
.filter-bar input {
    width: min(420px, 100%);
    height: 46px;
    border: 1px solid var(--line);
    outline: 0;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.72);
    color: white;
    padding: 0 16px;
}

.filter-bar {
    align-items: flex-start;
    flex-direction: column;
}

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

.filter-button {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.68);
    color: var(--soft);
    padding: 0 14px;
}

.filter-button.active,
.filter-button:hover {
    background: white;
    color: #0f172a;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #0f172a;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: var(--shadow);
}

.category-tile img,
.category-tile span {
    position: absolute;
    inset: 0;
}

.category-tile span {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.2));
}

.category-tile strong,
.category-tile small {
    position: relative;
    z-index: 1;
}

.category-tile strong {
    font-size: 22px;
    margin-bottom: 8px;
}

.category-tile small {
    color: var(--soft);
    line-height: 1.65;
}

.sub-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.28), transparent 36%), linear-gradient(135deg, #020617, #0f172a 55%, #111827);
    border-bottom: 1px solid var(--line);
}

.sub-hero > div {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 88px 0;
}

.sub-hero h1 {
    margin: 14px 0 12px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.channel-hero {
    background: radial-gradient(circle at 80% 0%, rgba(239, 68, 68, 0.22), transparent 34%), linear-gradient(135deg, #020617, #111827 52%, #0f172a);
}

.ranking-hero {
    background: radial-gradient(circle at 24% 18%, rgba(239, 68, 68, 0.26), transparent 34%), radial-gradient(circle at 86% 2%, rgba(59, 130, 246, 0.24), transparent 30%), #020617;
}

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

.category-panel {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
    padding: 16px;
}

.category-panel-cover {
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 2 / 3;
    background: #020617;
}

.category-panel-title {
    display: inline-block;
    color: white;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 16px;
}

.category-samples a {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.52);
    color: var(--soft);
    font-size: 13px;
}

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

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

.ranking-item {
    position: relative;
    display: grid;
    grid-template-columns: 112px 52px 1fr;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--card);
    padding: 14px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.ranking-item:hover {
    transform: translateY(-4px);
    border-color: rgba(203, 213, 225, 0.35);
}

.ranking-poster {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 2 / 3;
    background: #020617;
}

.ranking-number {
    font-size: 28px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.22);
}

.ranking-title {
    display: inline-block;
    margin-bottom: 9px;
    color: white;
    font-size: 20px;
    font-weight: 800;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    margin-bottom: 24px;
}

.breadcrumb a:hover {
    color: white;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: black;
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow);
}

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

.movie-video {
    background: black;
}

.player-cover {
    z-index: 3;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: black;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.2));
}

.player-cover.is-hidden {
    display: none;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: 82px;
    height: 82px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-size: 28px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.detail-article {
    margin-top: 30px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
    padding: clamp(24px, 4vw, 42px);
}

.detail-article h1 {
    margin: 12px 0 18px;
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

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

.detail-side {
    position: sticky;
    top: 90px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
    padding: 18px;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 18px;
    background: #020617;
}

.detail-facts {
    list-style: none;
    margin: 18px 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.detail-facts li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.45);
}

.detail-facts span {
    color: var(--muted);
}

.full-button {
    width: 100%;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.86);
}

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

.footer-inner p {
    max-width: 620px;
    margin: 10px 0 0;
}

.footer-links {
    display: flex;
    gap: 16px;
    color: var(--soft);
}

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

[data-card].is-hidden {
    display: none;
}

@media (min-width: 768px) {
    .hero-carousel {
        height: 80vh;
    }
}

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

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

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

    .detail-side {
        position: static;
        max-width: 360px;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-content h1,
    .hero-content h2 {
        font-size: clamp(34px, 12vw, 54px);
    }

    .section-heading,
    .quick-search,
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-search input,
    .filter-bar input {
        width: 100%;
    }

    .movie-grid,
    .featured-grid,
    .related-grid,
    .full-grid,
    .category-grid,
    .category-panels,
    .home-ranking {
        grid-template-columns: 1fr 1fr;
    }

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

    .ranking-item {
        grid-template-columns: 88px 42px 1fr;
        gap: 12px;
    }
}

@media (max-width: 560px) {
    .brand-text small {
        display: none;
    }

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

    .hero-content,
    .page-section,
    .detail-layout,
    .sub-hero > div,
    .header-inner,
    .footer-inner,
    .mobile-nav {
        width: min(100% - 24px, 1280px);
    }

    .movie-grid,
    .featured-grid,
    .related-grid,
    .full-grid,
    .category-grid,
    .category-panels,
    .home-ranking {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        grid-template-columns: 74px 1fr;
    }

    .ranking-number {
        position: absolute;
        right: 16px;
        top: 14px;
        font-size: 22px;
    }

    .play-mark {
        width: 64px;
        height: 64px;
    }
}
