* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --bg: #fff7ed;
    --paper: #ffffff;
    --ink: #1f1307;
    --muted: #7c5b3a;
    --soft: #fff1dc;
    --line: rgba(120, 53, 15, 0.14);
    --brand: #d97706;
    --brand-dark: #92400e;
    --brand-deep: #451a03;
    --shadow: 0 24px 80px rgba(69, 26, 3, 0.18);
    --radius: 22px;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fffbeb 100%);
    color: var(--ink);
    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: linear-gradient(90deg, #78350f, #9a3412 48%, #78350f);
    box-shadow: 0 10px 34px rgba(69, 26, 3, 0.32);
}

.nav-shell {
    width: min(1280px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 26px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 237, 213, 0.16);
    border: 1px solid rgba(255, 237, 213, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 1.28rem;
    letter-spacing: 0.04em;
}

.brand-text em {
    margin-top: 3px;
    color: rgba(255, 237, 213, 0.82);
    font-style: normal;
    font-size: 0.78rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
    color: #ffedd5;
    font-weight: 700;
}

.desktop-nav > a,
.nav-group > a {
    padding: 22px 0;
    opacity: 0.92;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.desktop-nav > a:hover,
.nav-group > a:hover {
    opacity: 1;
    color: #ffffff;
}

.nav-group {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    width: 220px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 48px rgba(69, 26, 3, 0.22);
    transform: translateX(-50%) translateY(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-group:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
    display: block;
    padding: 9px 12px;
    border-radius: 10px;
    color: #5b3514;
    font-weight: 650;
}

.nav-dropdown a:hover {
    background: #fff7ed;
    color: #9a3412;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(340px, 26vw);
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 247, 237, 0.12);
    border: 1px solid rgba(255, 237, 213, 0.18);
}

.nav-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #fff7ed;
    background: transparent;
    padding: 8px 10px;
}

.nav-search input::placeholder {
    color: rgba(255, 237, 213, 0.68);
}

.nav-search button,
.hero-search button {
    border: 0;
    border-radius: 999px;
    background: #f59e0b;
    color: #451a03;
    font-weight: 800;
    padding: 8px 15px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.nav-search button:hover,
.hero-search button:hover {
    background: #fbbf24;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: rgba(255, 237, 213, 0.12);
    border-radius: 12px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffedd5;
    border-radius: 999px;
}

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

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

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: #ffedd5;
    font-weight: 700;
}

.mobile-nav a:hover {
    background: rgba(255, 237, 213, 0.12);
}

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

.hero-carousel {
    position: relative;
    min-height: 76vh;
    overflow: hidden;
    background: #120b05;
}

.hero-viewport,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.85s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-content {
    width: min(860px, calc(100% - 48px));
    margin: 0 auto 9vh;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.34);
}

.hero-label,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0 14px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.92);
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-content h1,
.hero-content h2 {
    margin: 0;
    max-width: 820px;
    font-size: clamp(2.4rem, 5.8vw, 5.2rem);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-movie-title {
    margin-top: 12px !important;
    color: #fed7aa;
    font-size: clamp(1.5rem, 3vw, 2.7rem) !important;
    letter-spacing: -0.03em !important;
}

.hero-content p:not(.hero-label) {
    max-width: 730px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1rem, 1.8vw, 1.25rem);
}

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

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

.hero-tags span,
.detail-tags span,
.movie-meta-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 237, 213, 0.18);
    color: #fff7ed;
    border: 1px solid rgba(255, 237, 213, 0.18);
    font-size: 0.82rem;
    font-weight: 700;
}

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

.primary-button,
.secondary-button,
.ghost-button,
.card-link,
.rank-watch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 850;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    background: #d97706;
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(217, 119, 6, 0.32);
}

.primary-button:hover {
    background: #b45309;
    transform: translateY(-2px);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.92);
    color: #78350f;
}

.secondary-button:hover {
    color: #451a03;
    transform: translateY(-2px);
}

.ghost-button {
    border: 1px solid rgba(255, 237, 213, 0.45);
    color: #ffedd5;
    background: rgba(0, 0, 0, 0.18);
}

.ghost-button:hover {
    background: rgba(255, 237, 213, 0.14);
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.44);
    color: #ffffff;
    font-size: 2.1rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.quick-panel {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: -46px auto 34px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(251, 191, 36, 0.24);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    gap: 22px;
    align-items: center;
}

.quick-panel p {
    margin: 0 0 4px;
    color: var(--brand-dark);
    font-weight: 800;
}

.quick-panel strong {
    font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.hero-search {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 999px;
    background: #fff7ed;
    border: 1px solid rgba(217, 119, 6, 0.16);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 11px 14px;
    color: var(--ink);
}

.page-shell,
.detail-page {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0 64px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin: 0 0 28px;
    padding: clamp(34px, 7vw, 72px);
    border-radius: 30px;
    background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.28), transparent 38%), linear-gradient(135deg, #451a03, #9a3412 58%, #d97706);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.page-hero p:not(.section-kicker) {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 247, 237, 0.88);
    font-size: 1.08rem;
}

.content-section {
    margin: 44px 0;
}

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

