:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --text: #2a1707;
    --muted: #7c5d3b;
    --line: rgba(146, 64, 14, 0.16);
    --card: rgba(255, 255, 255, 0.82);
    --card-strong: rgba(255, 255, 255, 0.94);
    --primary: #d97706;
    --primary-dark: #92400e;
    --accent: #f97316;
    --shadow: 0 22px 60px rgba(146, 64, 14, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(251, 191, 36, 0.22), transparent 34rem),
        radial-gradient(circle at 90% 10%, rgba(249, 115, 22, 0.18), transparent 36rem),
        linear-gradient(180deg, #fff7ed 0%, #fffbeb 42%, #fff7ed 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 {
    font: inherit;
}

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

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

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--primary-dark);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 12px 28px rgba(234, 88, 12, 0.25);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-links a {
    padding: 10px 12px;
    color: #5f3c16;
    border-radius: 999px;
    font-size: 15px;
    transition: 0.2s ease;
}

.nav-links a:hover {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 310px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
}

.nav-search input {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.nav-search button,
.button,
.hero-button,
.play-toggle,
.search-submit {
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 14px 28px rgba(234, 88, 12, 0.22);
    cursor: pointer;
    transition: 0.2s ease;
}

.nav-search button {
    padding: 9px 15px;
    white-space: nowrap;
}

.button,
.hero-button,
.search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    font-weight: 800;
}

.button:hover,
.hero-button:hover,
.play-toggle:hover,
.search-submit:hover,
.nav-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(234, 88, 12, 0.28);
}

.button.secondary,
.hero-button.secondary {
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    box-shadow: none;
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: var(--primary-dark);
}

.main {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0 68px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    border: 1px solid rgba(255, 255, 255, 0.54);
    border-radius: 36px;
    background:
        linear-gradient(135deg, rgba(69, 26, 3, 0.92), rgba(146, 64, 14, 0.72)),
        radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.56), transparent 30rem);
    box-shadow: var(--shadow);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.hero::before {
    width: 420px;
    height: 420px;
    left: -140px;
    bottom: -160px;
    background: rgba(251, 191, 36, 0.24);
    filter: blur(10px);
}

.hero::after {
    width: 340px;
    height: 340px;
    right: -90px;
    top: -110px;
    background: rgba(249, 115, 22, 0.28);
    filter: blur(12px);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
    gap: 36px;
    align-items: center;
    padding: clamp(28px, 5vw, 70px);
    opacity: 0;
    transform: translateX(18px) scale(0.985);
    transition: opacity 0.55s ease, transform 0.55s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.hero-copy {
    position: relative;
    z-index: 2;
    color: #fffaf0;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    font-size: 13px;
    font-weight: 800;
}

.section-kicker,
.detail-kicker {
    color: var(--primary-dark);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.hero h1,
.hero h2 {
    margin: 18px 0 16px;
    max-width: 780px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.03;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 250, 240, 0.82);
    font-size: 18px;
}

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

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.meta-pill,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    padding: 7px 11px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: center;
}

.hero-poster a {
    display: block;
    position: relative;
    width: min(360px, 100%);
    aspect-ratio: 3 / 4.15;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.34);
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.hero-poster img,
.poster img,
.compact-card img,
.related-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-dots {
    position: absolute;
    left: clamp(28px, 5vw, 70px);
    bottom: 28px;
    z-index: 4;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.hero-dot.active {
    background: #fff;
}

.section {
    margin-top: 46px;
}

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

.section-title h2,
.page-title h1,
.detail-title h1 {
    margin: 10px 0 0;
    color: var(--text);
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-title p,
.page-title p,
.detail-title p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--muted);
}

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

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

.movie-card,
.category-card,
.rank-item,
.info-panel,
.search-box,
.related-card,
.compact-card {
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: 0 16px 42px rgba(146, 64, 14, 0.08);
    backdrop-filter: blur(16px);
}

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    transition: 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 50px rgba(146, 64, 14, 0.16);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #fffbeb, #fed7aa);
}

.play-chip,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 12px 28px rgba(234, 88, 12, 0.25);
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 38px;
    height: 38px;
    border-radius: 14px;
}

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

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

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

