:root {
    --stone-950: #0c0a09;
    --stone-925: #11100f;
    --stone-900: #1c1917;
    --stone-850: #23201e;
    --stone-800: #292524;
    --stone-700: #44403c;
    --stone-600: #57534e;
    --stone-500: #78716c;
    --stone-400: #a8a29e;
    --stone-300: #d6d3d1;
    --stone-100: #f5f5f4;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-300: #fcd34d;
    --orange-600: #ea580c;
    --black-soft: rgba(12, 10, 9, 0.72);
    --panel: rgba(28, 25, 23, 0.72);
    --panel-strong: rgba(28, 25, 23, 0.94);
    --line: rgba(168, 162, 158, 0.16);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--stone-100);
    background:
        radial-gradient(circle at 10% -10%, rgba(217, 119, 6, 0.18), transparent 30rem),
        radial-gradient(circle at 95% 0%, rgba(234, 88, 12, 0.15), transparent 32rem),
        linear-gradient(180deg, var(--stone-950), #070605 42rem, var(--stone-950));
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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: 50;
    border-bottom: 1px solid rgba(68, 64, 60, 0.65);
    background: rgba(12, 10, 9, 0.88);
    backdrop-filter: blur(20px);
}

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

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.35);
}

.brand-text {
    font-size: 22px;
}

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

.desktop-nav a,
.mobile-panel a {
    color: var(--stone-300);
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel a:hover {
    color: var(--amber-500);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 280px;
}

.nav-search input,
.local-search input,
.mobile-panel input {
    width: 100%;
    border: 1px solid rgba(120, 113, 108, 0.32);
    border-radius: 999px;
    color: var(--stone-100);
    background: rgba(41, 37, 36, 0.86);
    outline: none;
    padding: 11px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input:focus,
.local-search input:focus,
.mobile-panel input:focus {
    border-color: rgba(245, 158, 11, 0.9);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
    background: rgba(41, 37, 36, 0.98);
}

.nav-search button,
.mobile-panel button {
    border: 0;
    border-radius: 999px;
    color: white;
    background: var(--amber-600);
    padding: 11px 18px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.mobile-panel button:hover {
    background: var(--amber-700);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--stone-100);
    background: rgba(41, 37, 36, 0.8);
    padding: 9px 12px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid rgba(68, 64, 60, 0.65);
}

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

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

.hero-section {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    min-height: 620px;
}

.hero-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    filter: blur(54px);
    opacity: 0.42;
    pointer-events: none;
}

.hero-glow-left {
    left: -70px;
    top: 90px;
    background: var(--amber-600);
}

.hero-glow-right {
    right: -80px;
    bottom: 30px;
    background: var(--orange-600);
}

.hero-frame {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: var(--radius-xl);
    background: var(--stone-900);
    box-shadow: var(--shadow);
}

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

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

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 10, 9, 0.96), rgba(12, 10, 9, 0.72) 44%, rgba(12, 10, 9, 0.34)),
        linear-gradient(180deg, rgba(12, 10, 9, 0.22), rgba(12, 10, 9, 0.94));
}

.hero-copy {
    position: relative;
    z-index: 2;
    width: min(680px, 100%);
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 70px clamp(24px, 6vw, 74px);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--amber-300);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 18px 0 18px;
    color: var(--stone-100);
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 620px;
    margin: 0 0 24px;
    color: var(--stone-300);
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 999px;
    color: var(--stone-200, #e7e5e4);
    background: rgba(41, 37, 36, 0.62);
    padding: 6px 11px;
    font-size: 13px;
}

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

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

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

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    box-shadow: 0 18px 40px rgba(217, 119, 6, 0.28);
}

.btn-ghost {
    border: 1px solid rgba(214, 211, 209, 0.22);
    color: var(--stone-100);
    background: rgba(41, 37, 36, 0.72);
}

.btn-ghost:hover {
    border-color: rgba(245, 158, 11, 0.45);
}

.btn-text {
    color: var(--amber-300);
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: clamp(24px, 6vw, 74px);
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(214, 211, 209, 0.32);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section,
.ranking-section,
.player-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 74px 0 0;
}

.ranking-section {
    width: 100%;
    margin-top: 74px;
    padding: 74px max(16px, calc((100% - 1180px) / 2)) 80px;
    background: linear-gradient(180deg, rgba(28, 25, 23, 0.58), rgba(12, 10, 9, 0.18));
    border-block: 1px solid rgba(68, 64, 60, 0.45);
}

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

.section-heading h2,
.section-heading h1 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p,
.category-card strong {
    max-width: 720px;
    color: var(--stone-400);
    margin: 8px 0 0;
}

.section-link {
    flex: none;
    color: var(--amber-300);
    font-weight: 700;
}

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

.small-grid,
.rank-grid {
    gap: 20px;
}

.movie-card {
    min-width: 0;
    border: 1px solid rgba(68, 64, 60, 0.6);
    border-radius: var(--radius-lg);
    background: rgba(28, 25, 23, 0.62);
    overflow: hidden;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(245, 158, 11, 0.38);
    background: rgba(41, 37, 36, 0.82);
}

.movie-card.is-hidden {
    display: none;
}

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

.poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-img {
    transform: scale(1.08);
    filter: brightness(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(12, 10, 9, 0.86));
    opacity: 0.9;
}

