:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-900: #78350f;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: rgba(180, 83, 9, 0.18);
    --surface: rgba(255, 255, 255, 0.76);
    --shadow: 0 18px 50px rgba(120, 53, 15, 0.16);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

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:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.20), transparent 32rem),
        linear-gradient(180deg, #fffbeb 0%, #fff7ed 42%, #ffffff 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 251, 235, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 205px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 900;
    font-size: 22px;
    background: linear-gradient(135deg, #f59e0b, #facc15);
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.35);
}

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

.brand-text strong {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, #b45309, #ca8a04);
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text small {
    margin-top: 4px;
    color: var(--amber-700);
    font-size: 12px;
}

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

.nav-link,
.mobile-link {
    color: var(--amber-900);
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--amber-600);
    background: rgba(245, 158, 11, 0.12);
}

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

.nav-search input,
.mobile-search input,
.big-search input,
.filter-bar input,
.filter-bar select {
    border: 2px solid rgba(245, 158, 11, 0.30);
    border-radius: 999px;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--ink);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
    background: #ffffff;
}

.nav-search button,
.mobile-search button,
.big-search button,
.primary-btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(90deg, #f59e0b, #eab308);
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(245, 158, 11, 0.36);
}

.menu-toggle {
    display: none;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: var(--amber-900);
    background: rgba(245, 158, 11, 0.12);
    cursor: pointer;
    font-size: 24px;
}

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

.mobile-panel[hidden] {
    display: none;
}

.mobile-link {
    display: block;
    margin: 4px 0;
}

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: #171717;
}

.hero-track {
    position: relative;
    min-height: 650px;
}

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

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

.hero-slide img {
    width: 100%;
    height: 650px;
    object-fit: cover;
    background: linear-gradient(135deg, #451a03, #f59e0b);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.44) 48%, rgba(0, 0, 0, 0.10) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, transparent 42%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 22px));
    bottom: 140px;
    width: min(720px, calc(100% - 48px));
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.eyebrow.dark {
    color: var(--amber-700);
    background: rgba(245, 158, 11, 0.12);
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 12px;
    max-width: 900px;
    font-size: clamp(36px, 7vw, 72px);
    line-height: 1.04;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-content h2 + p,
.hero-content h1 + h2 + p {
    margin-top: 8px;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.72;
}

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

.hero-meta {
    margin-bottom: 24px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 13px;
    font-weight: 800;
}

.hero-meta span {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.40);
    border-radius: 999px;
    padding: 12px 18px;
    color: #ffffff;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.ghost-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.20);
}

.hero-dots {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 22px));
    bottom: 88px;
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-thumbs {
    position: absolute;
    right: max(24px, calc((100vw - 1280px) / 2 + 22px));
    bottom: 80px;
    display: grid;
    grid-template-columns: repeat(5, minmax(90px, 120px));
    gap: 12px;
}

.hero-thumb {
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border 0.2s ease;
}

.hero-thumb:hover,
.hero-thumb.is-active {
    transform: translateY(-4px);
    border-color: #f59e0b;
}

.hero-thumb img {
    width: 100%;
    height: 76px;
    object-fit: cover;
    background: linear-gradient(135deg, #451a03, #f59e0b);
}

.hero-thumb span {
    display: block;
    padding: 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-shell,
.page-main,
.detail-main {
    width: min(1280px, calc(100% - 44px));
    margin: 0 auto;
}

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

.quick-search-section {
    padding-top: 34px;
}

.search-banner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: center;
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-banner h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.content-panel h2 {
    margin: 0;
    color: #111827;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.search-banner h2 {
    font-size: clamp(28px, 3vw, 44px);
}

.search-banner p,
.page-hero p,
.lead-text,
.content-panel p,
.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.big-search input {
    width: 100%;
    min-height: 56px;
}

.big-search button {
    min-width: 122px;
    min-height: 56px;
}

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

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

.section-head.compact h2 {
    font-size: clamp(22px, 2vw, 30px);
}

.text-link {
    color: var(--amber-700);
    font-weight: 900;
}

.text-link:hover {
    color: var(--amber-500);
}

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

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 12rem),
        rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 30px rgba(120, 53, 15, 0.10);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.category-tile span {
    display: inline-flex;
    margin-bottom: 16px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--amber-700);
    font-size: 13px;
    font-weight: 900;
    background: rgba(245, 158, 11, 0.14);
}

.category-tile strong {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-size: 20px;
    line-height: 1.32;
}

.category-tile small {
    color: var(--muted);
    line-height: 1.6;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 34px rgba(120, 53, 15, 0.10);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(245, 158, 11, 0.40);
    box-shadow: var(--shadow);
}

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

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

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

.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

.score-badge {
    right: 10px;
    top: 10px;
    min-width: 46px;
    padding: 6px 9px;
    background: linear-gradient(90deg, #f59e0b, #eab308);
}

.rank-badge {
    left: 10px;
    top: 10px;
    width: 34px;
    height: 34px;
    background: rgba(17, 24, 39, 0.76);
}

.card-body {
    padding: 15px;
}

.card-meta {
    margin-bottom: 10px;
}

.card-meta span,
.detail-meta span {
    color: var(--amber-800, #92400e);
    background: rgba(245, 158, 11, 0.13);
}

.movie-card h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 17px;
    font-weight: 950;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--amber-600);
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--amber-700);
    font-size: 12px;
    font-weight: 800;
    background: rgba(245, 158, 11, 0.12);
}

