:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    --orange-500: #f97316;
    --text: #2f2415;
    --muted: #7c5f37;
    --line: rgba(180, 83, 9, 0.22);
    --card: rgba(255, 255, 255, 0.88);
    --shadow: 0 20px 60px rgba(146, 64, 14, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 30rem),
        linear-gradient(180deg, var(--amber-50), #ffffff 34rem);
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--amber-900);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.brand-text {
    display: grid;
    line-height: 1.1;
}

.brand-text strong,
.footer-brand {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

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

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

.main-nav a,
.mobile-panel a,
.footer-links a {
    color: var(--amber-800);
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
    color: var(--amber-500);
}

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

.nav-search input,
.mobile-search input,
.large-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
    border: 1px solid var(--amber-300);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
    color: var(--amber-900);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-search input {
    width: 210px;
    padding: 10px 16px;
}

.nav-search button,
.mobile-search button,
.large-search button,
.search-page-form button {
    border: 0;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.22);
}

.nav-search button {
    padding: 10px 16px;
}

input:focus,
select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.12);
    cursor: pointer;
}

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

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 18px;
    background: rgba(255, 255, 255, 0.95);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav {
    width: min(1180px, 100%);
    margin: 16px auto 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-panel a {
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--amber-50);
}

.mobile-search {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.mobile-search input {
    width: 100%;
    padding: 12px 16px;
}

.mobile-search button {
    padding: 12px 18px;
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(28, 18, 6, 0.92), rgba(28, 18, 6, 0.58) 45%, rgba(28, 18, 6, 0.15)),
        linear-gradient(0deg, rgba(28, 18, 6, 0.95), transparent 45%);
}

.hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 90px 0 150px;
    color: #fff;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--amber-300);
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(44px, 8vw, 86px);
    line-height: 0.95;
    letter-spacing: -0.05em;
    text-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.hero-summary {
    max-width: 720px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

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

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

.hero-tags span,
.tag-list span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--amber-800);
    background: var(--amber-100);
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

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

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.28);
}

.ghost-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-card:hover,
.top-rank-card:hover {
    transform: translateY(-3px);
}

.hero-thumbs {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.hero-thumb {
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    padding: 8px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
    cursor: pointer;
    text-align: left;
}

.hero-thumb.is-active {
    border-color: var(--amber-300);
    background: rgba(245, 158, 11, 0.28);
}

.hero-thumb img {
    width: 58px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}

.hero-thumb span {
    font-weight: 900;
    line-height: 1.25;
}

.home-search-panel,
.section-wrap,
.inner-page,
.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.home-search-panel {
    position: relative;
    z-index: 5;
    margin-top: -42px;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    align-items: center;
    gap: 24px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.home-search-panel h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-content h2,
.detail-side h2 {
    color: var(--amber-900);
}

.home-search-panel h2 {
    margin: 0 0 8px;
    font-size: 30px;
}

.home-search-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.large-search input,
.search-page-form input {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
}

.large-search button,
.search-page-form button {
    min-height: 52px;
    padding: 0 22px;
    white-space: nowrap;
}

.section-wrap {
    margin-top: 72px;
}

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

.section-head.compact {
    align-items: start;
    display: grid;
    gap: 4px;
}

.section-head p {
    margin: 0 0 4px;
    color: var(--amber-600);
    font-weight: 900;
    letter-spacing: 0.12em;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.1;
}

.section-head a {
    color: var(--amber-700);
    font-weight: 900;
}

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

.category-card {
    border-radius: 24px;
    background: linear-gradient(135deg, #fff, var(--amber-50));
    border: 1px solid var(--line);
    box-shadow: 0 14px 36px rgba(146, 64, 14, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    box-shadow: 0 20px 48px rgba(146, 64, 14, 0.15);
}

.category-card a {
    min-height: 180px;
    display: grid;
    gap: 12px;
    padding: 22px;
}

.category-card span {
    color: var(--amber-900);
    font-size: 22px;
    font-weight: 900;
}

.category-card strong {
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(180, 83, 9, 0.16);
    background: var(--card);
    box-shadow: 0 16px 42px rgba(146, 64, 14, 0.09);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

.card-link {
    display: grid;
    height: 100%;
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--amber-100);
}

.poster-wrap img,
.movie-card-horizontal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(28, 18, 6, 0.66);
    backdrop-filter: blur(12px);
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--amber-600);
    font-size: 13px;
    font-weight: 900;
}

.movie-card h3 {
    margin: 10px 0 8px;
    color: var(--amber-900);
    font-size: 20px;
    line-height: 1.25;
}

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

.movie-card-horizontal .card-link {
    grid-template-columns: 138px 1fr;
}

.movie-card-horizontal img {
    aspect-ratio: 3 / 4;
}

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

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: start;
}

.ranking-card {
    position: sticky;
    top: 102px;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
}

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

.rank-item a {
    display: grid;
    grid-template-columns: 46px 54px 1fr;
    grid-template-areas:
        "num img title"
        "num img info";
    gap: 4px 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: var(--amber-50);
}

.rank-num {
    grid-area: num;
    color: var(--orange-500);
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

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

.rank-title {
    grid-area: title;
    color: var(--amber-900);
    font-weight: 900;
}

.rank-info {
    grid-area: info;
    color: var(--muted);
    font-size: 13px;
}

.inner-page {
    padding-top: 34px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-top: 24px;
    padding: clamp(34px, 6vw, 72px);
    border-radius: 32px;
    color: var(--amber-900);
    background:
        radial-gradient(circle at 85% 15%, rgba(249, 115, 22, 0.26), transparent 22rem),
        linear-gradient(135deg, #fff7ed, var(--amber-100));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.page-hero p:last-child {
    max-width: 780px;
    margin: 16px 0 0;
    color: var(--muted);
    line-height: 1.8;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--amber-700);
    font-weight: 800;
}

.breadcrumb strong {
    color: var(--amber-900);
}

.filter-panel,
.search-page-panel {
    margin-top: 28px;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 34px rgba(146, 64, 14, 0.08);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 16px;
}

.filter-panel label {
    display: block;
    margin-bottom: 8px;
    color: var(--amber-800);
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: 34px;
    align-items: end;
    margin-top: 24px;
    padding: clamp(24px, 5vw, 48px);
    border-radius: 34px;
    background:
        radial-gradient(circle at 90% 10%, rgba(249, 115, 22, 0.2), transparent 24rem),
        linear-gradient(135deg, #fff, var(--amber-50));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 24px 52px rgba(120, 53, 15, 0.28);
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 820px;
    margin: 18px 0;
    color: var(--muted);
    line-height: 1.8;
    font-size: 18px;
}

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

.large-tags {
    margin-bottom: 28px;
}

.player-section {
    margin-top: 36px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 28px 70px rgba(28, 18, 6, 0.34);
}

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

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.44));
    cursor: pointer;
}

