:root {
    --stone-950: #1c1917;
    --stone-900: #292524;
    --stone-850: #332d2b;
    --stone-800: #44403c;
    --stone-700: #57534e;
    --stone-600: #78716c;
    --stone-500: #a8a29e;
    --stone-300: #d6d3d1;
    --stone-200: #e7e5e4;
    --stone-100: #f5f5f4;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-300: #fcd34d;
    --paper: #fffaf3;
    --white: #ffffff;
    --shadow: 0 20px 45px rgba(28, 25, 23, 0.16);
    --radius-lg: 24px;
    --radius-md: 16px;
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--stone-900);
    background: linear-gradient(180deg, #fffaf3 0%, #f5f1ea 45%, #fffaf3 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(41, 37, 36, 0.96);
    color: var(--stone-100);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

.top-nav {
    max-width: var(--max-width);
    min-height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
    color: var(--white);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.25);
}

.brand strong {
    display: block;
    font-size: 18px;
    letter-spacing: 0.02em;
}

.brand small {
    display: block;
    color: var(--stone-300);
    font-size: 12px;
}

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

.nav-link {
    color: var(--stone-200);
    font-size: 14px;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--amber-500);
}

.nav-search {
    position: relative;
    width: 230px;
}

.nav-search input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: var(--stone-800);
    color: var(--stone-100);
    padding: 10px 42px 10px 16px;
    outline: none;
}

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

.nav-search button {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    border: 0;
    color: var(--stone-300);
    background: transparent;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    background: var(--stone-800);
    color: var(--stone-100);
    padding: 8px 11px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 16px 22px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--stone-950);
}

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

.mobile-panel form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.mobile-panel input,
.mobile-panel button {
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
}

.mobile-panel input {
    background: var(--stone-800);
    color: var(--stone-100);
}

.mobile-panel button {
    background: var(--amber-600);
    color: var(--white);
}

.mobile-panel a {
    color: var(--stone-200);
    padding: 8px 0;
}

.hero-carousel {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: var(--stone-950);
    color: var(--white);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1s ease;
    pointer-events: none;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 26%, rgba(245, 158, 11, 0.25), transparent 34%),
        linear-gradient(90deg, rgba(28, 25, 23, 0.96), rgba(28, 25, 23, 0.72) 43%, rgba(28, 25, 23, 0.25)),
        linear-gradient(0deg, rgba(28, 25, 23, 0.9), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    min-height: 650px;
    margin: 0 auto;
    padding: 92px 22px 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amber-300);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 760px;
    margin: 14px 0 18px;
    font-size: clamp(42px, 8vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 660px;
    margin: 0 0 24px;
    color: var(--stone-200);
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.13);
    color: var(--amber-700);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.12);
    color: var(--stone-100);
}

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

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

.primary-btn {
    background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
    color: var(--white);
    box-shadow: 0 16px 28px rgba(217, 119, 6, 0.28);
}

.ghost-btn {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
}

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

.full {
    width: 100%;
}

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

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

.hero-dot.is-active {
    width: 36px;
    background: var(--amber-500);
}

.hero-side-card {
    position: absolute;
    right: calc((100vw - min(100vw, var(--max-width))) / 2 + 22px);
    bottom: 36px;
    z-index: 4;
    min-width: 260px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    background: rgba(41, 37, 36, 0.72);
    backdrop-filter: blur(16px);
}

.hero-side-card span {
    display: block;
    color: var(--stone-300);
    font-size: 12px;
}

.hero-side-card strong {
    display: block;
    margin: 4px 0 10px;
    font-size: 18px;
}

.hero-side-card a {
    color: var(--amber-300);
    font-weight: 700;
}

.content-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 64px 22px;
}

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

.section-title h2 {
    margin: 6px 0 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.1;
    color: var(--stone-900);
}

.section-more {
    min-height: 40px;
    color: var(--amber-700);
    background: #fff3d7;
}

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

.category-tile,
.overview-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--stone-900), var(--stone-700));
    color: var(--white);
    padding: 24px;
    box-shadow: var(--shadow);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: auto -25% -45% 35%;
    height: 130px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.22);
    filter: blur(6px);
}

.category-tile span,
.category-tile strong,
.category-tile small {
    position: relative;
    z-index: 1;
    display: block;
}

.category-tile span {
    color: var(--amber-300);
    font-weight: 800;
}

.category-tile strong {
    margin: 8px 0 4px;
    font-size: 28px;
}

.category-tile small {
    color: var(--stone-200);
}

.filter-slim {
    margin: -10px 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-slim input,
.filter-panel input,
.filter-panel select,
.search-page-form input {
    width: 100%;
    border: 1px solid rgba(120, 113, 108, 0.25);
    border-radius: 16px;
    background: var(--white);
    padding: 12px 14px;
    outline: none;
}

.filter-slim input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-page-form input:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

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

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

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

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

.movie-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--stone-900);
    box-shadow: 0 10px 25px rgba(41, 37, 36, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 42px rgba(41, 37, 36, 0.14);
}

.movie-card figure {
    position: relative;
    aspect-ratio: 2 / 3;
    margin: 0;
    overflow: hidden;
    background: var(--stone-800);
}

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

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

.movie-card figcaption,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    border-radius: 999px;
    background: rgba(28, 25, 23, 0.72);
    color: var(--white);
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: auto;
    right: 10px;
    background: var(--amber-600);
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
}

.card-body h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p {
    margin: 0;
    color: var(--stone-600);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--stone-500);
    font-size: 12px;
}

.tag-row {
    margin-top: auto;
}

.tag-row.large span {
    font-size: 13px;
    padding: 6px 12px;
}

