:root {
    color-scheme: dark;
    --bg: #030712;
    --panel: #111827;
    --panel-soft: rgba(17, 24, 39, 0.72);
    --line: #1f2937;
    --muted: #9ca3af;
    --text: #f9fafb;
    --accent: #10b981;
    --accent-strong: #34d399;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.15), transparent 34%), var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(31, 41, 55, 0.9);
    background: rgba(3, 7, 18, 0.88);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), #065f46);
    color: #ffffff;
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.26);
}

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

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #d1d5db;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(16, 185, 129, 0.16);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.9);
}

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

.hero-slider {
    position: relative;
    min-height: 620px;
    height: 76vh;
    overflow: hidden;
    background: #000000;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3, 7, 18, 0.96) 0%, rgba(3, 7, 18, 0.7) 38%, rgba(3, 7, 18, 0.2) 100%), linear-gradient(0deg, var(--bg), transparent 36%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    padding-top: 42px;
}

.hero-copy {
    max-width: 720px;
}

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

.hero-copy h1,
.hero-copy h2 {
    margin: 16px 0 18px;
    font-size: clamp(42px, 8vw, 86px);
    line-height: 0.96;
    letter-spacing: -0.06em;
    font-weight: 900;
}

.hero-copy p {
    max-width: 660px;
    color: #d1d5db;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-tags,
.tag-row,
.meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.meta-row span {
    display: inline-flex;
    padding: 6px 10px;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: #d1fae5;
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.section-link,
.form-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 18px 42px rgba(16, 185, 129, 0.22);
}

.ghost-btn,
.section-link {
    border: 1px solid rgba(209, 213, 219, 0.18);
    background: rgba(17, 24, 39, 0.58);
    color: #f3f4f6;
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.form-button:hover {
    transform: translateY(-2px);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.hero-dot.is-active {
    width: 34px;
    background: var(--accent);
    border-color: var(--accent);
}

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 4;
    transform: translateX(-50%);
}

.hero-search-box {
    display: flex;
    max-width: 720px;
    padding: 8px;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 18px;
    background: rgba(3, 7, 18, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-search-box input,
.filter-panel input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #ffffff;
}

.hero-search-box input {
    padding: 0 16px;
    font-size: 16px;
}

.hero-search-box button,
.form-button {
    border: 0;
    background: var(--accent);
    color: #ffffff;
}

.hero-search-box button {
    min-width: 96px;
    border-radius: 12px;
    font-weight: 800;
}

.page-main {
    padding: 64px 0;
}

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

.content-section.soft {
    background: rgba(17, 24, 39, 0.3);
}

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

.section-title > span {
    writing-mode: vertical-rl;
    color: var(--accent-strong);
    font-weight: 800;
    letter-spacing: 0.18em;
}

.section-title h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

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

.movie-card {
    min-width: 0;
    border: 1px solid rgba(31, 41, 55, 0.95);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(17, 24, 39, 0.82);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.75);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.92), transparent);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--accent);
    color: #ffffff;
    font-size: 14px;
}

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

.movie-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--accent-strong);
    font-size: 12px;
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 800;
}

.movie-card p {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

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

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

.category-tile {
    position: relative;
    min-height: 220px;
    border: 1px solid rgba(31, 41, 55, 0.95);
    border-radius: 22px;
    overflow: hidden;
    background: var(--panel);
    box-shadow: var(--shadow);
}

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

.category-tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.08));
}

.category-tile strong,
.category-tile small {
    position: relative;
    display: block;
    padding: 0 20px;
}

.category-tile strong {
    margin-top: 126px;
    font-size: 24px;
    font-weight: 900;
}

.category-tile small {
    margin-top: 8px;
    padding-bottom: 20px;
    color: #d1d5db;
    line-height: 1.7;
}

.ranking-layout {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 24px;
}

.ranking-list {
    display: grid;
    gap: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: 52px 78px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.76);
}

.rank-row b {
    color: var(--accent-strong);
    font-size: 20px;
}

.rank-row img {
    width: 78px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.rank-row h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-row p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.aside-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 22px;
    background: rgba(17, 24, 39, 0.76);
    align-self: start;
    position: sticky;
    top: 96px;
}

.aside-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.compact-stack {
    display: grid;
    gap: 12px;
}

.compact-card {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
}

.compact-card img {
    width: 58px;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
    background: #111827;
    transition: transform 0.2s ease;
}

.compact-card strong,
.compact-card small {
    display: block;
}

.compact-card small {
    margin-top: 4px;
    color: var(--muted);
}

.page-title {
    margin-bottom: 32px;
}

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

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

.filter-panel {
    margin: 0 0 28px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.74);
}

.filter-panel input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(55, 65, 81, 0.95);
    border-radius: 14px;
    background: rgba(3, 7, 18, 0.74);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.filter-buttons button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.08);
    color: #d1fae5;
}

.filter-buttons button:hover {
    background: rgba(16, 185, 129, 0.18);
}

.detail-hero {
    padding: 40px 0 64px;
    background: radial-gradient(circle at 70% 10%, rgba(16, 185, 129, 0.14), transparent 32%);
}

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

.player-card,
.detail-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(17, 24, 39, 0.72);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.68), rgba(3, 7, 18, 0.2));
    color: #ffffff;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 18px 48px rgba(16, 185, 129, 0.28);
    font-size: 34px;
    padding-left: 5px;
}

.play-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.detail-title {
    padding: 24px;
}

.detail-title h1 {
    margin-top: 10px;
}

.detail-card {
    padding: 24px;
}

.detail-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-card p {
    margin: 0 0 18px;
    color: #d1d5db;
    line-height: 1.9;
}

.detail-cover {
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #111827;
}

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

.hide-card {
    display: none !important;
}

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

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

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

    .aside-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(3, 7, 18, 0.96);
        box-shadow: var(--shadow);
    }

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

    .hero-slider {
        min-height: 680px;
        height: auto;
    }

    .hero-content {
        align-items: flex-start;
        padding-top: 108px;
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 42px;
    }

    .hero-search {
        bottom: 24px;
    }

    .hero-search-box {
        flex-direction: column;
        gap: 8px;
    }

    .hero-search-box input {
        min-height: 44px;
    }

    .hero-search-box button {
        min-height: 44px;
    }

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

    .section-title > span {
        writing-mode: horizontal-tb;
    }

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

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

    .rank-row {
        grid-template-columns: 42px 62px 1fr;
    }

    .rank-row .primary-btn {
        grid-column: 3;
        width: max-content;
    }
}
