:root {
    color-scheme: dark;
    --bg: #100c09;
    --bg-soft: #1b130f;
    --bg-card: rgba(34, 24, 18, 0.82);
    --bg-card-strong: rgba(45, 31, 23, 0.94);
    --earth: #b98252;
    --earth-deep: #8a5f3e;
    --canyon: #c65d32;
    --gold: #f1c27d;
    --text: #fff8ed;
    --muted: #d8c2aa;
    --line: rgba(255, 255, 255, 0.12);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(198, 93, 50, 0.22), transparent 36rem),
        radial-gradient(circle at 80% 5%, rgba(185, 130, 82, 0.16), transparent 32rem),
        linear-gradient(135deg, #0f0b08 0%, #1a120e 45%, #22130d 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid var(--line);
    background: rgba(16, 12, 9, 0.78);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 24px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--canyon), var(--gold));
    color: #1a0f08;
    box-shadow: 0 10px 28px rgba(198, 93, 50, 0.32);
}

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

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 15px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.11);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 4px;
    background: currentColor;
}

main {
    overflow: hidden;
}

.section,
.page-hero,
.hero-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px;
}

.hero-section {
    position: relative;
    min-height: 70vh;
    display: grid;
    align-items: center;
}

.hero-stage {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(55, 38, 28, 0.96), rgba(28, 18, 12, 0.96));
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
    gap: 30px;
    align-items: center;
    padding: clamp(32px, 6vw, 72px);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.24;
    background-size: cover;
    background-position: center;
    filter: blur(2px) saturate(1.08);
}

.hero-slide::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(12, 8, 5, 0.92), rgba(12, 8, 5, 0.62), rgba(12, 8, 5, 0.88)),
        radial-gradient(circle at 80% 30%, rgba(241, 194, 125, 0.12), transparent 24rem);
}

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

.kicker,
.movie-meta,
.eyebrow {
    margin: 0 0 12px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.section-title h2,
.detail-main h1 {
    margin: 0;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-content h1 {
    max-width: 760px;
    font-size: clamp(40px, 6vw, 76px);
}

.hero-content p {
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 22px);
}

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

.btn,
.search-box button,
.play-choice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.09);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn.primary,
.play-choice.active {
    border-color: rgba(241, 194, 125, 0.38);
    background: linear-gradient(135deg, var(--canyon), var(--earth));
    color: #1b1009;
}

.btn:hover,
.search-box button:hover,
.play-choice:hover {
    transform: translateY(-2px);
    border-color: rgba(241, 194, 125, 0.42);
    background: rgba(255, 255, 255, 0.15);
}

.btn.primary:hover {
    background: linear-gradient(135deg, #d66b3d, #f0b671);
}

.hero-poster {
    align-self: stretch;
    display: grid;
    align-items: center;
}

.hero-poster a {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    max-height: 470px;
    border-radius: 28px;
    box-shadow: 0 30px 72px rgba(0, 0, 0, 0.42);
}

.hero-poster img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.hero-poster a:hover img {
    transform: scale(1.06);
}

.hero-controls {
    position: absolute;
    left: clamp(32px, 6vw, 72px);
    bottom: 32px;
    z-index: 6;
    display: flex;
    gap: 10px;
}

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

.hero-dot.active {
    background: var(--gold);
}

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

.section-title h2,
.page-hero h1 {
    font-size: clamp(30px, 4vw, 48px);
}

.section-title p,
.page-hero p,
.detail-lead {
    margin: 10px 0 0;
    color: var(--muted);
}

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

.movie-card,
.category-card,
.rank-item,
.info-panel,
.recommend-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-item:hover,
.recommend-card:hover {
    transform: translateY(-5px);
    border-color: rgba(241, 194, 125, 0.34);
    background: var(--bg-card-strong);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 12px 12px;
    background: rgba(255, 255, 255, 0.05);
}

.poster-link img,
.rank-cover img,
.detail-poster img,
.recommend-card img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.36s ease;
}

.movie-card:hover .poster-link img,
.rank-item:hover .rank-cover img,
.recommend-card:hover img {
    transform: scale(1.05);
}

.poster-badge,
.poster-year {
    position: absolute;
    top: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(13, 9, 6, 0.74);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.poster-badge {
    left: 12px;
}

.poster-year {
    right: 12px;
    color: var(--gold);
}

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

.movie-card h3,
.rank-content h3,
.recommend-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.3;
}

.movie-card h3 a:hover,
.rank-content h3 a:hover,
.compact-link:hover span {
    color: var(--gold);
}

.movie-one-line,
.rank-content p,
.category-card p,
.info-panel p,
.recommend-card p {
    margin: 0;
    color: var(--muted);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-list span {
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: #ecd1b4;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.06);
}

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

.category-card {
    padding: 24px;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-links {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.compact-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.compact-link em {
    color: var(--gold);
    font-style: normal;
    font-size: 13px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 92px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(241, 194, 125, 0.12);
    color: var(--gold);
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
}

.rank-content span {
    display: block;
    margin-top: 8px;
    color: var(--gold);
    font-size: 13px;
}

.search-panel {
    display: grid;
    gap: 10px;
    margin: 0 0 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
}

.search-panel label {
    color: var(--gold);
    font-weight: 800;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    outline: none;
    background: rgba(0, 0, 0, 0.22);
    color: var(--text);
}

.search-box input:focus {
    border-color: rgba(241, 194, 125, 0.42);
    box-shadow: 0 0 0 3px rgba(241, 194, 125, 0.1);
}

.page-hero {
    padding-top: 70px;
    padding-bottom: 28px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
    gap: 32px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.detail-main h1 {
    font-size: clamp(36px, 5vw, 64px);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 0;
}

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #f4d5b6;
}

.player-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #050403;
    box-shadow: var(--shadow);
}

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

.video-wrap video {
    width: 100%;
    height: 100%;
    background: #050403;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(180deg, rgba(5, 4, 3, 0.1), rgba(5, 4, 3, 0.7));
    color: var(--text);
    cursor: pointer;
}

.play-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--canyon), var(--gold));
    color: #190f09;
    font-size: 34px;
    font-weight: 900;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

.player-shell.is-playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.playlist {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
    gap: 26px;
}

.info-panel {
    padding: 24px;
}

.info-panel h2,
.info-panel h3 {
    margin: 0 0 12px;
}

.info-panel + .info-panel {
    margin-top: 18px;
}

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

.recommend-card {
    overflow: hidden;
}

.recommend-card a:first-child {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.recommend-card div {
    padding: 14px;
}

.hidden-by-search {
    display: none !important;
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: rgba(12, 8, 5, 0.6);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 24px;
    color: var(--muted);
}

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

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

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

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

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

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 280px;
    }
}

@media (max-width: 820px) {
    .header-inner {
        padding: 14px 18px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 14px;
        right: 14px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(18, 12, 8, 0.96);
        box-shadow: var(--shadow);
    }

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

    .main-nav a {
        border-radius: 14px;
    }

    .hero-section,
    .section,
    .page-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-stage {
        min-height: 720px;
        border-radius: 26px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 28px;
    }

    .hero-poster a {
        max-height: 310px;
        max-width: 230px;
    }

    .movie-grid,
    .rank-list,
    .recommend-grid,
    .content-grid,
    .detail-hero {
        grid-template-columns: 1fr;
    }

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

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

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

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

    .movie-one-line,
    .tag-list {
        display: none;
    }

    .search-box {
        flex-direction: column;
    }
}
