* {
    box-sizing: border-box;
}

:root {
    --stone-950: #1c1917;
    --stone-900: #292524;
    --stone-800: #44403c;
    --stone-700: #57534e;
    --stone-600: #78716c;
    --stone-500: #a8a29e;
    --stone-300: #d6d3d1;
    --stone-200: #e7e5e4;
    --stone-100: #f5f5f4;
    --stone-50: #fafaf9;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;
    --orange-700: #c2410c;
    --orange-600: #ea580c;
    --orange-100: #ffedd5;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(41, 37, 36, 0.12);
    --shadow-card: 0 12px 28px rgba(41, 37, 36, 0.1);
    --radius-xl: 26px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--stone-800);
    background: var(--stone-50);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--white);
    background: linear-gradient(90deg, var(--amber-700), var(--orange-600));
    box-shadow: 0 12px 32px rgba(120, 53, 15, 0.25);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 72px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    color: var(--amber-700);
    background: var(--white);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

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

.brand-text strong {
    font-size: 21px;
    letter-spacing: 0.08em;
}

.brand-text small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    font-weight: 700;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.92);
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
    color: var(--amber-100);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: var(--stone-900);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(28, 25, 23, 0.88), rgba(28, 25, 23, 0.38), rgba(28, 25, 23, 0.72)), linear-gradient(0deg, rgba(28, 25, 23, 0.96), transparent 60%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 72vh;
    padding: 96px 0 88px;
    color: var(--white);
}

.hero-kicker {
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.22);
    color: var(--amber-100);
    font-weight: 700;
    letter-spacing: 0.08em;
    backdrop-filter: blur(12px);
}

.hero h1 {
    max-width: 760px;
    margin: 20px 0 16px;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 1.05;
}

.hero p {
    max-width: 680px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(17px, 2.2vw, 22px);
}

.hero-actions,
.center-action,
.library-tools {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.outline-btn,
.search-trigger,
.search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 20px;
    border-radius: 12px;
    border: 0;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn,
.search-trigger,
.search-form button {
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.26);
}

.primary-btn:hover,
.search-trigger:hover,
.search-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(217, 119, 6, 0.34);
}

.ghost-btn {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(14px);
}

.outline-btn {
    color: var(--amber-700);
    background: var(--white);
    border: 1px solid rgba(217, 119, 6, 0.22);
}

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

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

.hero-dots button.active {
    width: 34px;
    background: var(--white);
}

.search-strip {
    background: var(--white);
    border-bottom: 1px solid var(--stone-200);
}

.search-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 0;
}

.search-strip strong {
    display: block;
    color: var(--stone-900);
    font-size: 20px;
}

.search-strip span {
    color: var(--stone-600);
}

.section {
    padding: 76px 0;
}

.section-soft {
    background: linear-gradient(180deg, var(--amber-100), var(--white));
}

.section-gradient {
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.22), transparent 34%), linear-gradient(135deg, var(--amber-100), var(--orange-100), var(--stone-100));
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 28px;
}

.section-heading span,
.page-hero span {
    color: var(--amber-700);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.section-heading h2,
.page-hero h1 {
    margin: 0;
    color: var(--stone-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
}

.section-heading p,
.page-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--stone-600);
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-soft);
}

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, var(--stone-800), var(--stone-950));
}

.movie-card.wide .poster-frame {
    aspect-ratio: 16 / 10;
}

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

.movie-card:hover img,
.category-tile:hover img,
.category-card:hover img,
.compact-card:hover img {
    transform: scale(1.07);
}

.poster-frame::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(28, 25, 23, 0.76), transparent 46%);
    opacity: 0.76;
}

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

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(217, 119, 6, 0.92);
    font-size: 12px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 999px;
    color: var(--stone-950);
    background: var(--amber-100);
}

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

.movie-card-body strong {
    color: var(--stone-900);
    font-size: 17px;
    line-height: 1.25;
}

.movie-card-body em {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    color: var(--stone-600);
    font-size: 14px;
    font-style: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    color: var(--stone-500);
    font-size: 13px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

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

.category-tile,
.category-card {
    position: relative;
    display: flex;
    overflow: hidden;
    min-height: 170px;
    border-radius: var(--radius-lg);
    color: var(--white);
    background: var(--stone-900);
    box-shadow: var(--shadow-card);
}

.category-card {
    min-height: 260px;
}

.category-tile img,
.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transition: transform 0.45s ease;
}

.category-tile span,
.category-card-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    padding: 20px;
    background: linear-gradient(0deg, rgba(28, 25, 23, 0.9), transparent 78%);
}

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