.dark-band {
    max-width: none;
    padding-left: max(22px, calc((100vw - var(--max-width)) / 2 + 22px));
    padding-right: max(22px, calc((100vw - var(--max-width)) / 2 + 22px));
    background: var(--stone-900);
}

.dark-band .section-title h2 {
    color: var(--white);
}

.dark-band .movie-card {
    background: var(--stone-850);
    color: var(--stone-100);
}

.dark-band .card-body p,
.dark-band .meta-row {
    color: var(--stone-300);
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: var(--stone-950);
    color: var(--white);
}

.page-hero {
    min-height: 340px;
    display: grid;
    place-items: center;
    padding: 80px 22px;
    text-align: center;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.28), transparent 30%),
        radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.08), transparent 28%);
}

.page-hero > div {
    position: relative;
    z-index: 1;
    max-width: 780px;
}

.page-hero h1 {
    margin: 8px 0 14px;
    font-size: clamp(34px, 6vw, 64px);
}

.page-hero p {
    margin: 0;
    color: var(--stone-200);
    font-size: 18px;
}

.overview-card {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.overview-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.overview-thumbs img {
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    object-fit: cover;
}

.overview-card span {
    color: var(--amber-300);
    font-size: 13px;
}

.overview-card h2 {
    margin: 6px 0 4px;
    font-size: 28px;
}

.overview-card p {
    margin: 0;
    color: var(--stone-200);
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 25px rgba(41, 37, 36, 0.06);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--stone-600);
    font-size: 13px;
    font-weight: 700;
}

.filter-panel button,
.search-page-form button {
    border: 0;
    border-radius: 16px;
    background: var(--stone-900);
    color: var(--white);
    padding: 12px 18px;
    cursor: pointer;
}

.filter-count,
.search-status {
    color: var(--stone-600);
    margin: 0 0 18px;
}

.detail-hero {
    padding: 70px 22px 56px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.26;
    filter: blur(6px);
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(28, 25, 23, 0.35), var(--stone-950));
}

.detail-layout {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 24px;
    align-items: stretch;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000;
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.35);
}

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

.player-start {
    position: absolute;
    z-index: 4;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.62));
    cursor: pointer;
}

.player-start span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.28);
    font-size: 34px;
    text-indent: 5px;
}

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

.player-loading,
.player-error {
    position: absolute;
    z-index: 3;
    left: 18px;
    top: 18px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: var(--white);
    padding: 8px 12px;
    font-size: 13px;
}

.player-loading.is-hidden,
.player-error:empty {
    display: none;
}

.player-error {
    right: 18px;
    top: auto;
    bottom: 74px;
    border-radius: 14px;
    color: #fee2e2;
}

.player-controls {
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 28px 16px 14px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.player-shell:hover .player-controls,
.player-shell:focus-within .player-controls {
    opacity: 1;
}

.player-controls button {
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    padding: 8px 12px;
    cursor: pointer;
}

.detail-info-card {
    display: grid;
    gap: 16px;
    align-content: start;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
}

.detail-info-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--stone-600);
    font-size: 14px;
    margin-bottom: 26px;
}

.breadcrumb a {
    color: var(--amber-700);
    font-weight: 700;
}

.detail-content article {
    display: grid;
    gap: 24px;
}

.movie-title-block h1 {
    margin: 8px 0 12px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.05;
}

.movie-title-block p {
    max-width: 880px;
    margin: 0 0 18px;
    color: var(--stone-700);
    font-size: 18px;
}

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

.detail-meta-grid div,
.text-panel {
    border-radius: var(--radius-md);
    background: var(--white);
    padding: 18px;
    box-shadow: 0 10px 25px rgba(41, 37, 36, 0.06);
}

.detail-meta-grid strong,
.detail-meta-grid span {
    display: block;
}

.detail-meta-grid strong {
    color: var(--stone-600);
    font-size: 13px;
    margin-bottom: 5px;
}

.detail-meta-grid span {
    color: var(--stone-900);
    font-weight: 800;
}

.text-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.text-panel p {
    margin: 0;
    color: var(--stone-700);
    font-size: 17px;
}

.search-page-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-bottom: 20px;
}

.site-footer {
    margin-top: 36px;
    background: var(--stone-950);
    color: var(--stone-300);
}

.footer-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 46px 22px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
}

.footer-logo {
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 10px;
}

.site-footer h3 {
    color: var(--white);
    margin: 0 0 12px;
}

.site-footer p,
.site-footer ul {
    margin: 0;
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 22px;
    text-align: center;
    color: var(--stone-500);
}

.is-hidden-card {
    display: none !important;
}

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

    .top-nav {
        justify-content: space-between;
    }

    .menu-toggle {
        display: inline-flex;
    }

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

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

@media (max-width: 820px) {
    .hero-carousel,
    .hero-content {
        min-height: 600px;
    }

    .hero-content {
        padding-top: 68px;
        padding-bottom: 108px;
    }

    .hero-side-card {
        display: none;
    }

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

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

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .detail-info-card {
        display: none;
    }

    .detail-meta-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .brand small {
        display: none;
    }

    .brand {
        min-width: 0;
    }

    .top-nav {
        padding: 0 14px;
    }

    .hero-content p,
    .page-hero p,
    .movie-title-block p {
        font-size: 16px;
    }

    .content-section {
        padding: 46px 14px;
    }

    .category-grid,
    .overview-grid,
    .movie-grid,
    .wide-card-grid,
    .ranking-grid,
    .featured-grid {
        grid-template-columns: 1fr;
    }

    .detail-meta-grid,
    .footer-grid,
    .search-page-form {
        grid-template-columns: 1fr;
    }

    .player-controls {
        flex-wrap: wrap;
        opacity: 1;
    }
}
