:root {
    --bg: #fff7ed;
    --paper: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #fffbeb;
    --brand: #b45309;
    --brand-2: #d97706;
    --brand-3: #f59e0b;
    --dark: #111827;
    --radius: 1rem;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 28%, #fffbeb 100%);
}

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

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

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

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-3));
    box-shadow: 0 12px 24px rgba(180, 83, 9, 0.24);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 15px;
    font-weight: 650;
    color: #374151;
}

.nav-link {
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--brand);
    border-bottom-color: var(--brand);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    background: #fff7ed;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
    color: #374151;
    font-weight: 650;
}

.mobile-link:hover,
.mobile-link.is-active {
    color: var(--brand);
    background: #fffbeb;
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

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

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

.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.02);
    transform: scale(1.02);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 76% 20%, rgba(245, 158, 11, 0.34), transparent 28%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.58) 44%, rgba(17, 24, 39, 0.22)),
        linear-gradient(0deg, rgba(17, 24, 39, 0.86), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 680px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 92px 0 96px;
}

.hero-copy {
    width: min(680px, 100%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(180, 83, 9, 0.9);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(8px);
    font-weight: 700;
}

.hero h1 {
    margin: 22px 0 16px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-copy p {
    margin: 0;
    max-width: 610px;
    color: #e5e7eb;
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.65;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 26px 0;
}

.hero-meta span {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    font-size: 14px;
    backdrop-filter: blur(8px);
}

.hero-actions,
.cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 16px 34px rgba(180, 83, 9, 0.25);
}

.btn-light {
    color: var(--brand);
    background: #ffffff;
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
}

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

.hero-tabs {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 4;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.hero-tab {
    text-align: left;
    min-height: 74px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 18px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.48);
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-tab strong,
.hero-tab span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-tab strong {
    font-size: 14px;
}

.hero-tab span {
    margin-top: 5px;
    color: #d1d5db;
    font-size: 12px;
}

.hero-tab.is-active,
.hero-tab:hover {
    border-color: rgba(245, 158, 11, 0.88);
    background: rgba(180, 83, 9, 0.62);
}

.page-shell,
.home-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.home-section {
    padding: 72px 0;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-heading p,
.lead {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-more {
    color: var(--brand);
    font-weight: 800;
}

.catalog-tools {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px;
    gap: 12px;
    margin: 24px 0 32px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.06);
}

.search-box {
    display: grid;
    gap: 7px;
    color: #374151;
    font-size: 13px;
    font-weight: 750;
}

.search-box input,
.filter-select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    padding: 0 15px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus,
.filter-select:focus {
    border-color: var(--brand-2);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(180, 83, 9, 0.28);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1f2937, #92400e);
}

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: end;
    justify-content: center;
    padding: 18px;
    color: #ffffff;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.76));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.poster-mask span {
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(180, 83, 9, 0.92);
    font-weight: 800;
}

.movie-card:hover .poster-mask {
    opacity: 1;
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
}

.movie-meta-line span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #fffbeb;
}

.movie-card h3 {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--brand);
}

.movie-card p {
    margin: 0;
    min-height: 64px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.movie-card-small .movie-card-body {
    padding: 12px;
}

.movie-card-small h3 {
    font-size: 15px;
}

.movie-card-small p {
    display: none;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span {
    padding: 5px 8px;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    min-height: 170px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #fffbeb);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.rank-list {
    display: grid;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 54px 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.04);
}

.rank-num {
    color: var(--brand);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 86px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
    background: #1f2937;
}

.rank-item h3 {
    margin: 0 0 8px;
    font-size: 19px;
}

.rank-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.page-hero {
    padding: 64px 0 30px;
    background:
        radial-gradient(circle at 78% 18%, rgba(245, 158, 11, 0.20), transparent 24%),
        linear-gradient(135deg, #fff7ed, #ffffff 46%, #fffbeb);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--brand);
    font-weight: 750;
}

.detail-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 72px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
    gap: 32px;
    align-items: start;
}

.player-card,
.detail-panel,
.related-panel {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(17, 24, 39, 0.07);
    overflow: hidden;
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.66));
    z-index: 2;
}

.player-overlay-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.play-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-3));
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
}

.player-title {
    padding: 22px 24px;
}

.player-title h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -0.045em;
}

.info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.info-pills span {
    padding: 7px 11px;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    font-size: 13px;
    font-weight: 750;
}

.detail-panel {
    padding: 26px;
}

.detail-panel h2,
.related-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-panel p {
    color: #374151;
    line-height: 1.9;
}

.detail-panel p:last-child {
    margin-bottom: 0;
}

.side-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 22px;
    background: #1f2937;
}

.side-meta {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.side-meta div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.side-meta strong {
    color: var(--ink);
}

.related-panel {
    margin-top: 32px;
    padding: 26px;
}

.empty-state {
    display: none;
    padding: 36px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed #d1d5db;
    border-radius: 22px;
    background: #ffffff;
}

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

.site-footer {
    background: #111827;
    color: #d1d5db;
    margin-top: 40px;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 34px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 34px;
}

.footer-logo {
    color: #ffffff;
}

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

.site-footer p {
    margin: 16px 0 0;
    max-width: 420px;
    line-height: 1.8;
}

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

.footer-links a:hover {
    color: #f59e0b;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid #1f2937;
    color: #9ca3af;
    text-align: center;
}

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

    .menu-toggle {
        display: inline-flex;
    }

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

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

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

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

@media (max-width: 720px) {
    .hero,
    .hero-content {
        min-height: 620px;
    }

    .hero-content {
        align-items: start;
        padding-top: 72px;
    }

    .hero-tabs {
        grid-template-columns: 1fr;
        bottom: 18px;
    }

    .hero-tab:nth-child(n+4) {
        display: none;
    }

    .catalog-tools {
        grid-template-columns: 1fr;
    }

    .section-heading {
        display: block;
    }

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

    .movie-card h3 {
        font-size: 16px;
    }

    .movie-card p {
        min-height: auto;
        font-size: 13px;
    }

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

    .rank-item {
        grid-template-columns: 42px 68px minmax(0, 1fr);
    }

    .rank-item .btn-primary {
        grid-column: 1 / -1;
        width: 100%;
    }

    .player-title,
    .detail-panel,
    .related-panel {
        padding: 18px;
    }
}
