:root {
    --stone-950: #1c1917;
    --stone-900: #292524;
    --stone-800: #44403c;
    --stone-700: #57534e;
    --stone-600: #78716c;
    --stone-500: #a8a29e;
    --stone-200: #e7e5e4;
    --stone-100: #f5f5f4;
    --amber-900: #78350f;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-300: #fcd34d;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(41, 37, 36, 0.12);
    --shadow-strong: 0 25px 80px rgba(0, 0, 0, 0.35);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--stone-800);
    background: linear-gradient(180deg, #fffaf0 0%, #ffffff 360px, #f8f7f5 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(28, 25, 23, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(252, 211, 77, 0.18);
}

.topbar {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff7ed;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--stone-950);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.35);
}

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

.nav-link,
.nav-more-btn {
    border: 0;
    cursor: pointer;
    color: #fde68a;
    background: transparent;
    padding: 10px 14px;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-more:hover .nav-more-btn {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-more {
    position: relative;
}

.nav-more-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    min-width: 180px;
    padding: 10px;
    background: rgba(41, 37, 36, 0.98);
    border: 1px solid rgba(252, 211, 77, 0.16);
    border-radius: 16px;
    box-shadow: var(--shadow-strong);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-more:hover .nav-more-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-more-menu a {
    display: block;
    color: #fde68a;
    padding: 10px 12px;
    border-radius: 10px;
}

.nav-more-menu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(252, 211, 77, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    padding: 9px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #fde68a;
    border-radius: 999px;
}

.hero-slider {
    position: relative;
    min-height: 70vh;
    height: 680px;
    overflow: hidden;
    background: radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.28), transparent 34%), linear-gradient(135deg, #1c1917, #451a03 54%, #1c1917);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 60px;
    padding: 96px max(32px, calc((100vw - 1240px) / 2)) 92px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1.1s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(28, 25, 23, 0.94), rgba(28, 25, 23, 0.76) 48%, rgba(28, 25, 23, 0.28)), radial-gradient(circle at 88% 40%, rgba(245, 158, 11, 0.35), transparent 30%);
    backdrop-filter: blur(18px);
}

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

.hero-pill,
.eyebrow {
    display: inline-flex;
    align-items: center;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(252, 211, 77, 0.28);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
}

.hero-content h1 {
    margin: 0 0 24px;
    color: #fff7ed;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.05em;
    text-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.hero-desc {
    max-width: 720px;
    color: #e7e5e4;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
    margin: 0 0 22px;
}

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

.hero-meta span,
.detail-meta span {
    color: #fef3c7;
    border: 1px solid rgba(252, 211, 77, 0.22);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 7px 12px;
    font-weight: 700;
}

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

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

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: var(--stone-950);
    background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.28);
}

.btn.ghost {
    color: #fff7ed;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
}

.hero-poster {
    overflow: hidden;
    border: 1px solid rgba(252, 211, 77, 0.28);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-strong);
    transform: rotate(2deg);
}

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

.hero-controls {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    color: #fff7ed;
    font-size: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 9px;
}

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

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

.page-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.page-top {
    padding-top: 38px;
}

.search-panel,
.page-hero,
.content-section,
.detail-info,
.side-panel,
.category-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(120, 113, 108, 0.12);
    box-shadow: var(--shadow-soft);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 24px;
    align-items: center;
    margin: -48px 0 34px;
    position: relative;
    z-index: 10;
    padding: 28px;
    border-radius: var(--radius-xl);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-info h2,
.side-panel h2,
.category-card h2 {
    margin: 0;
    color: var(--stone-800);
}

.search-panel p,
.section-heading p,
.page-hero p,
.category-card p,
.site-footer p {
    color: var(--stone-600);
    line-height: 1.8;
    margin: 8px 0 0;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 10px 16px;
    border: 1px solid rgba(245, 158, 11, 0.26);
    border-radius: 16px;
    background: #fffaf0;
}

.search-box span {
    color: var(--amber-700);
    font-weight: 800;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--stone-800);
    padding: 10px 4px;
}

.search-box.slim {
    min-width: min(100%, 380px);
}