.section-heading h2 {
    margin: 0;
    color: #451a03;
    font-size: clamp(1.55rem, 3vw, 2.4rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading .section-kicker {
    margin-bottom: 9px;
}

.section-heading > a {
    color: var(--brand-dark);
    font-weight: 850;
}

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

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

.category-card,
.movie-card,
.detail-body-card,
.filter-panel,
.rank-item {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 44px rgba(69, 26, 3, 0.08);
}

.category-card {
    min-height: 210px;
    padding: 20px;
    border-radius: var(--radius);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 58px rgba(69, 26, 3, 0.15);
}

.category-main-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #451a03;
}

.category-main-link span {
    font-size: 1.2rem;
    font-weight: 900;
}

.category-main-link strong {
    padding: 7px 10px;
    border-radius: 999px;
    background: #ffedd5;
    color: #9a3412;
    font-size: 0.82rem;
}

.category-card p {
    margin: 14px 0;
    color: var(--muted);
}

.category-mini-links {
    display: grid;
    gap: 6px;
}

.category-mini-links a {
    color: #92400e;
    font-size: 0.92rem;
    font-weight: 700;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 58px rgba(69, 26, 3, 0.16);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #78350f, #f59e0b);
}

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

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

.poster-year {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(69, 26, 3, 0.74);
    font-size: 0.78rem;
    font-weight: 800;
}

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

.movie-card-body .movie-meta-row span {
    background: #fff7ed;
    color: #92400e;
    border-color: rgba(217, 119, 6, 0.15);
}

.movie-card h3 {
    margin: 12px 0 8px;
    color: #451a03;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h2 a:hover {
    color: #b45309;
}

.movie-card p {
    min-height: 3.2em;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.92rem;
}

.card-link {
    min-height: 34px;
    padding: 7px 12px;
    color: #ffffff;
    background: #d97706;
    font-size: 0.88rem;
}

.card-link:hover {
    background: #b45309;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 170px 170px;
    gap: 16px;
    align-items: end;
    margin: 0 0 28px;
    padding: 18px;
    border-radius: var(--radius);
}

.filter-field {
    display: grid;
    gap: 7px;
}

.filter-field label {
    color: #78350f;
    font-size: 0.9rem;
    font-weight: 850;
}

.filter-field input,
.filter-field select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(217, 119, 6, 0.22);
    border-radius: 14px;
    outline: 0;
    background: #fffaf4;
    color: var(--ink);
    padding: 10px 13px;
}

.filter-field input:focus,
.filter-field select:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.empty-state {
    display: none;
    grid-column: 1 / -1;
    margin: 0;
    padding: 14px;
    border-radius: 14px;
    background: #fff7ed;
    color: #92400e;
    font-weight: 800;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 92px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #d97706, #92400e);
    font-weight: 900;
}

.rank-cover {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #78350f, #f59e0b);
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info h2 {
    margin: 0 0 6px;
    color: #451a03;
    font-size: 1.18rem;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--muted);
}

.rank-info .movie-meta-row span {
    background: #fff7ed;
    color: #92400e;
}

.rank-watch {
    background: #d97706;
    color: #ffffff;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    gap: clamp(22px, 4vw, 48px);
    align-items: center;
    margin: 0 0 36px;
    padding: clamp(22px, 4vw, 48px);
    border-radius: 32px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.22), transparent 38%), linear-gradient(135deg, #2c1204, #78350f 58%, #9a3412);
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #78350f, #f59e0b);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
    color: rgba(255, 237, 213, 0.76);
    font-size: 0.92rem;
}

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

.detail-intro h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-line {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 247, 237, 0.88);
    font-size: 1.1rem;
}

.detail-tags {
    margin-top: 20px;
}

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

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #080503;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.32), rgba(0, 0, 0, 0.72));
    cursor: pointer;
    z-index: 3;
}

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

.play-icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: #d97706;
    box-shadow: 0 20px 44px rgba(217, 119, 6, 0.36);
    font-size: 2rem;
}

.play-cover strong {
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.42);
    font-size: 1rem;
}

.detail-body-card {
    margin: 0 0 42px;
    padding: clamp(22px, 4vw, 42px);
    border-radius: 28px;
}

.detail-body-card h2 {
    margin: 0 0 12px;
    color: #451a03;
    font-size: 1.6rem;
}

.detail-body-card h2:not(:first-child) {
    margin-top: 28px;
}

.detail-body-card p {
    margin: 0 0 14px;
    color: #4b2c13;
    font-size: 1.02rem;
}

.site-footer {
    width: min(1280px, calc(100% - 32px));
    margin: 40px auto 28px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-radius: 24px;
    background: #451a03;
    color: #ffedd5;
}

.site-footer div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-footer span {
    color: rgba(255, 237, 213, 0.76);
    font-size: 0.92rem;
}

.site-footer nav {
    display: flex;
    gap: 18px;
    font-weight: 750;
}

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

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

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

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

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

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

    .hero-carousel {
        min-height: 74vh;
    }

    .hero-content {
        margin-bottom: 86px;
    }

    .hero-control {
        top: auto;
        bottom: 26px;
        transform: none;
        width: 42px;
        height: 42px;
    }

    .hero-prev {
        left: 18px;
    }

    .hero-next {
        right: 18px;
    }

    .quick-panel {
        grid-template-columns: 1fr;
    }

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

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

    .detail-cover {
        max-width: 320px;
        margin: 0 auto;
        width: 100%;
    }

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

    .rank-watch {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 620px) {
    .nav-shell {
        width: min(100% - 22px, 1280px);
        min-height: 64px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand-text strong {
        font-size: 1.05rem;
    }

    .mobile-category-list,
    .category-grid,
    .category-grid-large,
    .movie-grid,
    .movie-grid-dense {
        grid-template-columns: 1fr;
    }

    .hero-content {
        width: min(100% - 30px, 860px);
    }

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

    .primary-button,
    .secondary-button,
    .ghost-button {
        width: 100%;
    }

    .hero-search {
        flex-direction: column;
        border-radius: 18px;
    }

    .hero-search button {
        width: 100%;
    }

    .page-shell,
    .detail-page {
        width: min(100% - 22px, 1220px);
    }

    .page-hero,
    .detail-hero {
        border-radius: 24px;
    }

    .rank-item {
        grid-template-columns: 38px 72px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-number {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-footer nav {
        flex-wrap: wrap;
    }
}
