:root {
    --bg: #fff7ed;
    --surface: #ffffff;
    --surface-soft: #fffbeb;
    --text: #1f2937;
    --muted: #6b7280;
    --brand: #d97706;
    --brand-deep: #92400e;
    --brand-soft: #fef3c7;
    --line: #fde68a;
    --shadow: 0 18px 45px rgba(146, 64, 14, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 46%, #fff 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.header-inner {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 900;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 12px 25px rgba(180, 83, 9, 0.24);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

.brand-text strong,
.footer-brand {
    font-size: 20px;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #b45309, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    margin-top: 3px;
    color: #b45309;
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.main-nav a,
.mobile-nav a {
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--brand);
}

.nav-search {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(146, 64, 14, 0.08);
}

.nav-search input {
    width: 180px;
    border: 0;
    outline: 0;
    padding: 10px 14px;
    background: transparent;
}

.nav-search button,
.btn.primary {
    border: 0;
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #b45309);
}

.nav-search button {
    padding: 10px 16px;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    background: var(--brand-soft);
    color: var(--brand-deep);
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-nav form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.mobile-nav input,
.mobile-nav button {
    border-radius: 999px;
    border: 1px solid var(--line);
    padding: 10px 14px;
}

.mobile-nav button {
    color: #ffffff;
    border: 0;
    background: var(--brand);
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #2d1b08;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 36px;
    padding: 96px max(32px, calc((100vw - 1220px) / 2)) 76px;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-content {
    max-width: 760px;
    color: #ffffff;
}

.eyebrow {
    margin: 0 0 10px;
    color: #fbbf24;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-intro h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-lead {
    max-width: 720px;
    margin: 24px 0 12px;
    color: #ffedd5;
    font-size: 20px;
}

.hero-meta {
    color: #fed7aa;
    font-weight: 700;
}

.hero-actions,
.detail-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.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,
.movie-card:hover,
.category-tile:hover,
.category-card-large:hover {
    transform: translateY(-4px);
}

.btn.primary:hover {
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.28);
}

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

.hero-poster {
    align-self: center;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 320px;
    height: 455px;
    object-fit: cover;
}

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

.hero-dots button {
    width: 34px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.42);
}

.hero-dots button.is-active {
    background: #fbbf24;
}

.section-wrap,
.page-wrap,
.detail-page {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.section-wrap {
    padding: 64px 0;
}

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

.section-heading h2,
.content-card h2,
.category-card-large h2 {
    margin: 0;
    color: #1f2937;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.2;
}

.section-heading a,
.text-link {
    color: var(--brand);
    font-weight: 900;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    overflow: hidden;
    padding: 22px;
    color: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent, rgba(36, 24, 10, 0.86));
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-tile span,
.category-tile small {
    position: relative;
    z-index: 2;
}

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile small {
    margin-top: 6px;
    color: #ffedd5;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 30px rgba(146, 64, 14, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: 0 22px 45px rgba(146, 64, 14, 0.18);
}

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

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

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

.play-mark {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.92);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 3;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #b45309);
}

.movie-info {
    padding: 14px;
}

.movie-info h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
}

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

.movie-meta {
    margin: 6px 0;
    color: var(--brand-deep);
    font-size: 13px;
    font-weight: 800;
}

.movie-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

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

.accent-section {
    width: min(1260px, calc(100% - 24px));
    padding: 44px min(32px, 3vw);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(254, 243, 199, 0.92));
    box-shadow: var(--shadow);
}

.page-wrap {
    padding: 36px 0 70px;
}

.page-hero {
    margin: 24px 0 32px;
    border-radius: 32px;
    color: #ffffff;
    background: radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.32), transparent 30%), linear-gradient(135deg, #451a03, #92400e 52%, #f59e0b);
    box-shadow: var(--shadow);
}

.small-hero {
    padding: clamp(32px, 5vw, 62px);
}

.small-hero p:last-child {
    max-width: 780px;
    margin-bottom: 0;
    color: #ffedd5;
    font-size: 18px;
}

.filter-panel {
    padding: 22px;
    border: 1px solid rgba(251, 191, 36, 0.36);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, 180px));
    gap: 12px;
    margin-bottom: 24px;
}

.filter-bar.compact-filter {
    grid-template-columns: minmax(220px, 520px);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--line);
    outline: 0;
    border-radius: 16px;
    background: #fffdf7;
    padding: 12px 14px;
}

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

.empty-state {
    display: none;
    margin: 28px 0 4px;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

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

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

.category-card-large {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 22px;
    border: 1px solid rgba(251, 191, 36, 0.36);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 34px rgba(146, 64, 14, 0.1);
    transition: transform 0.2s ease;
}

.thumb-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.thumb-stack img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.detail-page {
    padding: 30px 0 80px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--muted);
    font-weight: 800;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    margin: 28px 0;
    padding: clamp(22px, 4vw, 42px);
    border-radius: 34px;
    color: #ffffff;
    background: radial-gradient(circle at 90% 10%, rgba(251, 191, 36, 0.3), transparent 34%), linear-gradient(135deg, #451a03, #78350f 60%, #b45309);
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-lead {
    color: #ffedd5;
    font-size: 19px;
}

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

.detail-meta-grid span {
    padding: 10px 12px;
    border: 1px solid rgba(255, 237, 213, 0.28);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
}

.detail-tags span {
    background: rgba(254, 243, 199, 0.95);
}

.player-section {
    margin: 28px 0;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.26);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.34);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
    font-size: 34px;
}

.play-overlay strong {
    font-size: 20px;
}

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

.content-card {
    padding: clamp(22px, 4vw, 38px);
    border: 1px solid rgba(251, 191, 36, 0.36);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

.content-card p {
    color: #4b5563;
    font-size: 17px;
}

.detail-switch {
    justify-content: space-between;
}

.detail-switch a {
    flex: 1 1 260px;
    padding: 16px 18px;
    color: var(--brand-deep);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    font-weight: 900;
}

.related-section {
    width: 100%;
}

.site-footer {
    color: #ffedd5;
    background: linear-gradient(135deg, #451a03, #78350f);
}

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

.footer-brand {
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 900;
}

.site-footer h3 {
    margin-top: 0;
    color: #ffffff;
}

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

.footer-links a {
    color: #fed7aa;
}

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

@media (max-width: 1080px) {
    .main-nav,
    .nav-search {
        display: none;
    }

    .menu-button {
        display: block;
        margin-left: auto;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding-top: 86px;
    }

    .hero-poster {
        display: none;
    }

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

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

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

    .detail-hero {
        grid-template-columns: 240px minmax(0, 1fr);
    }
}

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

    .hero-carousel,
    .hero-track,
    .hero-slide {
        min-height: 560px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-intro h1 {
        font-size: 36px;
    }

    .hero-lead {
        font-size: 17px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .category-card-large,
    .detail-hero,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .footer-grid {
        gap: 18px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .brand-text small {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}
