:root {
    color-scheme: light;
    --bg: #fff7ed;
    --bg-deep: #111827;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-solid: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(251, 191, 36, 0.32);
    --primary: #d97706;
    --primary-dark: #92400e;
    --accent: #f97316;
    --shadow: 0 20px 55px rgba(146, 64, 14, 0.15);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.22), transparent 35rem),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fff7ed 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
    min-height: 100vh;
}

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, 247, 237, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.28);
}

.brand-name {
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 10px 15px;
    border-radius: 999px;
    color: #78350f;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: #fef3c7;
    color: #b45309;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #fef3c7;
    padding: 10px;
}

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

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
}

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

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 14px;
    color: #78350f;
    font-weight: 700;
    background: #fff7ed;
}

main {
    overflow: hidden;
}

.hero {
    position: relative;
    min-height: 650px;
    margin-top: -72px;
    padding-top: 72px;
    background: #111827;
}

.hero-track {
    position: relative;
    min-height: 650px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
    align-items: center;
    gap: 48px;
    padding: 120px max(28px, calc((100vw - 1200px) / 2)) 76px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

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

.hero-copy {
    max-width: 740px;
    color: #fff;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f59e0b;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 14px 0 18px;
    font-size: clamp(2.45rem, 7vw, 5.9rem);
    line-height: 0.98;
    letter-spacing: -0.075em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    margin: 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1rem, 2vw, 1.22rem);
}

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

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

.hero-tags span,
.detail-tags span,
.movie-tags span,
.category-pills a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(254, 243, 199, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.28);
    color: #fde68a;
    font-size: 0.78rem;
    font-weight: 800;
}

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

.compact-actions {
    margin-top: 22px;
}

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

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 34px rgba(217, 119, 6, 0.3);
}

.btn-ghost {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.hero-poster {
    justify-self: end;
    width: min(360px, 100%);
    aspect-ratio: 2 / 3;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.22);
    transform: rotate(2deg);
}

.hero-control-row {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 3;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-search-section,
.content-section,
.player-section {
    width: min(1200px, calc(100% - 32px));
    margin: 42px auto;
}

.quick-search-card,
.filter-panel,
.detail-article {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-card {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 22px;
    align-items: center;
    padding: 24px;
}

.quick-search-card h2,
.section-heading h2,
.detail-article h2,
.player-section h2 {
    margin: 6px 0 0;
    color: #111827;
    font-size: clamp(1.5rem, 3vw, 2.3rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.home-search {
    display: flex;
    gap: 12px;
}

.home-search input,
.search-box input,
.filter-selects select {
    width: 100%;
    border: 1px solid rgba(251, 191, 36, 0.42);
    border-radius: 999px;
    background: #fff;
    outline: none;
    color: #111827;
    transition: box-shadow 0.2s ease, border 0.2s ease;
}

.home-search input,
.search-box input {
    min-height: 52px;
    padding: 0 18px;
}

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

.home-search button {
    min-width: 132px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.category-pills {
    grid-column: 1 / -1;
}

.category-pills a {
    color: #92400e;
    background: #fef3c7;
}

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

.section-link {
    color: var(--primary-dark);
    font-weight: 900;
}

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

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

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

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

.movie-card.is-hidden {
    display: none;
}

.movie-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background: var(--panel-solid);
    border: 1px solid rgba(251, 191, 36, 0.28);
    box-shadow: 0 18px 48px rgba(146, 64, 14, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border 0.22s ease;
}

.movie-card-link:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.62);
    box-shadow: 0 24px 60px rgba(146, 64, 14, 0.18);
}

.movie-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #78350f;
}

.movie-poster img {
    transition: transform 0.35s ease;
}

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

.movie-type-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.74);
    backdrop-filter: blur(10px);
}

.movie-type-badge {
    left: 10px;
    bottom: 10px;
    padding: 5px 9px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.movie-card-body h3 {
    margin: 0;
    color: #111827;
    font-size: 1.02rem;
    line-height: 1.25;
}

.movie-card-body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    color: #92400e;
    font-size: 0.78rem;
    font-weight: 800;
}

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

.movie-tags span {
    color: #92400e;
    background: #fef3c7;
}

.page-hero {
    width: min(1200px, calc(100% - 32px));
    margin: 32px auto 42px;
    padding: 64px;
    border-radius: 34px;
    color: #fff;
    background:
        radial-gradient(circle at 15% 15%, rgba(251, 191, 36, 0.32), transparent 28rem),
        linear-gradient(135deg, #111827, #78350f 55%, #111827);
    box-shadow: 0 28px 80px rgba(17, 24, 39, 0.18);
}

.small-hero h1,
.category-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
}

.search-box {
    display: grid;
    gap: 8px;
    color: #92400e;
    font-weight: 900;
}

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

.filter-selects select {
    min-height: 46px;
    padding: 0 14px;
}

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

.category-card {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 8px;
    padding: 20px;
    border-radius: 24px;
    color: #fff;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    box-shadow: 0 20px 55px rgba(17, 24, 39, 0.16);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 66px rgba(17, 24, 39, 0.24);
}

.category-card span {
    color: #fbbf24;
    font-size: 0.82rem;
    font-weight: 900;
}

.category-card strong {
    font-size: 1.35rem;
    line-height: 1.15;
}

.category-card em {
    font-style: normal;
    opacity: 0.82;
}

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

.detail-hero {
    min-height: 560px;
    padding: 72px 0;
    background-size: cover;
    background-position: center;
}

.detail-hero-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(230px, 330px) minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-info {
    color: #fff;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    color: #fde68a;
    font-weight: 900;
}

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

.detail-meta span {
    min-height: 62px;
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.detail-meta b {
    color: #fbbf24;
    font-size: 0.78rem;
}

.player-section {
    margin-top: 56px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    aspect-ratio: 16 / 9;
    box-shadow: 0 30px 90px rgba(17, 24, 39, 0.28);
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(17, 24, 39, 0.26), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 22px 50px rgba(245, 158, 11, 0.34);
    font-size: 2.2rem;
    text-indent: 6px;
}

.play-overlay strong {
    font-size: 1.2rem;
}

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

.detail-article {
    padding: 26px;
}

.detail-article p {
    margin: 14px 0 0;
    color: #4b5563;
}

.site-footer {
    margin-top: 64px;
    padding: 44px 0;
    color: #fde68a;
    background: #111827;
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: #fff7ed;
    font-weight: 800;
}

.footer-inner p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 247, 237, 0.72);
}

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

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

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

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

    .nav-toggle {
        display: block;
    }

    .hero,
    .hero-track {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
        padding-top: 110px;
        text-align: left;
    }

    .hero-poster {
        justify-self: start;
        width: min(260px, 70vw);
    }

    .quick-search-card,
    .detail-hero-inner,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .filter-selects {
        grid-template-columns: 1fr;
    }

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

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

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

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

@media (max-width: 560px) {
    .header-inner {
        min-height: 64px;
    }

    .brand-name {
        font-size: 1.05rem;
    }

    .hero {
        margin-top: -64px;
        padding-top: 64px;
    }

    .hero,
    .hero-track {
        min-height: 720px;
    }

    .hero-slide {
        padding-left: 18px;
        padding-right: 18px;
    }

    .hero-copy h1,
    .detail-info h1 {
        font-size: 2.65rem;
    }

    .hero-actions,
    .home-search,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .home-search button {
        min-height: 48px;
    }

    .movie-grid,
    .compact-grid,
    .ranking-grid,
    .full-grid,
    .ranking-list,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: min(280px, 100%);
    }
}