.category-tile em,
.category-card em,
.category-samples {
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-style: normal;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.category-samples span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.ranking-box,
.article-card,
.related-box,
.detail-side,
.player-card {
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.ranking-box {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.ranking-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.ranking-head span {
    color: var(--stone-900);
    font-size: 22px;
    font-weight: 900;
}

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

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

.compact-card {
    display: grid;
    grid-template-columns: auto 82px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.compact-card img {
    width: 82px;
    height: 58px;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.compact-card strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--stone-900);
    font-size: 15px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact-card small {
    color: var(--stone-500);
}

.compact-rank {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    color: var(--white);
    background: var(--amber-600);
    font-weight: 900;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 84px 0;
    background: linear-gradient(135deg, var(--amber-100), var(--stone-100));
}

.category-hero {
    min-height: 360px;
    color: var(--white);
    background: var(--stone-900);
}

.category-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
}

.page-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.42));
}

.category-hero .container {
    position: relative;
    z-index: 2;
}

.category-hero h1,
.category-hero p {
    color: var(--white);
}

.detail-top {
    padding: 42px 0;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.24), transparent 32%), linear-gradient(135deg, var(--stone-950), var(--stone-800));
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.55fr);
    gap: 28px;
    align-items: stretch;
}

.player-card {
    overflow: hidden;
    background: #000000;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.video-shell video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle, rgba(28, 25, 23, 0.12), rgba(28, 25, 23, 0.68));
    cursor: pointer;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.32);
    font-size: 36px;
    text-indent: 6px;
}

.play-overlay.is-hidden {
    display: none;
}

.detail-side {
    padding: 28px;
}

.detail-side h1 {
    margin: 16px 0 12px;
    color: var(--stone-900);
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.16;
}

.detail-side p {
    margin: 0 0 18px;
    color: var(--stone-600);
}

.breadcrumb,
.breadcrumb-sep {
    color: var(--amber-700);
    font-weight: 800;
}

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

.detail-meta {
    margin: 20px 0;
}

.detail-meta span,
.tag-list span {
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--amber-100);
    color: var(--amber-700);
    font-size: 13px;
    font-weight: 800;
}

.tag-list span {
    background: var(--stone-100);
    color: var(--stone-700);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.article-card,
.related-box {
    padding: 28px;
}

.article-card h2,
.related-box h2 {
    margin: 0 0 16px;
    color: var(--stone-900);
    font-size: 26px;
}

.article-card p {
    margin: 0 0 28px;
    color: var(--stone-700);
    font-size: 17px;
    white-space: pre-wrap;
}

.related-box {
    position: sticky;
    top: 96px;
}

.library-tools {
    justify-content: flex-end;
    margin-bottom: 24px;
}

.site-footer {
    padding: 50px 0;
    color: var(--stone-300);
    background: var(--stone-950);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.footer-logo {
    color: var(--white);
    font-size: 24px;
    font-weight: 900;
}

.site-footer p {
    max-width: 520px;
    color: var(--stone-300);
}

.site-footer h2 {
    margin-top: 0;
    color: var(--white);
    font-size: 18px;
}

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

.footer-links a {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.search-panel {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(28, 25, 23, 0.68);
    backdrop-filter: blur(12px);
}

.search-panel.open {
    display: flex;
}

.search-panel-card {
    position: relative;
    width: min(760px, 100%);
    max-height: min(720px, 90vh);
    overflow: auto;
    padding: 28px;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.search-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: var(--stone-100);
    cursor: pointer;
    font-size: 24px;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin: 18px 0;
}

.search-form input {
    width: 100%;
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid var(--stone-200);
    border-radius: 12px;
    outline: 0;
}

.search-results {
    display: grid;
    gap: 10px;
}

.search-result-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--stone-200);
}

.search-result-item strong {
    color: var(--stone-900);
}

.search-result-item span {
    color: var(--stone-500);
    font-size: 13px;
}

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

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

    .ranking-box,
    .related-box {
        position: static;
    }
}

@media (max-width: 860px) {
    .menu-toggle {
        display: grid;
        place-items: center;
    }

    .site-nav {
        position: absolute;
        top: 72px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border-radius: 18px;
        background: rgba(68, 64, 60, 0.96);
        box-shadow: var(--shadow-soft);
    }

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

    .site-nav a {
        padding: 10px 12px;
    }

    .hero,
    .hero-content {
        min-height: 68vh;
    }

    .hero-content {
        padding: 96px 0 76px;
    }

    .hero-arrow {
        display: none;
    }

    .search-strip-inner,
    .footer-grid,
    .detail-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-grid {
        display: grid;
    }

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

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

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

    .section {
        padding: 52px 0;
    }

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

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

    .movie-card-body em {
        min-height: 40px;
        font-size: 13px;
    }

    .detail-side,
    .article-card,
    .related-box,
    .search-panel-card {
        padding: 20px;
    }

    .compact-card {
        grid-template-columns: auto 72px minmax(0, 1fr);
    }

    .compact-card img {
        width: 72px;
        height: 52px;
    }

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