:root {
    color-scheme: light;
    --brand: #f59e0b;
    --brand-dark: #d97706;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f8fafc;
    --line: #e5e7eb;
    --panel: #ffffff;
    --night: #0f172a;
    --night-soft: #1f2937;
    --shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

[hidden] {
    display: none !important;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

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

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #92400e;
    background: #ffedd5;
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #fff7ed;
    padding: 10px;
}

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

.mobile-nav {
    display: none;
    padding: 0 24px 16px;
    border-top: 1px solid #f3f4f6;
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    color: #374151;
    font-weight: 800;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 28%, rgba(245, 158, 11, 0.28), transparent 26rem),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.24)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.08) 40%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, 100%);
    margin: 0 auto;
    min-height: 72vh;
    display: flex;
    align-items: flex-end;
    padding: 112px 24px 82px;
}

.hero-copy {
    max-width: 760px;
    color: white;
}

.eyebrow,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: #fef3c7;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.hero h2 {
    margin: 18px 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.07em;
    font-weight: 950;
}

.hero p {
    max-width: 680px;
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.button-primary,
.button-secondary,
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    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;
}

.button-primary {
    color: white;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 16px 34px rgba(239, 68, 68, 0.26);
}

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

.button-secondary {
    color: #fef3c7;
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(10px);
}

.button-ghost {
    color: #92400e;
    background: #ffedd5;
}

.hero-tools {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 4;
    width: min(1280px, 100%);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    pointer-events: none;
}

.hero-arrows,
.hero-dots {
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 22px;
}

.hero-dot {
    width: 38px;
    height: 10px;
    border-radius: 999px;
}

.hero-arrow:hover,
.hero-dot.is-active {
    background: var(--brand);
    transform: translateY(-1px);
}

.hero-search {
    position: relative;
    z-index: 5;
    width: min(1280px, calc(100% - 48px));
    margin: -36px auto 0;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-search input,
.filter-input,
.filter-select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    padding: 0 18px;
    color: #111827;
    font-size: 15px;
    outline: none;
}

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

.container {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 72px 24px;
}

.container.tight {
    padding-top: 38px;
}

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

.section-header h1,
.section-header h2,
.page-hero h1 {
    margin: 14px 0 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.section-header p,
.page-hero p {
    margin: 12px 0 0;
    max-width: 760px;
    color: var(--muted);
    line-height: 1.8;
}

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

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

.movie-card {
    min-width: 0;
    border-radius: 24px;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid rgba(229, 231, 235, 0.8);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    content-visibility: auto;
    contain-intrinsic-size: 330px 470px;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: rgba(245, 158, 11, 0.32);
}

.movie-card-link,
.poster-frame,
.movie-card-body {
    display: block;
}

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease;
}

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

.poster-gradient {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent);
}

.poster-badge,
.poster-score {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.poster-badge {
    left: 12px;
    background: rgba(245, 158, 11, 0.94);
}

.poster-score {
    right: 12px;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(8px);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.84);
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    padding-left: 3px;
    border-radius: 999px;
    color: #fff;
    background: rgba(245, 158, 11, 0.9);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body strong {
    display: block;
    font-size: 17px;
    line-height: 1.35;
    min-height: 2.7em;
    color: #111827;
}

.movie-meta-line,
.movie-desc {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.movie-desc {
    min-height: 3.2em;
}

.compact-card .movie-card-body strong {
    min-height: auto;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 156px;
    padding: 22px;
    border-radius: 26px;
    background: linear-gradient(135deg, #111827, #374151);
    color: #fff;
    box-shadow: 0 18px 45px rgba(17, 24, 39, 0.18);
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -35px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.28);
}

.category-tile h2,
.category-tile h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 24px;
}

.category-tile p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #d1d5db;
    line-height: 1.65;
    font-size: 14px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 58px 96px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.rank-number {
    font-size: 32px;
    font-weight: 950;
    color: #f59e0b;
    text-align: center;
}

.ranking-item img {
    width: 96px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 16px;
    background: #111827;
}

.ranking-copy h2,
.ranking-copy h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.ranking-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 78% 20%, rgba(245, 158, 11, 0.36), transparent 24rem),
        linear-gradient(135deg, #020617, #1f2937);
    padding: 84px 24px 76px;
}

.page-hero-inner {
    width: min(1280px, 100%);
    margin: 0 auto;
}

.page-hero p {
    color: #d1d5db;
}

.filter-panel {
    margin-bottom: 28px;
    display: grid;
    grid-template-columns: 1fr 190px 190px;
    gap: 14px;
    padding: 16px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.empty-state {
    display: none;
    padding: 36px;
    border-radius: 24px;
    color: #6b7280;
    background: #fff;
    border: 1px dashed #d1d5db;
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 34px;
    align-items: start;
}

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

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(2, 6, 23, 0.25);
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.76));
}

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

.player-start {
    position: relative;
    z-index: 2;
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 999px;
    padding-left: 7px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-size: 38px;
    cursor: pointer;
    box-shadow: 0 22px 55px rgba(239, 68, 68, 0.34);
}

.player-meta-card,
.detail-card {
    padding: 24px;
    border-radius: 28px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.detail-title {
    margin: 24px 0 12px;
    font-size: clamp(30px, 4vw, 50px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.breadcrumb {
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 14px;
}

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

.meta-chips,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.meta-chip,
.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
}

.tag-pill {
    background: #ffedd5;
    color: #92400e;
}

.detail-card h2,
.player-meta-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.detail-card p,
.player-meta-card p {
    margin: 0 0 16px;
    color: #374151;
    line-height: 1.9;
}

.sidebar-poster {
    width: 100%;
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #111827;
    box-shadow: var(--shadow);
}

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

.sidebar-link {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.sidebar-link:hover {
    background: #ffedd5;
    transform: translateX(3px);
}

.sidebar-link img {
    width: 64px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.sidebar-link strong {
    display: block;
    line-height: 1.35;
}

.sidebar-link span {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 13px;
}

.site-footer {
    margin-top: 54px;
    color: #d1d5db;
    background: linear-gradient(135deg, #020617, #1f2937);
}

.footer-inner {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 54px 24px;
    display: grid;
    grid-template-columns: 1.5fr 0.75fr 0.75fr;
    gap: 34px;
}

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

.footer-brand p {
    max-width: 620px;
    line-height: 1.85;
    color: #9ca3af;
}

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

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

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

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

@media (max-width: 1120px) {
    .movie-grid,
    .movie-grid.large-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;
    }

    .mobile-menu-button {
        display: block;
    }

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

    .hero,
    .hero-content {
        min-height: 76vh;
    }

    .hero-content {
        padding: 92px 20px 92px;
    }

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

    .section-header {
        display: block;
    }

    .movie-grid,
    .movie-grid.large-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .ranking-list,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .header-inner {
        padding: 0 16px;
    }

    .brand {
        font-size: 21px;
    }

    .hero h1,
    .hero h2 {
        font-size: 42px;
    }

    .hero-tools {
        justify-content: center;
    }

    .hero-arrows {
        display: none;
    }

    .container {
        padding: 52px 16px;
    }

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

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

    .movie-card-body strong {
        font-size: 15px;
    }

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

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

    .ranking-item img {
        width: 78px;
    }

    .player-start {
        width: 72px;
        height: 72px;
        font-size: 30px;
    }
}