.play-badge,
.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.play-badge {
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: white;
    background: rgba(217, 119, 6, 0.9);
    box-shadow: 0 14px 34px rgba(217, 119, 6, 0.34);
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.year-badge {
    left: 10px;
    top: 10px;
    border-radius: 999px;
    color: white;
    background: rgba(12, 10, 9, 0.7);
    padding: 4px 9px;
    font-size: 12px;
}

.rank-badge {
    right: 10px;
    top: 10px;
    min-width: 34px;
    height: 34px;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    font-weight: 800;
}

.card-body {
    padding: 14px;
}

.card-title {
    display: block;
    overflow: hidden;
    color: var(--stone-100);
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-title:hover {
    color: var(--amber-300);
}

.card-meta,
.card-desc {
    margin: 5px 0 0;
    color: var(--stone-400);
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    min-height: 38px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    padding: 3px 8px;
    font-size: 12px;
}

.category-strip {
    margin-top: 42px;
    padding: 24px;
    border: 1px solid rgba(68, 64, 60, 0.55);
    border-radius: var(--radius-xl);
    background: rgba(28, 25, 23, 0.42);
}

.compact-heading {
    margin-bottom: 22px;
}

.compact-heading h2 {
    max-width: 780px;
    color: var(--stone-300);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 12% 12%, rgba(217, 119, 6, 0.18), transparent 22rem),
        radial-gradient(circle at 90% 30%, rgba(234, 88, 12, 0.12), transparent 24rem),
        rgba(28, 25, 23, 0.7);
    box-shadow: var(--shadow);
}

.slim-hero {
    padding: clamp(34px, 7vw, 76px);
}

.slim-hero h1 {
    max-width: 860px;
    margin: 10px 0 0;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.local-search {
    width: min(620px, 100%);
    margin-top: 28px;
}

.search-page-form {
    width: min(760px, 100%);
}

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

.category-card {
    display: grid;
    gap: 16px;
    min-height: 260px;
    border: 1px solid rgba(68, 64, 60, 0.6);
    border-radius: var(--radius-lg);
    background: rgba(28, 25, 23, 0.65);
    padding: 22px;
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.38);
}

.category-card-main {
    display: grid;
    gap: 8px;
}

.category-card-main span {
    color: var(--amber-300);
    font-size: 24px;
    font-weight: 800;
}

.category-card-links {
    display: grid;
    gap: 8px;
    align-content: end;
}

.category-card-links a {
    overflow: hidden;
    color: var(--stone-300);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 600px;
    margin-top: -1px;
    border-bottom: 1px solid rgba(68, 64, 60, 0.5);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(18px) brightness(0.52);
    transform: scale(1.08);
}

.detail-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 10, 9, 0.96), rgba(12, 10, 9, 0.78), rgba(12, 10, 9, 0.7)),
        linear-gradient(180deg, rgba(12, 10, 9, 0.25), var(--stone-950));
}

.detail-wrap {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 58px);
    align-items: center;
    padding: 56px 0;
}

.detail-poster-box {
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--stone-800);
    box-shadow: var(--shadow);
}

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

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

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

.detail-info h1 {
    margin: 18px 0 18px;
    font-size: clamp(36px, 6vw, 70px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 780px;
    margin: 0 0 22px;
    color: var(--stone-300);
    font-size: clamp(17px, 2vw, 22px);
}

.detail-tags {
    margin-top: 16px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(12, 10, 9, 0.24), rgba(12, 10, 9, 0.78));
    cursor: pointer;
}

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

.play-circle {
    display: inline-grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    box-shadow: 0 18px 44px rgba(217, 119, 6, 0.34);
    font-size: 30px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.story-card {
    border: 1px solid rgba(68, 64, 60, 0.6);
    border-radius: var(--radius-lg);
    background: rgba(28, 25, 23, 0.68);
    padding: clamp(22px, 4vw, 34px);
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.story-card p {
    margin: 0;
    color: var(--stone-300);
    font-size: 16px;
}

.site-footer {
    margin-top: 86px;
    border-top: 1px solid rgba(68, 64, 60, 0.65);
    background: rgba(12, 10, 9, 0.94);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 38px;
    padding: 46px 0 34px;
}

.footer-brand {
    font-size: 22px;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: var(--stone-100);
    font-size: 16px;
}

.site-footer p,
.site-footer a {
    display: block;
    color: var(--stone-400);
    font-size: 14px;
}

.site-footer a {
    margin-top: 7px;
}

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

.footer-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 34px;
    border-top: 1px solid rgba(68, 64, 60, 0.55);
    text-align: center;
}

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

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

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

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

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

    .detail-wrap {
        grid-template-columns: 200px minmax(0, 1fr);
    }

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

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

@media (max-width: 760px) {
    .nav-inner {
        height: 64px;
    }

    .brand-text {
        font-size: 19px;
    }

    .hero-section,
    .hero-frame {
        min-height: 560px;
    }

    .hero-copy {
        min-height: 560px;
        padding: 42px 22px 76px;
    }

    .hero-overlay {
        background:
            linear-gradient(180deg, rgba(12, 10, 9, 0.68), rgba(12, 10, 9, 0.96)),
            linear-gradient(90deg, rgba(12, 10, 9, 0.82), rgba(12, 10, 9, 0.46));
    }

    .hero-dots {
        left: 22px;
        bottom: 24px;
    }

    .section-heading {
        display: grid;
        gap: 12px;
    }

    .content-section,
    .ranking-section,
    .player-section {
        padding-top: 54px;
    }

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

    .category-grid {
        grid-template-columns: 1fr;
    }

    .detail-wrap {
        grid-template-columns: 1fr;
        align-items: start;
    }

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

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

@media (max-width: 430px) {
    .hero-copy h1,
    .hero-copy h2,
    .slim-hero h1,
    .detail-info h1 {
        letter-spacing: -0.035em;
    }

    .card-body {
        padding: 12px;
    }

    .hero-actions {
        display: grid;
    }

    .btn {
        width: 100%;
    }
}