.content-section {
    margin: 34px 0;
    padding: 28px;
    border-radius: var(--radius-xl);
}

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

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

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

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(120, 113, 108, 0.12);
    box-shadow: 0 12px 32px rgba(41, 37, 36, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 22px 45px rgba(41, 37, 36, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #292524, #78350f);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.06);
    filter: saturate(1.08) contrast(1.04);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
}

.play-chip {
    left: 12px;
    bottom: 12px;
    color: var(--stone-950);
    background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
    padding: 7px 10px;
    font-size: 12px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    top: 10px;
    left: 10px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #fff7ed;
    background: rgba(180, 83, 9, 0.92);
    box-shadow: 0 10px 22px rgba(120, 53, 15, 0.28);
}

.movie-card-body {
    padding: 14px 14px 16px;
}

.movie-card h3 {
    margin: 0 0 6px;
    color: var(--stone-800);
    font-size: 17px;
    line-height: 1.35;
}

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

.movie-meta,
.movie-line {
    margin: 0;
    color: var(--stone-600);
    font-size: 13px;
    line-height: 1.65;
}

.movie-line {
    margin-top: 8px;
    min-height: 42px;
}

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

.tag-row span {
    color: var(--amber-900);
    background: #fffbeb;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    display: flex;
    min-height: 146px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: 18px;
    color: #fff7ed;
    background: linear-gradient(135deg, #44403c, #92400e);
    box-shadow: 0 18px 32px rgba(120, 53, 15, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 48px rgba(120, 53, 15, 0.26);
}

.category-tile strong {
    font-size: 22px;
}

.category-tile span {
    color: #fde68a;
    line-height: 1.7;
}

.small-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 26px;
    padding: 34px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 251, 235, 0.92));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--stone-600);
    margin-bottom: 18px;
}

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

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

.category-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    background: var(--stone-900);
}

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

.category-card-body {
    padding: 22px;
}

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

.detail-main {
    min-width: 0;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000000;
    box-shadow: var(--shadow-strong);
}

.hls-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff7ed;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(28, 25, 23, 0.18), rgba(28, 25, 23, 0.68));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    padding-left: 6px;
    color: var(--stone-950);
    font-size: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
    box-shadow: 0 18px 45px rgba(245, 158, 11, 0.34);
}

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

.detail-info {
    margin-top: 24px;
    padding: 28px;
    border-radius: var(--radius-xl);
}

.detail-info h1 {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.16;
    margin-bottom: 16px;
}

.detail-info h2 {
    margin-top: 28px;
    margin-bottom: 12px;
    font-size: 22px;
}

.detail-info p {
    color: var(--stone-700);
    line-height: 1.9;
    margin: 0;
}

.lead-text {
    font-size: 18px;
    color: var(--stone-800) !important;
}

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

.detail-side {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 20px;
}

.detail-poster {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.side-panel {
    padding: 22px;
    border-radius: var(--radius-xl);
}

.side-panel dl {
    margin: 18px 0 0;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
}

.side-panel dt {
    color: var(--stone-500);
    font-weight: 700;
}

.side-panel dd {
    margin: 0;
    color: var(--stone-800);
    min-width: 0;
}

.side-panel a {
    color: var(--amber-700);
    font-weight: 800;
}

.site-footer {
    margin-top: 60px;
    color: #e7e5e4;
    background: linear-gradient(135deg, var(--stone-950), #451a03);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.footer-links a {
    color: #fde68a;
    font-weight: 700;
}

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

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

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

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

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

    .detail-side {
        position: static;
        grid-template-columns: 220px minmax(0, 1fr);
    }
}

@media (max-width: 860px) {
    .topbar {
        height: 64px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        background: rgba(28, 25, 23, 0.98);
        border: 1px solid rgba(252, 211, 77, 0.16);
        border-radius: 18px;
        box-shadow: var(--shadow-strong);
    }

    .main-nav.open {
        display: flex;
    }

    .nav-more-menu {
        position: static;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        box-shadow: none;
        background: transparent;
        border: 0;
        padding: 4px 0 0 10px;
    }

    .hero-slider {
        height: auto;
        min-height: 720px;
    }

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

    .hero-poster {
        width: min(260px, 62vw);
        transform: none;
    }

    .search-panel,
    .small-hero {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .search-panel {
        margin-top: 24px;
    }

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

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 540px) {
    .page-shell,
    .topbar,
    .footer-inner {
        width: min(100% - 22px, 1240px);
    }

    .hero-slide {
        padding-left: 18px;
        padding-right: 18px;
    }

    .content-section,
    .search-panel,
    .small-hero,
    .detail-info {
        padding: 18px;
        border-radius: 18px;
    }

    .movie-grid,
    .all-grid,
    .ranking-grid {
        gap: 14px;
    }

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

    .movie-card h3 {
        font-size: 15px;
    }

    .movie-line {
        display: none;
    }

    .tag-row span:nth-child(n+3) {
        display: none;
    }

    .category-grid,
    .category-list,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 240px;
    }
}