.player-start span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 999px;
    color: #fff;
    font-size: 32px;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    margin-top: 44px;
}

.detail-content,
.detail-side {
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
    box-shadow: 0 14px 40px rgba(146, 64, 14, 0.08);
}

.detail-content h2,
.detail-side h2 {
    margin: 0 0 16px;
    font-size: 28px;
}

.detail-content p {
    margin: 0 0 28px;
    color: #4c3b24;
    line-height: 1.9;
    font-size: 17px;
}

.side-related .movie-card-horizontal .card-link {
    grid-template-columns: 112px 1fr;
}

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

.top-rank-card {
    overflow: hidden;
    border-radius: 28px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.top-rank-card a {
    display: grid;
}

.top-rank-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.top-rank-card h2,
.top-rank-card p {
    margin-left: 20px;
    margin-right: 20px;
}

.top-rank-card h2 {
    color: var(--amber-900);
    margin-bottom: 6px;
}

.top-rank-card p {
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.top-rank-num {
    position: absolute;
    margin: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(28, 18, 6, 0.62);
    font-weight: 900;
}

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

.search-page-form {
    display: grid;
    grid-template-columns: 1fr auto;
}

.search-status {
    margin-top: 16px;
    color: var(--muted);
    font-weight: 800;
}

.site-footer {
    margin-top: 96px;
    padding: 52px 0;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, var(--amber-50), var(--amber-100));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr 1fr;
    gap: 34px;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: var(--amber-900);
    font-size: 18px;
}

.site-footer p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

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

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

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

    .hero-thumb:nth-child(n + 4) {
        display: none;
    }

    .home-search-panel,
    .split-section,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .ranking-card {
        position: static;
    }

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

@media (max-width: 820px) {
    .hero,
    .hero-stage {
        min-height: 720px;
    }

    .hero-content {
        padding: 74px 0 210px;
    }

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

    .hero-thumb {
        grid-template-columns: 48px 1fr;
    }

    .hero-thumb:nth-child(n + 3) {
        display: none;
    }

    .home-search-panel,
    .large-search,
    .filter-panel,
    .detail-hero,
    .search-page-form,
    .top-rank-grid,
    .wide-rank-list {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 560px) {
    .nav-wrap,
    .home-search-panel,
    .section-wrap,
    .inner-page,
    .footer-grid {
        width: min(100% - 22px, 1180px);
    }

    .brand-text small {
        display: none;
    }

    .hero h1,
    .detail-info h1,
    .page-hero h1 {
        letter-spacing: -0.03em;
    }

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

    .movie-card-horizontal .card-link,
    .side-related .movie-card-horizontal .card-link {
        grid-template-columns: 106px 1fr;
    }

    .player-start span {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