.movie-card h3 a:hover,
.rank-info a:hover,
.compact-card:hover strong,
.related-card:hover strong {
    color: var(--primary);
}

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

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span,
.detail-tags span,
.meta-pill {
    padding: 5px 9px;
    color: #9a3412;
    background: #ffedd5;
}

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

.category-card {
    min-height: 210px;
    padding: 22px;
    border-radius: 26px;
    transition: 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.15;
}

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

.category-sample {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 18px;
}

.category-sample span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: #ffedd5;
    font-size: 12px;
    font-weight: 800;
}

.page-title,
.detail-hero {
    padding: clamp(24px, 4vw, 44px);
    border: 1px solid var(--line);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 237, 213, 0.74));
    box-shadow: var(--shadow);
}

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

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

.rank-number {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    color: #fff;
    font-size: 22px;
    font-weight: 950;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.rank-poster {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 18px;
    background: #ffedd5;
}

.rank-info h2,
.rank-info h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

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

.rank-meta {
    display: flex;
    flex-direction: column;
    align-items: end;
    gap: 6px;
    color: var(--primary-dark);
    font-weight: 900;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
    gap: clamp(22px, 4vw, 44px);
    align-items: start;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    background: #ffedd5;
    box-shadow: 0 26px 64px rgba(146, 64, 14, 0.16);
}

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

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.player-shell {
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: #1c1208;
    box-shadow: 0 30px 80px rgba(69, 26, 3, 0.22);
}

.player-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    color: #fff7ed;
    background: linear-gradient(135deg, rgba(69, 26, 3, 0.96), rgba(146, 64, 14, 0.88));
}

.player-top strong {
    display: block;
    font-size: 18px;
}

.player-top span {
    color: rgba(255, 247, 237, 0.7);
    font-size: 13px;
}

.video-wrap {
    position: relative;
    background: #0f0803;
}

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

.play-toggle {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    font-weight: 900;
    transform: translate(-50%, -50%);
}

.play-toggle.hide {
    opacity: 0;
    pointer-events: none;
}

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

.info-panel {
    padding: clamp(20px, 3vw, 30px);
    border-radius: 28px;
}

.info-panel h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.info-panel p {
    margin: 0 0 16px;
    color: #5f3c16;
}

.compact-list {
    display: grid;
    gap: 10px;
}

.compact-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
}

.compact-card img {
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    background: #ffedd5;
}

.compact-card strong,
.related-card strong {
    display: block;
    line-height: 1.28;
}

.compact-card em,
.related-card em {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

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

.related-card {
    overflow: hidden;
    border-radius: 20px;
}

.related-card img {
    aspect-ratio: 3 / 4;
    background: #ffedd5;
}

.related-card span {
    display: block;
    padding: 12px;
}

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

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

.search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px;
    border-radius: 999px;
}

.search-box input {
    min-width: 0;
    padding: 14px 18px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.search-submit {
    padding-inline: 24px;
}

.empty-state {
    padding: 30px;
    border: 1px dashed var(--line);
    border-radius: 24px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 1120px) {
    .nav-wrap {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
    }

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

    .nav-links,
    .nav-search {
        display: none;
        width: 100%;
    }

    .nav-links.open,
    .nav-search.open {
        display: flex;
    }

    .nav-links.open {
        flex-wrap: wrap;
        order: 3;
    }

    .nav-search.open {
        order: 4;
    }

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

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

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

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

@media (max-width: 760px) {
    .main {
        width: min(100% - 22px, 1240px);
        padding-top: 24px;
    }

    .hero {
        min-height: 760px;
        border-radius: 28px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 24px;
    }

    .hero-poster {
        order: -1;
    }

    .hero-poster a {
        width: min(230px, 68vw);
    }

    .hero-dots {
        left: 24px;
        bottom: 20px;
    }

    .section-head {
        display: block;
    }

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

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

    .rank-number {
        width: 42px;
        height: 42px;
        border-radius: 15px;
        font-size: 16px;
    }

    .rank-meta {
        grid-column: 3;
        align-items: start;
    }

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

    .search-box {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }
}

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

    .nav-wrap {
        width: min(100% - 18px, 1240px);
    }

    .brand {
        font-size: 15px;
    }
}
