:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.72);
    --panel-light: rgba(30, 41, 59, 0.82);
    --line: #1e293b;
    --text: #ffffff;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #10b981;
    --accent-strong: #059669;
    --accent-soft: rgba(16, 185, 129, 0.18);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 18% 8%, rgba(16, 185, 129, 0.12), transparent 34%), var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
}

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

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.08);
    color: white;
    font-size: 13px;
}

.brand-name {
    font-size: 21px;
}

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

.nav-link,
.mobile-link {
    color: var(--soft);
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 8px;
    border: 0;
    background: transparent;
    color: var(--text);
}

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

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel-inner {
    display: grid;
    gap: 12px;
    padding: 18px 0;
}

.mobile-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding-top: 8px;
}

.site-main {
    min-height: 70vh;
}

.hero-slider,
.category-hero,
.detail-hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #000;
}

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

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

.hero-bg,
.category-hero img,
.detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay,
.category-hero-overlay,
.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.74) 36%, rgba(2, 6, 23, 0.12) 100%),
        linear-gradient(to right, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.18));
}

.hero-content,
.category-hero-content,
.detail-hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: var(--container);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin-bottom: 18px;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 999px;
    background: var(--accent-soft);
    color: #6ee7b7;
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1,
.category-hero-content h1,
.detail-hero-content h1,
.page-hero h1 {
    max-width: 780px;
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-content p,
.category-hero-content p,
.detail-hero-content p,
.page-hero p {
    max-width: 720px;
    margin: 0 0 24px;
    color: var(--soft);
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.hero-meta span {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--soft);
    font-size: 13px;
}

.hero-actions,
.filter-controls,
.quick-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.primary-button,
.ghost-button,
.block-button,
.quick-search button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.block-button,
.quick-search button {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: white;
}

.primary-button:hover,
.block-button:hover,
.quick-search button:hover {
    transform: translateY(-1px);
    background: var(--accent-strong);
}

.ghost-button {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text);
}

.ghost-button:hover {
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.55);
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

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

.search-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: -38px;
    padding: 22px;
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.search-strip strong {
    display: block;
    font-size: 20px;
}

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

input,
select {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    outline: none;
    background: rgba(2, 6, 23, 0.72);
    color: var(--text);
}

input:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.content-section {
    padding: 64px 0 0;
}

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

.section-heading h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.section-heading h2 span {
    width: 5px;
    height: 32px;
    border-radius: 999px;
    background: var(--accent);
}

.section-heading p {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius-lg);
    background: var(--panel-soft);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(30, 41, 59, 0.82);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #064e3b);
}

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

.movie-card:hover .poster-link img {
    transform: scale(1.06);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.82), transparent 55%);
}

.play-badge,
.duration-badge {
    position: absolute;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.play-badge {
    left: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: rgba(16, 185, 129, 0.9);
}

.duration-badge {
    right: 10px;
    bottom: 12px;
    padding: 6px 9px;
    background: rgba(2, 6, 23, 0.82);
    color: var(--soft);
}

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

.movie-card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card-body h3 a:hover,
.ranking-info h2 a:hover,
.search-row h2 a:hover,
.category-overview-card h2 a:hover {
    color: var(--accent);
}

.meta-line {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
}

.movie-desc {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--soft);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    font-size: 12px;
}

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

.is-compact .movie-desc {
    display: none;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
    align-items: start;
}

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

.category-tile,
.category-overview-card,
.editor-card,
.rank-item,
.search-row,
.ranking-row,
.text-page-card,
.detail-main-card,
.detail-side-card,
.filter-panel {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius-lg);
    background: var(--panel-soft);
}

.category-tile {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover,
.editor-card:hover,
.rank-item:hover,
.search-row:hover,
.ranking-row:hover {
    border-color: rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
}

.category-covers,
.overview-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.category-covers img,
.overview-covers img {
    width: 100%;
    height: 118px;
    object-fit: cover;
    border-radius: 9px;
}

.category-tile h3,
.category-overview-card h2,
.ranking-info h2,
.search-row h2 {
    margin: 0 0 8px;
}

.category-tile p,
.category-overview-card p,
.ranking-info p,
.search-row p {
    margin: 0 0 10px;
    color: var(--soft);
}

.category-tile span {
    color: #6ee7b7;
    font-weight: 800;
}

.side-column {
    position: sticky;
    top: 92px;
}

.rank-list,
.side-recommend-list {
    display: grid;
    gap: 10px;
}

.rank-item {
    display: grid;
    grid-template-columns: 38px 54px minmax(0, 1fr) 42px;
    gap: 12px;
    align-items: center;
    padding: 10px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
}

.rank-index {
    color: #6ee7b7;
    font-weight: 900;
}

.rank-text strong,
.rank-text em {
    display: block;
}

.rank-text strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-text em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.rank-score {
    color: var(--accent);
    font-weight: 900;
    text-align: right;
}

.block-button {
    width: 100%;
    margin-top: 14px;
}

.editor-section {
    padding-bottom: 40px;
}

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

.editor-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.editor-card img {
    width: 92px;
    height: 124px;
    object-fit: cover;
    border-radius: 10px;
}

.editor-card strong,
.editor-card em {
    display: block;
}

.editor-card strong {
    margin: 8px 0;
    font-size: 17px;
}

.editor-card em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

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

.page-hero {
    padding: 48px;
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 70% 0%, rgba(16, 185, 129, 0.18), transparent 35%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.9));
    box-shadow: var(--shadow);
}

