:root {
    --bg: #fff8ed;
    --text: #1d1a16;
    --muted: #73675b;
    --line: rgba(120, 84, 35, 0.18);
    --brand: #ea580c;
    --brand-dark: #9a3412;
    --gold: #f59e0b;
    --cream: #fff7ed;
    --card: #ffffff;
    --shadow: 0 22px 55px rgba(120, 53, 15, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, #fff1d6 0, transparent 36rem), var(--bg);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, #d97706, #f97316 48%, #eab308);
    box-shadow: 0 12px 30px rgba(154, 52, 18, 0.25);
}

.nav-wrap {
    max-width: 1240px;
    height: 72px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
}

.brand-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    font-size: 24px;
}

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

.brand-text strong {
    font-size: 22px;
    letter-spacing: 0.03em;
}

.brand-text em {
    font-size: 12px;
    color: #ffedd5;
    font-style: normal;
    margin-top: 4px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff7ed;
    font-weight: 700;
    transition: 0.22s ease;
}

.nav-link {
    min-width: 86px;
    height: 42px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    background: #ffffff;
    color: #c2410c;
    box-shadow: 0 12px 28px rgba(124, 45, 18, 0.2);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 22px;
}

.mobile-nav {
    display: none;
    padding: 8px 20px 18px;
}

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

.mobile-link {
    min-height: 42px;
}

.hero-section {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #241107;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
    align-items: center;
    gap: 48px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 70px 24px 92px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-backdrop {
    position: fixed;
    inset: 0;
    z-index: -2;
    opacity: 0.35;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(18px) saturate(1.12);
    transform: scale(1.08);
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(36, 17, 7, 0.95), rgba(124, 45, 18, 0.73) 48%, rgba(245, 158, 11, 0.24));
    z-index: 0;
}

.hero-content,
.hero-poster,
.hero-dots {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffedd5;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.eyebrow.dark {
    background: #ffedd5;
    color: #c2410c;
}

.hero-content h1 {
    margin: 18px 0 18px;
    color: #ffffff;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 720px;
    margin: 0;
    color: #ffedd5;
    font-size: 18px;
    line-height: 1.9;
}

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 11px;
    background: rgba(255, 237, 213, 0.16);
    color: #ffedd5;
    font-size: 12px;
    font-weight: 700;
}

.tag-row span {
    background: #fff1d6;
    color: #9a3412;
}

.hero-actions,
.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #c2410c;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(255, 255, 255, 0.2);
}

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

.primary-btn.small {
    min-height: 40px;
    padding: 0 18px;
    color: #ffffff;
    background: linear-gradient(90deg, #ea580c, #eab308);
}

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.ghost-btn.light {
    color: #9a3412;
    background: #ffffff;
}

.ghost-btn.block {
    width: 100%;
    color: #ffffff;
    background: linear-gradient(90deg, #ea580c, #eab308);
}

.hero-poster {
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 34px 75px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    height: min(520px, 66vh);
    object-fit: cover;
}

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

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

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

.section-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 70px 24px;
}

.quick-search {
    padding-top: 44px;
    padding-bottom: 32px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
    align-items: center;
    gap: 30px;
    padding: 32px;
    border-radius: 30px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-head h2,
.page-hero h1,
.detail-copy h1,
.detail-article h2 {
    margin: 10px 0 0;
    letter-spacing: -0.03em;
}

.search-panel h2,
.section-head h2 {
    font-size: clamp(28px, 3vw, 42px);
}

.search-panel p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.search-form,
.filter-bar {
    display: flex;
    gap: 12px;
}

.search-form input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 18px;
    background: #fffaf0;
    color: var(--text);
    outline: none;
}

.search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.search-form button {
    min-width: 112px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #ea580c, #eab308);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

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

.section-head.compact {
    align-items: center;
}

.text-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    color: #c2410c;
    background: #ffedd5;
    font-weight: 800;
    transition: 0.2s ease;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(120, 53, 15, 0.12);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 52px rgba(120, 53, 15, 0.2);
}

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

.poster-link img,
.compact-card img,
.ranking-poster img,
.detail-poster img,
.category-card img,
.category-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-link img,
.compact-card img,
.ranking-poster img {
    transition: transform 0.35s ease;
}

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

.poster-link b {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(194, 65, 12, 0.92);
    font-size: 13px;
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #1f160d;
    font-size: 17px;
    font-weight: 900;
}

.card-body p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 48px;
    margin: 8px 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
}

.card-meta span,
.detail-meta span {
    border-radius: 999px;
    padding: 5px 9px;
    background: #fff7ed;
}

.card-body .tag-row {
    margin-top: 12px;
}

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

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

.category-card,
.category-overview-card {
    border-radius: 26px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(120, 53, 15, 0.12);
}

.category-card {
    position: relative;
    min-height: 210px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #ffffff;
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(36, 17, 7, 0.88), rgba(36, 17, 7, 0.12));
    z-index: 1;
}

.category-card img {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
}

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

.category-card p {
    margin: 8px 0 0;
    color: #ffedd5;
    font-size: 13px;
    line-height: 1.7;
}

.rank-panel {
    position: sticky;
    top: 96px;
    border-radius: 30px;
    padding: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 38px 56px minmax(0, 1fr);
    grid-template-areas: "num img title" "num img genre";
    align-items: center;
    gap: 4px 12px;
    border-radius: 18px;
    padding: 8px;
    background: #fff8ed;
    transition: 0.2s ease;
}

.rank-row:hover {
    background: #ffedd5;
    transform: translateX(4px);
}

.rank-row b {
    grid-area: num;
    color: #c2410c;
    font-size: 20px;
}