.compact-card {
    display: grid;
    grid-template-columns: 118px 1fr;
}

.compact-card .poster-link {
    aspect-ratio: auto;
    min-height: 176px;
}

.compact-card p {
    min-height: 0;
}

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

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.80);
    box-shadow: var(--shadow);
}

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

.ranking-list .movie-card {
    grid-template-columns: 92px 1fr;
    border-radius: 18px;
}

.ranking-list .poster-link {
    min-height: 132px;
}

.ranking-list .card-body {
    padding: 12px;
}

.ranking-list .movie-card p,
.ranking-list .tag-row {
    display: none;
}

.page-main {
    padding: 34px 0 40px;
}

.page-hero {
    min-height: 310px;
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 42px;
    border-radius: 32px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(252, 211, 77, 0.32), transparent 20rem),
        linear-gradient(135deg, #78350f, #92400e 48%, #f59e0b);
    box-shadow: var(--shadow);
}

.page-hero.small-hero,
.page-hero.search-hero,
.page-hero.ranking-hero,
.page-hero.category-hero {
    min-height: 260px;
}

.page-hero h1 {
    max-width: 900px;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.category-block {
    width: min(1280px, calc(100% - 44px));
    margin: 0 auto;
    padding: 36px 0;
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 24px rgba(120, 53, 15, 0.08);
}

.filter-bar input {
    flex: 1;
}

.filter-bar select {
    min-width: 150px;
}

.detail-main {
    padding: 28px 0 40px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--amber-800, #92400e);
    font-weight: 800;
}

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

.player-section {
    margin-bottom: 28px;
}

.player-stage {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: #111827;
    box-shadow: 0 26px 70px rgba(17, 24, 39, 0.32);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.15));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 36px;
    background: linear-gradient(90deg, #f59e0b, #eab308);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.36);
    transform: translateX(2px);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin-bottom: 28px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.80);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg, #451a03, #f59e0b);
    box-shadow: 0 20px 44px rgba(120, 53, 15, 0.20);
}

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

.detail-info h1 {
    margin-bottom: 16px;
    font-size: clamp(32px, 5vw, 56px);
}

.lead-text {
    margin: 0 0 18px;
    font-size: 19px;
}

.detail-meta {
    margin-bottom: 18px;
}

.detail-tags span {
    font-size: 13px;
}

.content-panel {
    margin-bottom: 34px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.80);
    box-shadow: var(--shadow);
}

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

.content-panel p + h2 {
    margin-top: 28px;
}

.content-panel p {
    margin: 0;
    font-size: 17px;
}

.related-section {
    width: 100%;
}

.site-footer {
    margin-top: 40px;
    color: #fffbeb;
    background: linear-gradient(180deg, #78350f, #451a03);
}

.footer-grid {
    width: min(1280px, calc(100% - 44px));
    margin: 0 auto;
    padding: 46px 0 30px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: #fde68a;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.site-footer a {
    color: #ffedd5;
}

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

.footer-bottom {
    width: min(1280px, calc(100% - 44px));
    margin: 0 auto;
    padding: 18px 0 26px;
    border-top: 1px solid rgba(253, 230, 138, 0.18);
    color: #fed7aa;
    font-size: 14px;
}

[data-card].is-hidden {
    display: none;
}

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

    .hero-thumbs {
        display: none;
    }

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

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

    .ranking-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .hero,
    .hero-track,
    .hero-slide img {
        min-height: 580px;
        height: 580px;
    }

    .hero-content {
        bottom: 110px;
    }

    .search-banner,
    .detail-layout,
    .footer-grid,
    .category-grid.wide {
        grid-template-columns: 1fr;
    }

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

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

    .movie-grid.two-col {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 560px) {
    .nav-shell,
    .mobile-panel {
        padding-left: 14px;
        padding-right: 14px;
    }

    .brand {
        min-width: 0;
    }

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

    .brand-text small {
        display: none;
    }

    .section-shell,
    .page-main,
    .detail-main,
    .category-block {
        width: min(100% - 28px, 1280px);
    }

    .hero,
    .hero-track,
    .hero-slide img {
        min-height: 540px;
        height: 540px;
    }

    .hero-content {
        left: 18px;
        bottom: 84px;
        width: calc(100% - 36px);
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 36px;
    }

    .hero-dots {
        left: 18px;
        bottom: 48px;
    }

    .search-banner,
    .page-hero,
    .detail-layout,
    .content-panel {
        padding: 22px;
        border-radius: 24px;
    }

    .big-search {
        flex-direction: column;
        align-items: stretch;
    }

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

    .compact-card,
    .ranking-list .movie-card {
        grid-template-columns: 110px 1fr;
    }

    .compact-card .poster-link,
    .ranking-list .poster-link {
        min-height: 164px;
    }

    .play-overlay span {
        width: 78px;
        height: 78px;
        font-size: 30px;
    }
}
