* {
    box-sizing: border-box;
}

:root {
    --bg: #071019;
    --panel: #0d1724;
    --panel-soft: #132234;
    --text: #f7fbff;
    --muted: #9fb1c7;
    --line: rgba(255, 255, 255, 0.12);
    --brand: #28d39f;
    --brand-dark: #0fa878;
    --gold: #ffcf5a;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: radial-gradient(circle at top left, rgba(40, 211, 159, 0.18), transparent 36%), var(--bg);
    color: var(--text);
    min-height: 100vh;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 16, 25, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #04120d;
    background: linear-gradient(135deg, var(--brand), #82ffd2);
    box-shadow: 0 10px 30px rgba(40, 211, 159, 0.28);
}

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

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

.nav-link,
.mobile-link {
    color: var(--muted);
    font-weight: 700;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
    padding: 10px 16px;
}

.mobile-link {
    padding: 14px 18px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--text);
    background: rgba(40, 211, 159, 0.14);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(13, 23, 36, 0.96);
}

.hero {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    background: #050b12;
}

.hero-slide {
    min-height: 78vh;
    display: none;
    align-items: center;
    position: relative;
}

.hero-slide.active {
    display: flex;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.42;
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(7, 16, 25, 0.95), rgba(7, 16, 25, 0.65), rgba(7, 16, 25, 0.18)), linear-gradient(0deg, var(--bg), transparent 45%);
}

.hero-content {
    position: relative;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 96px 0 120px;
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 16px 0;
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero h1 {
    max-width: 800px;
    font-size: clamp(42px, 7vw, 82px);
}

.hero h2 {
    margin: 0 0 12px;
    font-size: clamp(26px, 4vw, 44px);
}

.hero p,
.page-hero p,
.detail-summary {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

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

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

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

.btn.primary {
    color: #06130f;
    background: linear-gradient(135deg, var(--brand), #8affd7);
    box-shadow: 0 16px 32px rgba(40, 211, 159, 0.28);
}

.btn.ghost {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 36px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 38px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

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

.search-panel {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    margin: -42px auto 0;
}

.search-inner {
    display: grid;
    grid-template-columns: auto 1fr 220px;
    gap: 14px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(13, 23, 36, 0.92);
    box-shadow: var(--shadow);
}

.search-inner label {
    font-weight: 800;
}

.search-inner input,
.search-inner select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    padding: 0 16px;
    outline: none;
}

.section-block {
    width: min(1200px, calc(100% - 32px));
    margin: 72px auto;
}

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

.section-head span {
    display: block;
    color: var(--brand);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-head h2 {
    margin: 6px 0 0;
    font-size: clamp(28px, 4vw, 46px);
}

.section-head a {
    color: var(--brand);
    font-weight: 800;
}

.section-head.compact {
    display: block;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(40, 211, 159, 0.45);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, rgba(40, 211, 159, 0.18), rgba(255, 255, 255, 0.04));
}

.poster-link .score {
    position: absolute;
    right: 12px;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 30px;
    border-radius: 999px;
    color: #221500;
    background: var(--gold);
    font-weight: 900;
}

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

.movie-card h2,
.movie-card h3 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

.meta-line,
.movie-summary {
    color: var(--muted);
}

.meta-line {
    margin: 0 0 10px;
    font-size: 14px;
}

.movie-summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 14px;
    line-height: 1.7;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span {
    color: #bfffee;
    background: rgba(40, 211, 159, 0.12);
    border: 1px solid rgba(40, 211, 159, 0.18);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

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

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

.category-card {
    display: grid;
    gap: 12px;
    padding: 22px;
    min-height: 168px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(40, 211, 159, 0.14), rgba(255, 255, 255, 0.04));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(40, 211, 159, 0.45);
}

.category-name {
    font-size: 22px;
    font-weight: 900;
}

.category-desc {
    color: var(--muted);
    line-height: 1.7;
}

.category-count {
    color: var(--brand);
    font-weight: 800;
}

.ranking-box {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(13, 23, 36, 0.82);
    padding: 24px;
    align-self: start;
}

.ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ranking-list li + li {
    border-top: 1px solid var(--line);
}

.ranking-list a {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 15px 0;
}

.rank-number {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(40, 211, 159, 0.14);
    color: var(--brand);
    font-weight: 900;
}

.rank-title {
    font-weight: 800;
}

.rank-score {
    color: var(--gold);
    font-weight: 900;
}

.page-hero {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 84px 0 24px;
}

.page-hero.small h1 {
    font-size: clamp(40px, 6vw, 68px);
}

.detail-hero {
    width: min(1200px, calc(100% - 32px));
    margin: 48px auto 32px;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(40, 211, 159, 0.18), rgba(255, 255, 255, 0.04));
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    margin-bottom: 18px;
}

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

.detail-info h1 {
    font-size: clamp(42px, 7vw, 76px);
}

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

.detail-meta span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 13px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
}

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

.player-section {
    width: min(1200px, calc(100% - 32px));
    margin: 48px auto;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: var(--text);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18));
    cursor: pointer;
}

.player-start span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #06130f;
    background: linear-gradient(135deg, var(--brand), #8affd7);
    font-size: 36px;
    box-shadow: 0 18px 48px rgba(40, 211, 159, 0.28);
}

.player-wrap.playing .player-start {
    display: none;
}

.article-block {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(13, 23, 36, 0.72);
    padding: 28px;
}

.article-block h2 {
    margin: 0 0 14px;
    font-size: 30px;
}

.article-block p {
    margin: 0;
    color: var(--muted);
    line-height: 2;
    font-size: 17px;
}

.pager-block {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.pager-block a {
    flex: 1;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--brand);
    font-weight: 800;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(5, 11, 18, 0.72);
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p {
    max-width: 680px;
    color: var(--muted);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

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

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

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

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

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

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

    .menu-toggle {
        display: block;
    }

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

    .hero,
    .hero-slide {
        min-height: 72vh;
    }

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

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

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

    .detail-cover {
        max-width: 360px;
    }
}

@media (max-width: 560px) {
    .header-inner {
        min-height: 64px;
    }

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

    .hero-content {
        padding: 78px 0 100px;
    }

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

    .section-head,
    .footer-inner,
    .pager-block {
        flex-direction: column;
        align-items: stretch;
    }

    .player-start span {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