.rank-row img {
    grid-area: img;
    width: 56px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-row span {
    grid-area: title;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
}

.rank-row em {
    grid-area: genre;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 92px 24px;
    text-align: center;
    color: #ffffff;
    background: radial-gradient(circle at top, rgba(255, 237, 213, 0.24), transparent 30rem), linear-gradient(135deg, #7c2d12, #f97316 55%, #eab308);
}

.page-hero h1 {
    font-size: clamp(38px, 5vw, 64px);
}

.page-hero p {
    max-width: 780px;
    margin: 18px auto 0;
    color: #ffedd5;
    font-size: 18px;
    line-height: 1.9;
}

.category-overview-grid {
    display: grid;
    gap: 24px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    padding: 20px;
    align-items: center;
}

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

.category-preview img {
    border-radius: 16px;
}

.category-overview-card h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

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

.filter-bar {
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(120, 53, 15, 0.1);
}

.filter-bar select {
    max-width: 180px;
}

.filter-bar.advanced select {
    max-width: 220px;
}

.ranking-list-page {
    display: grid;
    gap: 18px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 72px 132px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    border-radius: 28px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(120, 53, 15, 0.11);
}

.rank-number {
    color: #c2410c;
    font-size: 34px;
    font-weight: 950;
    text-align: center;
}

.ranking-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 20px;
}

.ranking-info h2 {
    margin: 0;
    font-size: 24px;
}

.ranking-info p {
    margin: 10px 0 14px;
    color: var(--muted);
    line-height: 1.8;
}

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

.breadcrumb {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px 24px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #8a5a2b;
    font-size: 14px;
}

.breadcrumb a {
    color: #c2410c;
    font-weight: 800;
}

.movie-detail-hero {
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 24px 70px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    gap: 32px;
    align-items: center;
}

.player-card {
    border-radius: 32px;
    padding: 12px;
    background: linear-gradient(135deg, #431407, #ea580c, #facc15);
    box-shadow: var(--shadow);
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #160b05;
    aspect-ratio: 16 / 9;
}

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

.player-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(22, 11, 5, 0.62), rgba(22, 11, 5, 0.18));
}

.player-play span {
    width: 90px;
    height: 90px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #c2410c;
    background: #ffffff;
    font-size: 40px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.player-play.is-hidden {
    display: none;
}

.detail-copy {
    border-radius: 32px;
    padding: 32px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    font-size: clamp(34px, 4vw, 54px);
}

.detail-copy .lead {
    margin: 16px 0 20px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.9;
}

.detail-tags {
    margin: 18px 0 24px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    padding-top: 0;
}

.detail-poster {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 16px;
}

.detail-poster img {
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-article {
    border-radius: 32px;
    padding: 32px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.detail-article h2 {
    font-size: 30px;
}

.detail-article h2 + p {
    margin-top: 14px;
}

.detail-article p {
    color: #4b3a2c;
    font-size: 17px;
    line-height: 2.05;
}

.compact-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas: "img title" "img meta";
    align-items: center;
    gap: 4px 12px;
    border-radius: 18px;
    padding: 10px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(120, 53, 15, 0.1);
}

.compact-card img {
    grid-area: img;
    width: 72px;
    height: 92px;
    border-radius: 14px;
}

.compact-card span {
    grid-area: title;
    font-weight: 900;
}

.compact-card em {
    grid-area: meta;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.site-footer {
    margin-top: 42px;
    color: #ffedd5;
    background: linear-gradient(135deg, #431407, #7c2d12);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    gap: 16px;
}

.footer-brand {
    color: #ffffff;
    font-size: 26px;
    font-weight: 950;
}

.footer-inner p {
    max-width: 680px;
    margin: 0;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-links a {
    color: #ffffff;
    font-weight: 800;
}

.copyright {
    color: #fed7aa;
    font-size: 13px;
}

.movie-card.is-hidden,
.ranking-card.is-hidden {
    display: none;
}

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

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

    .rank-panel,
    .detail-poster {
        position: static;
    }
}

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

    .menu-button {
        display: grid;
        place-items: center;
    }

    .hero-section {
        min-height: 760px;
    }

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

    .hero-poster {
        max-width: 360px;
        margin: 0 auto;
        transform: none;
    }

    .search-panel,
    .category-overview-card,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .filter-bar,
    .search-form {
        flex-direction: column;
    }

    .filter-bar select {
        max-width: none;
    }

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

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

    .ranking-card {
        grid-template-columns: 54px 92px minmax(0, 1fr);
        gap: 14px;
    }
}

@media (max-width: 560px) {
    .nav-wrap {
        height: 64px;
        padding: 0 16px;
    }

    .brand-icon {
        width: 40px;
        height: 40px;
    }

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

    .brand-text em {
        display: none;
    }

    .section-wrap {
        padding: 48px 16px;
    }

    .page-hero {
        padding: 70px 18px;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .hero-content p,
    .page-hero p {
        font-size: 15px;
    }

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

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

    .card-body {
        padding: 13px;
    }

    .card-title {
        font-size: 15px;
    }

    .card-body p {
        font-size: 13px;
    }

    .movie-detail-hero {
        padding: 24px 16px 48px;
    }

    .detail-copy,
    .detail-article {
        padding: 22px;
        border-radius: 24px;
    }

    .player-play span {
        width: 72px;
        height: 72px;
        font-size: 32px;
    }

    .ranking-card {
        grid-template-columns: 44px 78px minmax(0, 1fr);
        padding: 12px;
    }

    .rank-number {
        font-size: 24px;
    }
}
