:root {
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-300: #fcd34d;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-900: #78350f;
    --white: #ffffff;
    --black: #000000;
    --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.08);
    --shadow-md: 0 10px 30px rgba(28, 25, 23, 0.12);
    --shadow-lg: 0 24px 60px rgba(28, 25, 23, 0.18);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 28px;
}

* {
    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(--stone-800);
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem), var(--stone-50);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(217, 119, 6, 0.18);
    background: rgba(255, 251, 235, 0.88);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--amber-900);
    letter-spacing: 0.02em;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-600), #ea580c);
    box-shadow: 0 8px 22px rgba(217, 119, 6, 0.32);
}

.brand-text {
    font-size: 1.25rem;
}

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

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

.nav-link:hover,
.nav-link.is-active {
    color: var(--amber-700);
    background: rgba(245, 158, 11, 0.16);
    transform: translateY(-1px);
}

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

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

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 0 16px 16px;
}

.hero {
    padding: 28px 0 18px;
}

.hero-stage {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: clamp(520px, 58vw, 670px);
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--stone-900);
    box-shadow: var(--shadow-lg);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    align-items: center;
    gap: 34px;
    padding: clamp(28px, 5vw, 70px);
    color: var(--white);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.8s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.2)), var(--hero-bg);
    background-size: cover;
    background-position: center;
    filter: blur(20px) saturate(1.12);
    transform: scale(1.08);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 24% 20%, rgba(245, 158, 11, 0.32), transparent 28rem), linear-gradient(0deg, rgba(0, 0, 0, 0.22), transparent);
}

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

.hero-content,
.hero-image {
    position: relative;
    z-index: 2;
}

.hero-image {
    width: min(380px, 100%);
    justify-self: end;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.hero-content {
    max-width: 660px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--amber-700);
    background: rgba(245, 158, 11, 0.14);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero .eyebrow {
    color: var(--amber-100);
    background: rgba(255, 255, 255, 0.16);
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(2.35rem, 6vw, 5.3rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero p {
    max-width: 700px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1.02rem, 1.7vw, 1.28rem);
}

.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;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    color: var(--amber-900);
    background: var(--amber-100);
}

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

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

.primary-button {
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-600), #ea580c);
    box-shadow: 0 14px 32px rgba(217, 119, 6, 0.34);
}

.ghost-button {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.1);
}

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

.hero-controls {
    position: absolute;
    left: clamp(28px, 5vw, 70px);
    bottom: 26px;
    z-index: 4;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.category-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    padding: 16px 0 8px;
}

.category-strip a,
.category-card {
    border: 1px solid rgba(217, 119, 6, 0.18);
    border-radius: var(--radius-md);
    color: var(--amber-900);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-strip a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    font-weight: 800;
}

.category-strip a:hover,
.category-card:hover,
.movie-card:hover,
.rank-row:hover {
    transform: translateY(-4px);
    border-color: rgba(217, 119, 6, 0.45);
    box-shadow: var(--shadow-md);
}

.page-main {
    padding: 36px 0 0;
}

.small-hero {
    padding: clamp(32px, 6vw, 64px);
    border: 1px solid rgba(217, 119, 6, 0.16);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.9), rgba(255, 255, 255, 0.94));
    box-shadow: var(--shadow-md);
}

.small-hero h1 {
    margin: 16px 0 10px;
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: var(--stone-900);
}

.small-hero p {
    max-width: 820px;
    margin: 0;
    color: var(--stone-600);
    font-size: 1.06rem;
}

.search-panel,
.content-card,
.player-shell,
.movie-card,
.rank-row {
    border: 1px solid rgba(214, 211, 209, 0.78);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-sm);
}

.search-panel {
    margin: 32px 0 18px;
    padding: 24px;
    border-radius: var(--radius-lg);
}

.search-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.search-heading h2,
.section-title-row h2,
.content-card h2 {
    margin: 0;
    color: var(--stone-900);
}

.search-heading p {
    margin: 4px 0 0;
    color: var(--stone-600);
}

.search-controls {
    display: grid;
    grid-template-columns: 1.45fr repeat(4, minmax(140px, 1fr));
    gap: 12px;
}

.search-controls label {
    display: grid;
    gap: 6px;
    color: var(--stone-600);
    font-size: 0.88rem;
    font-weight: 750;
}

.search-controls input,
.search-controls select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--stone-300);
    border-radius: 14px;
    padding: 0 12px;
    color: var(--stone-800);
    background: var(--white);
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.section-block {
    padding: 34px 0;
}

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

.section-title-row h2 {
    margin-top: 8px;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.text-link {
    min-height: 38px;
    color: var(--amber-700);
    background: var(--amber-100);
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--stone-200);
}

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

.poster-link img {
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.46));
}

.poster-play,
.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    background: rgba(245, 158, 11, 0.9);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.64);
}

