:root {
    --bg: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --card: #ffffff;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --orange: #f97316;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 54%, #0f172a 100%);
    color: #fff;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.25);
}

.nav-wrap {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-name {
    font-size: 22px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fbbf24, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
    font-size: 14px;
}

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

.nav-link,
.mobile-link {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #fbbf24;
}

.nav-categories {
    position: relative;
}

.nav-more {
    border: 0;
    background: transparent;
    cursor: default;
}

.nav-dropdown {
    position: absolute;
    top: 38px;
    right: 0;
    width: 190px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
    display: grid;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-categories:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown a {
    padding: 9px 10px;
    border-radius: 10px;
    color: #e2e8f0;
}

.nav-dropdown a:hover {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px;
}

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

.mobile-nav {
    display: none;
    padding: 10px 24px 18px;
    background: #1e293b;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 900ms ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 25%, rgba(245, 158, 11, 0.25), transparent 28%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.52) 48%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 86px;
    max-width: 760px;
    color: #fff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: #f59e0b;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.32);
}

.hero-title,
.page-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-text,
.page-hero p {
    max-width: 760px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

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

.hero-meta span,
.detail-meta span,
.detail-tags span,
.movie-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.28);
}

.btn-primary:hover {
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.38);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.btn-muted {
    color: #334155;
    background: #e2e8f0;
}

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.home-search-section,
.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
}

.home-search-card {
    margin-top: -78px;
    position: relative;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.home-search-card h2 {
    margin: 0 0 16px;
    font-size: clamp(24px, 3vw, 34px);
}

.home-search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.home-search-form input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    color: var(--text);
    background: #fff;
    outline: none;
}

.home-search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.quick-links {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a {
    border-radius: 999px;
    padding: 8px 12px;
    color: #92400e;
    background: #fef3c7;
    font-weight: 700;
    font-size: 14px;
}

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

.section-heading h2 {
    margin: 0;
    flex: 1;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 900;
}

.section-heading a {
    color: #d97706;
    font-weight: 800;
}

.section-icon {
    min-width: 34px;
    font-weight: 800;
    color: #f59e0b;
    font-size: 28px;
}

.movie-grid,
.compact-grid,
.featured-grid,
.category-grid,
.ranking-grid,
.category-detail-grid {
    display: grid;
    gap: 22px;
}

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

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

.featured-grid,
.two-column-section,
.detail-layout,
.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

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

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

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.16);
}

.movie-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111827;
}

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

.movie-card-link:hover .movie-thumb img {
    transform: scale(1.08);
}

.movie-cover-shadow {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 45%, rgba(15, 23, 42, 0.72) 100%);
}

.movie-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 38px;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.25s ease;
}

.movie-card-link:hover .movie-play-icon {
    opacity: 1;
    transform: scale(1);
}

.movie-badge,
.movie-year {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.movie-badge {
    top: 12px;
    left: 12px;
    background: #f59e0b;
}

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

.movie-info {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.movie-title {
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-desc {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    color: #475569;
    font-size: 13px;
}

.movie-tags span {
    background: #f1f5f9;
    color: #475569;
}

.movie-card-large .movie-thumb {
    aspect-ratio: 16 / 9;
}

.movie-card-large .movie-title {
    font-size: 24px;
    -webkit-line-clamp: 2;
}

.category-tile,
.category-detail-card,
.content-card {
    border-radius: 22px;
    padding: 24px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.category-tile {
    min-height: 150px;
    display: grid;
    align-content: end;
    gap: 12px;
    color: #fff;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.22), transparent 28%),
        linear-gradient(135deg, #0f172a, #334155 48%, #f59e0b);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
}

.category-tile span,
.category-detail-main strong {
    font-size: 22px;
    font-weight: 900;
}

.category-tile em,
.category-detail-main span {
    color: rgba(255, 255, 255, 0.84);
    font-style: normal;
    line-height: 1.6;
}

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

.ranking-link {
    display: grid;
    grid-template-columns: 54px 110px 1fr;
    gap: 14px;
    align-items: center;
    min-height: 124px;
    border-radius: 18px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

.rank-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    font-weight: 900;
}

.ranking-link img {
    width: 110px;
    height: 82px;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-body {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.ranking-body strong {
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-body span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ranking-body em {
    color: #d97706;
    font-style: normal;
    font-size: 13px;
    font-weight: 700;
}

.page-hero,
.detail-top {
    color: #fff;
    background:
        radial-gradient(circle at 78% 16%, rgba(245, 158, 11, 0.28), transparent 30%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 58%, #111827 100%);
}

.page-hero {
    padding: 86px 24px;
}

.page-hero > div,
.detail-top > * {
    max-width: 1280px;
    margin: 0 auto;
}

.page-hero h1 {
    max-width: 900px;
}

.slim-hero {
    padding-bottom: 58px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 26px;
    border-radius: 22px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.no-result {
    padding: 28px;
    border-radius: 18px;
    background: #fff7ed;
    color: #9a3412;
    font-weight: 800;
}

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

.category-detail-card {
    display: grid;
    gap: 18px;
}

.category-detail-main {
    display: grid;
    gap: 10px;
}

.category-detail-main span {
    color: #64748b;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-samples a {
    padding: 8px 10px;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.detail-top {
    padding: 28px 24px 56px;
}

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

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

.detail-layout {
    align-items: center;
    grid-template-columns: 320px 1fr;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
}

.detail-intro h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    font-weight: 900;
}

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

.detail-meta {
    margin-bottom: 14px;
}

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

.player-section {
    padding-top: 52px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.28);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    color: #fff;
    background:
        radial-gradient(circle at 50% 42%, rgba(245, 158, 11, 0.26), transparent 28%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    cursor: pointer;
}

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

.play-cover-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    font-size: 30px;
    box-shadow: 0 22px 44px rgba(245, 158, 11, 0.4);
}

.play-cover strong {
    max-width: 90%;
    text-align: center;
    font-size: clamp(22px, 4vw, 42px);
}

.play-cover em {
    color: rgba(255, 255, 255, 0.72);
    font-style: normal;
}

.detail-content {
    align-items: start;
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 900;
}

.content-card p {
    margin: 0;
    color: #334155;
    line-height: 1.95;
    text-align: justify;
}

.site-footer {
    margin-top: 54px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.3fr;
    gap: 34px;
}

.footer-grid h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

.footer-grid p,
.footer-grid li {
    color: #94a3b8;
    line-height: 1.8;
    font-size: 14px;
}

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

.footer-grid a:hover {
    color: #fbbf24;
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #64748b;
    font-size: 14px;
}

[hidden],
.movie-card.is-hidden,
.ranking-card.is-hidden {
    display: none !important;
}

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

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

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

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

    .mobile-toggle {
        display: block;
    }

    .hero {
        min-height: 560px;
        height: 76vh;
    }

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

    .hero-arrow {
        display: none;
    }

    .home-search-form,
    .featured-grid,
    .two-column-section,
    .detail-layout,
    .detail-content,
    .category-detail-grid,
    .ranking-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-layout {
        gap: 22px;
    }

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

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .nav-wrap {
        height: 62px;
        padding: 0 16px;
    }

    .brand-name {
        font-size: 18px;
    }

    .home-search-section,
    .section,
    .page-hero,
    .detail-top {
        padding-left: 16px;
        padding-right: 16px;
    }

    .home-search-card {
        margin-top: -54px;
        padding: 20px;
    }

    .home-search-form,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .ranking-link {
        grid-template-columns: 46px 86px 1fr;
    }

    .ranking-link img {
        width: 86px;
        height: 70px;
    }

    .player-shell {
        border-radius: 18px;
    }
}