.compact-hero h1 {
    font-size: clamp(32px, 5vw, 52px);
}

.category-overview-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.overview-covers {
    grid-template-columns: repeat(2, 1fr);
}

.overview-covers img {
    height: 120px;
}

.filter-panel {
    margin-top: 32px;
    padding: 20px;
}

.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.filter-title h2 {
    margin: 0;
}

.filter-title span,
.empty-hint {
    color: var(--muted);
}

.filter-controls input {
    flex: 1 1 320px;
}

.empty-hint {
    display: none;
    padding: 40px 0;
    text-align: center;
}

.empty-hint.is-visible {
    display: block;
}

.ranking-list,
.search-list {
    display: grid;
    gap: 14px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 88px 70px minmax(0, 1fr) 90px;
    gap: 18px;
    align-items: center;
    padding: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-poster img {
    width: 88px;
    height: 124px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-index {
    color: #6ee7b7;
    font-size: 24px;
    font-weight: 900;
}

.ranking-score {
    text-align: center;
}

.ranking-score strong {
    display: block;
    color: var(--accent);
    font-size: 28px;
}

.ranking-score span {
    color: var(--muted);
    font-size: 13px;
}

.search-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 16px;
    padding: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.search-row img {
    width: 82px;
    height: 112px;
    object-fit: cover;
    border-radius: 10px;
}

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

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

.player-section {
    margin-top: -64px;
    position: relative;
    z-index: 3;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.26);
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    border: 0;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.18), rgba(2, 6, 23, 0.62));
    color: var(--text);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 12px rgba(16, 185, 129, 0.14);
}

.player-overlay strong {
    font-size: 20px;
}

.player-wrap.is-playing .player-overlay {
    visibility: hidden;
    opacity: 0;
}

.player-message {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 12px;
    margin: 0;
    color: var(--soft);
    font-size: 13px;
    text-align: center;
    pointer-events: none;
}

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

.detail-main-card,
.detail-side-card,
.text-page-card {
    padding: 26px;
}

.detail-main-card h2,
.detail-side-card h2 {
    margin: 0 0 16px;
}

.detail-main-card p,
.text-page-card p {
    margin: 0 0 20px;
    color: var(--soft);
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 20px;
}

.info-list div {
    padding: 12px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.42);
}

.info-list dt {
    color: var(--muted);
    font-size: 13px;
}

.info-list dd {
    margin: 4px 0 0;
}

.info-list a:hover {
    color: var(--accent);
}

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

.text-link {
    min-height: auto;
    padding: 0;
    color: var(--accent);
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.76);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

.footer-about p,
.footer-list a,
.footer-bottom p {
    color: var(--muted);
}

.footer-brand {
    margin-bottom: 14px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-list a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding: 16px 0 28px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
}

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

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

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

    .side-column,
    .detail-side-card {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero-slider,
    .category-hero,
    .detail-hero {
        height: 540px;
    }

    .hero-content,
    .category-hero-content,
    .detail-hero-content {
        justify-content: flex-end;
        padding-bottom: 74px;
    }

    .search-strip,
    .section-heading,
    .filter-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .quick-search,
    .quick-search input,
    .quick-search button {
        width: 100%;
    }

    .movie-grid,
    .small-grid,
    .category-grid,
    .category-overview-grid,
    .editor-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .category-overview-card,
    .ranking-row {
        grid-template-columns: 1fr;
    }

    .ranking-score {
        text-align: left;
    }

    .page-hero,
    .detail-main-card,
    .detail-side-card,
    .text-page-card {
        padding: 24px;
    }

    .info-list {
        grid-template-columns: 1fr;
    }
}

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

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

    .hero-content h1,
    .category-hero-content h1,
    .detail-hero-content h1,
    .page-hero h1 {
        font-size: 32px;
    }

    .hero-content p,
    .category-hero-content p,
    .detail-hero-content p,
    .page-hero p {
        font-size: 16px;
    }

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

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

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

    .tag-row {
        display: none;
    }

    .category-tile,
    .editor-card,
    .search-row,
    .rank-item {
        grid-template-columns: 1fr;
    }

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

    .rank-item img,
    .search-row img,
    .editor-card img {
        width: 100%;
        height: 180px;
    }
}
