* {
    box-sizing: border-box;
}

:root {
    --bg: #fff8ed;
    --card: #ffffff;
    --ink: #2d2118;
    --muted: #7a6556;
    --line: #f1dcc4;
    --amber: #f59e0b;
    --orange: #ea580c;
    --deep: #1f1309;
    --shadow: 0 24px 60px rgba(116, 66, 18, 0.16);
    --soft-shadow: 0 16px 36px rgba(116, 66, 18, 0.12);
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 248, 237, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(245, 158, 11, 0.18);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 12px 28px rgba(234, 88, 12, 0.28);
}

.brand-text {
    font-size: 18px;
}

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

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #604535;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.search-strip input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid rgba(245, 158, 11, 0.26);
    border-radius: 999px;
    padding: 12px 16px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.78);
    outline: none;
    transition: 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-strip input:focus,
.search-page-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.header-search button,
.mobile-search button,
.search-strip button,
.search-page-form button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    cursor: pointer;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #fff0da;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--ink);
}

.mobile-panel {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
}

.mobile-panel.open {
    display: grid;
    gap: 10px;
}

.hero-carousel {
    position: relative;
    min-height: 700px;
    overflow: hidden;
    background: var(--deep);
}

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
}

.hero-bg::after,
.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.24), transparent 32%), linear-gradient(180deg, transparent 68%, #fff7ea 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 700px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 96px 24px 110px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 58px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff8e7;
    background: rgba(245, 158, 11, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.hero-copy h1 {
    max-width: 860px;
    margin: 22px 0 18px;
    font-size: clamp(36px, 7vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.07em;
}

.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(26px, 4vw, 46px);
    color: #ffe1a6;
}

.hero-copy p {
    max-width: 760px;
    margin: 0 0 24px;
    color: #fff1d6;
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #8a4a05;
    background: #fff0d1;
    font-size: 12px;
    font-weight: 800;
}

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

.primary-btn,
.secondary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 34px rgba(234, 88, 12, 0.32);
}

.secondary-btn {
    color: #7a3d02;
    background: #ffffff;
}

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

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

.hero-poster,
.detail-poster {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 38px 90px rgba(0, 0, 0, 0.38);
    background: linear-gradient(135deg, #ffe6b0, #f97316);
}

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

.hero-poster span,
.detail-poster span,
.play-hover {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.88);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

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

.hero-dots button {
    width: 42px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

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

.search-strip,
.section-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px;
}

.search-strip {
    margin-top: -58px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
    gap: 30px;
    align-items: center;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.search-strip h2,
.section-title h2,
.page-hero h1,
.content-card h2,
.side-card h2 {
    margin: 0;
    letter-spacing: -0.04em;
}

.search-strip p,
.page-hero p {
    color: var(--muted);
    line-height: 1.8;
}

.search-strip form,
.search-page-form {
    display: flex;
    gap: 10px;
}

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

.section-title span {
    display: block;
    color: var(--orange);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
}

.section-title h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-title a {
    color: var(--orange);
    font-weight: 900;
}

.section-title.slim {
    align-items: center;
}

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

.category-tile,
.category-overview-card {
    min-height: 160px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #fff2d8);
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(245, 158, 11, 0.16);
    transition: 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover,
.mini-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-tile span,
.category-overview-card strong {
    display: block;
    margin-bottom: 10px;
    color: #7c3900;
    font-size: 20px;
    font-weight: 900;
}

.category-tile p,
.category-overview-card span {
    display: block;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 26px;
    background: var(--card);
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(245, 158, 11, 0.12);
    transition: 0.22s ease;
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #ffe9bd, #fb923c);
}

.poster img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.play-hover {
    opacity: 0;
    transition: 0.2s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
}

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

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: #9a6a39;
    font-size: 12px;
    font-weight: 800;
}

.movie-card h2 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.35;
}

.movie-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 74px;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
}

.movie-card.compact p {
    -webkit-line-clamp: 2;
    min-height: 52px;
}

.split-layout,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
}

.rank-panel,
.side-card,
.content-card {
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(245, 158, 11, 0.12);
}

.rank-panel,
.side-card {
    padding: 24px;
    position: sticky;
    top: 92px;
}

.mini-list,
.side-list {
    display: grid;
    gap: 12px;
}

