:root {
    --site-bg: #fffaf0;
    --paper: rgba(255, 255, 255, 0.92);
    --paper-strong: #ffffff;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: rgba(251, 191, 36, 0.28);
    --amber: #d97706;
    --rose: #e11d48;
    --gold: #f59e0b;
    --shadow: 0 20px 50px rgba(120, 53, 15, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.22), transparent 34rem),
        radial-gradient(circle at top right, rgba(244, 63, 94, 0.16), transparent 32rem),
        linear-gradient(180deg, #fff7ed 0%, #fffaf0 34%, #ffffff 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(244, 63, 94, 0.22));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 241, 242, 0.96), rgba(255, 251, 235, 0.96));
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(146, 64, 14, 0.08);
}

.header-inner,
.section-inner,
.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #fb7185, #fbbf24);
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

.brand-text {
    font-size: 22px;
    background: linear-gradient(90deg, #d97706, #e11d48, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-size: 15px;
}

.nav-link {
    padding: 24px 0 22px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 9px 12px;
    color: #92400e;
    background: #fffbeb;
}

.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-carousel {
    position: relative;
    min-height: 640px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, rgba(30, 18, 8, 0.88), rgba(30, 18, 8, 0.52), rgba(30, 18, 8, 0.16)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    transition: opacity 700ms ease;
}

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

.hero-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 92px 0 78px;
    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 14px;
    color: #92400e;
    background: rgba(255, 251, 235, 0.9);
    font-size: 13px;
    font-weight: 800;
}

.hero h1 {
    max-width: 760px;
    margin: 22px 0 18px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.055em;
}

.hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.85;
}

.hero-meta,
.movie-meta,
.card-meta,
.detail-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta {
    margin: 20px 0 30px;
}

.meta-pill,
.tag-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(251, 191, 36, 0.38);
    border-radius: 999px;
    padding: 7px 11px;
    color: #78350f;
    background: rgba(255, 251, 235, 0.9);
    font-size: 13px;
    font-weight: 700;
}

.hero .meta-pill {
    color: #fff7ed;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 18px;
    min-height: 44px;
    font-weight: 800;
    box-shadow: 0 14px 32px rgba(217, 119, 6, 0.22);
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #d97706, #e11d48);
}

.btn-light {
    color: #92400e;
    background: rgba(255, 251, 235, 0.94);
}

.btn-ghost {
    color: #92400e;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.66);
    background: rgba(255, 255, 255, 0.34);
}

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

.search-panel {
    margin-top: -38px;
    position: relative;
    z-index: 8;
}

.search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.search-box input,
.search-box select {
    width: 100%;
    border: 1px solid rgba(251, 191, 36, 0.32);
    border-radius: 16px;
    padding: 13px 16px;
    color: var(--ink);
    background: #fffaf0;
    outline: none;
}

.main-section {
    padding: 76px 0;
}

.main-section.compact {
    padding: 48px 0;
}

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

.section-title {
    margin: 12px 0 8px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-desc {
    max-width: 760px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
}

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

.movie-card,
.category-card,
.rank-card,
.related-card {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--paper);
    box-shadow: 0 16px 38px rgba(146, 64, 14, 0.08);
    transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover,
.related-card:hover {
    transform: translateY(-6px);
    border-color: rgba(217, 119, 6, 0.42);
    box-shadow: 0 24px 60px rgba(146, 64, 14, 0.16);
}

.card-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.card-cover img,
.related-cover img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 620ms ease;
}

.movie-card:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.card-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    background: linear-gradient(135deg, #d97706, #e11d48);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

.card-title {
    min-height: 56px;
    margin: 8px 0;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 850;
}

.card-title.single-line {
    min-height: auto;
}

.card-desc {
    min-height: 50px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
}

.card-meta {
    margin-top: 12px;
    color: #92400e;
    font-size: 13px;
    font-weight: 700;
}

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

.category-card {
    position: relative;
    min-height: 190px;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(255, 241, 242, 0.92)),
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.36), transparent 14rem);
}

.category-card h2,
.category-card h3 {
    margin: 12px 0 10px;
    font-size: 24px;
    font-weight: 900;
}

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

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

.rank-card {
    display: grid;
    grid-template-columns: 74px 150px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #d97706, #fb7185);
    font-weight: 900;
}

.rank-thumb {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 16 / 9;
}

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

.rank-title {
    font-size: 18px;
    font-weight: 850;
}

.rank-desc {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.65;
}

.page-hero {
    padding: 70px 0 44px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(120, 53, 15, 0.9), rgba(136, 19, 55, 0.86)),
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.42), transparent 24rem);
}

.page-hero h1 {
    margin: 12px 0 14px;
    max-width: 900px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.85;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 12px;
    margin-bottom: 26px;
}

.filter-bar input,
.filter-bar select {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 13px 16px;
    background: #ffffff;
    outline: none;
}

.detail-hero {
    padding: 44px 0 54px;
    background:
        linear-gradient(135deg, rgba(45, 23, 9, 0.9), rgba(136, 19, 55, 0.84)),
        var(--detail-image);
    background-size: cover;
    background-position: center;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    gap: 28px;
    align-items: start;
}

.detail-title {
    margin: 14px 0 14px;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-lead {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.8;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 26px;
    aspect-ratio: 3 / 4;
    box-shadow: 0 24px 68px rgba(0, 0, 0, 0.28);
}

.player-section {
    padding: 48px 0 0;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #111827;
    box-shadow: 0 24px 68px rgba(17, 24, 39, 0.28);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #111827;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.64), rgba(127, 29, 29, 0.32));
}

.player-frame.is-playing .play-cover {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: linear-gradient(135deg, #d97706, #e11d48);
    box-shadow: 0 22px 48px rgba(225, 29, 72, 0.38);
    font-size: 30px;
    transform: translateZ(0);
}

.content-panel {
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 24px;
    background: var(--paper-strong);
    box-shadow: 0 16px 42px rgba(146, 64, 14, 0.08);
}

.content-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 900;
}

.content-panel p {
    margin: 0 0 18px;
    color: #374151;
    line-height: 1.95;
}

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

.related-cover {
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.related-card h3 {
    padding: 14px 14px 4px;
    font-size: 16px;
    font-weight: 850;
}

.related-card p {
    padding: 0 14px 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.empty-state {
    display: none;
    border: 1px dashed rgba(217, 119, 6, 0.36);
    border-radius: 20px;
    padding: 28px;
    color: #92400e;
    background: rgba(255, 251, 235, 0.8);
    text-align: center;
}

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

.site-footer {
    margin-top: 72px;
    color: #fff7ed;
    background: linear-gradient(135deg, #78350f, #881337, #92400e);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 26px;
    padding: 42px 0;
}

.footer-title {
    margin-bottom: 12px;
    color: #fde68a;
    font-size: 18px;
    font-weight: 900;
}

.footer-inner p,
.footer-inner a {
    color: rgba(255, 247, 237, 0.82);
    line-height: 1.8;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding: 18px 0 24px;
    color: rgba(255, 247, 237, 0.72);
    text-align: center;
}

@media (max-width: 1024px) {
    .movie-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

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

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

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border: 1px solid var(--line);
        border-radius: 18px;
        padding: 10px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-link {
        padding: 12px;
        border-radius: 12px;
    }

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

    .hero-carousel {
        min-height: 590px;
    }

    .hero-content {
        padding: 70px 0 86px;
    }

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

    .section-head {
        display: block;
    }

    .section-actions {
        margin-top: 18px;
    }

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

    .rank-card {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .rank-thumb,
    .rank-card .btn {
        display: none;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}