.year-badge {
    left: 10px;
}

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

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--stone-500);
    font-size: 0.78rem;
    font-weight: 700;
}

.movie-card h3 {
    margin: 8px 0 7px;
    font-size: 1rem;
    line-height: 1.28;
    color: var(--stone-900);
}

.movie-card h3 a:hover,
.rank-info h3 a:hover {
    color: var(--amber-700);
}

.movie-card p,
.rank-info p {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--stone-600);
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    padding: 24px;
}

.category-card img {
    position: absolute;
    inset: 0;
    z-index: 0;
    filter: saturate(1.05);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.78));
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
    color: var(--white);
}

.category-card span {
    display: block;
    margin-top: 80px;
    font-size: 1.4rem;
    font-weight: 850;
}

.category-card p {
    max-width: 92%;
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.78);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: var(--radius-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-600), #ea580c);
    font-weight: 900;
}

.rank-thumb {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background: var(--stone-200);
}

.rank-info h3 {
    margin: 0 0 6px;
    color: var(--stone-900);
    font-size: 1.08rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--stone-500);
    font-size: 0.92rem;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(230px, 330px) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 58px);
    align-items: center;
    padding: clamp(24px, 5vw, 48px);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.94), rgba(255, 255, 255, 0.94));
    box-shadow: var(--shadow-md);
}

.detail-cover {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 26px;
    background: var(--stone-200);
    box-shadow: var(--shadow-lg);
}

.detail-info h1 {
    margin: 18px 0 14px;
    color: var(--stone-900);
    font-size: clamp(2.1rem, 5vw, 4.7rem);
    line-height: 1;
    letter-spacing: -0.055em;
}

.detail-one-line {
    max-width: 880px;
    margin: 0 0 18px;
    color: var(--stone-700);
    font-size: 1.1rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.detail-meta span {
    padding: 7px 12px;
    border: 1px solid rgba(217, 119, 6, 0.22);
    border-radius: 999px;
    color: var(--amber-900);
    background: var(--white);
    font-weight: 750;
}

.tag-row.large span {
    padding: 7px 12px;
}

.detail-info .primary-button {
    margin-top: 24px;
}

.player-section {
    padding: 34px 0 12px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--black);
    box-shadow: var(--shadow-lg);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--black);
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.74));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
    width: 74px;
    height: 74px;
    font-size: 1.8rem;
}

.player-overlay strong {
    font-size: 1.3rem;
}

.player-overlay em {
    max-width: min(90%, 640px);
    color: rgba(255, 255, 255, 0.76);
    font-style: normal;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding: 22px 0 0;
}

.content-card {
    padding: 24px;
    border-radius: var(--radius-md);
}

.content-card h2 {
    margin-bottom: 12px;
    font-size: 1.35rem;
}

.content-card p {
    margin: 0;
    color: var(--stone-700);
}

.result-empty {
    display: none;
    margin: 28px 0 0;
    padding: 18px;
    border-radius: 16px;
    color: var(--stone-600);
    background: var(--stone-100);
    text-align: center;
}

.result-empty.is-visible {
    display: block;
}

.site-footer {
    margin-top: 54px;
    padding: 34px 0;
    color: var(--stone-300);
    background: var(--stone-900);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    color: var(--amber-100);
}

.footer-inner p {
    max-width: 640px;
    margin: 10px 0 0;
    color: var(--stone-300);
}

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

.footer-links a {
    color: var(--amber-100);
}

.footer-links a:hover {
    color: var(--amber-300);
}

[hidden] {
    display: none !important;
}

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .mobile-nav.is-open {
        display: flex;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: end;
        min-height: 640px;
    }

    .hero-image {
        width: min(240px, 72vw);
        justify-self: start;
        order: -1;
    }

    .hero h1 {
        font-size: clamp(2.1rem, 11vw, 4rem);
    }

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

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

    .search-heading,
    .section-title-row,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .detail-cover {
        width: min(320px, 100%);
    }

    .rank-row {
        grid-template-columns: 44px 70px minmax(0, 1fr);
    }

    .rank-row .text-link {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 560px) {
    .container,
    .hero-stage {
        width: min(100% - 22px, 1180px);
    }

    .header-inner {
        min-height: 62px;
    }

    .brand-text {
        font-size: 1.05rem;
    }

    .hero-stage {
        min-height: 620px;
        border-radius: 22px;
    }

    .hero-slide {
        padding: 24px;
    }

    .hero-controls {
        left: 24px;
        bottom: 20px;
    }

    .search-controls {
        grid-template-columns: 1fr;
    }

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

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

    .movie-card h3 {
        font-size: 0.94rem;
    }

    .movie-card p {
        font-size: 0.84rem;
    }

    .small-hero,
    .detail-hero,
    .search-panel,
    .content-card {
        padding: 20px;
        border-radius: 20px;
    }

    .rank-row {
        gap: 10px;
        padding: 10px;
    }

    .rank-index {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 0.86rem;
    }
}