.mini-card {
    display: grid;
    grid-template-columns: auto 64px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    background: #fff8ed;
    transition: 0.2s ease;
}

.mini-card img {
    width: 64px;
    height: 82px;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, #ffe9bd, #fb923c);
}

.mini-card strong,
.mini-card em {
    display: block;
}

.mini-card strong {
    line-height: 1.35;
}

.mini-card em {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    line-height: 1.5;
}

.mini-rank {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #ffffff;
    background: var(--orange);
    font-size: 12px;
    font-weight: 900;
}

.page-hero {
    position: relative;
    max-width: 1280px;
    margin: 28px auto 0;
    padding: 70px 24px;
    border-radius: 34px;
    overflow: hidden;
    background: linear-gradient(135deg, #fff3dd, #ffffff);
}

.small-hero {
    min-height: 300px;
    display: grid;
    align-content: center;
}

.amber-hero,
.rank-hero,
.search-hero {
    color: #ffffff;
    background: radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.28), transparent 34%), linear-gradient(135deg, #7c2d12, #f59e0b 52%, #ea580c);
}

.amber-hero p,
.rank-hero p,
.search-hero p {
    color: #fff7e8;
}

.page-hero h1 {
    margin-top: 16px;
    font-size: clamp(34px, 5vw, 58px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    color: #ffe4b4;
    font-weight: 800;
}

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

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.detail-hero {
    position: relative;
    min-height: 580px;
    overflow: hidden;
    background: var(--deep);
}

.detail-inner {
    position: relative;
    z-index: 3;
    max-width: 1280px;
    min-height: 580px;
    margin: 0 auto;
    padding: 70px 24px;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
    color: #ffffff;
}

.detail-copy h1 {
    margin: 16px 0;
    font-size: clamp(34px, 6vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.detail-copy p {
    max-width: 760px;
    color: #fff1d6;
    font-size: 18px;
    line-height: 1.85;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #110b06;
    box-shadow: var(--shadow);
}

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

.player-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.56));
    cursor: pointer;
}

.player-start span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.32);
    font-size: 30px;
}

.player-start strong {
    font-size: 20px;
}

.player-shell.is-playing .player-start {
    display: none;
}

.content-card {
    margin-top: 24px;
    padding: 28px;
}

.content-card p {
    color: var(--muted);
    line-height: 1.9;
    font-size: 17px;
}

.info-table dl {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
}

.info-table div {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.info-table dt {
    color: #9a6a39;
    font-weight: 900;
}

.info-table dd {
    margin: 0;
    color: var(--ink);
}

.detail-side {
    display: grid;
    gap: 22px;
}

.search-page-form {
    max-width: 760px;
    margin-top: 26px;
}

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

.site-footer {
    margin-top: 40px;
    color: #ffe8bf;
    background: linear-gradient(135deg, #2d1609, #7c2d12);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
    gap: 36px;
}

.footer-brand p {
    max-width: 520px;
    line-height: 1.8;
}

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

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

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 24px;
    text-align: center;
    color: #ffdca8;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 40px;
    text-align: center;
    border-radius: 24px;
    background: #ffffff;
    color: var(--muted);
    box-shadow: var(--soft-shadow);
}

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

    .hero-content,
    .detail-inner,
    .split-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-poster {
        max-width: 320px;
    }

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

    .rank-panel,
    .side-card {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .header-inner {
        padding: 12px 16px;
    }

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

    .hero-carousel,
    .hero-content {
        min-height: 640px;
    }

    .hero-content {
        padding: 72px 16px 96px;
        gap: 30px;
    }

    .hero-copy p,
    .detail-copy p {
        font-size: 16px;
    }

    .search-strip {
        grid-template-columns: 1fr;
        margin: -42px 16px 0;
        padding: 28px 18px;
    }

    .search-strip,
    .section-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .movie-grid,
    .rank-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .filter-bar,
    .search-filters,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-inner {
        padding: 46px 16px;
    }

    .page-hero {
        margin: 16px;
        padding: 46px 18px;
    }
}

@media (max-width: 560px) {
    .brand-text {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

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

    .hero-actions,
    .detail-actions,
    .search-strip form,
    .search-page-form {
        flex-direction: column;
    }

    .hero-poster,
    .detail-poster {
        max-width: 240px;
    }

    .info-table div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
