:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-bright: #cbd5e1;
    --emerald: #10b981;
    --emerald-light: #34d399;
    --teal: #14b8a6;
    --shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.22), transparent 34rem),
        radial-gradient(circle at top right, rgba(20, 184, 166, 0.16), transparent 30rem),
        linear-gradient(135deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(51, 65, 85, 0.7);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.78));
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1180px, 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: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--emerald-light), #5eead4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    color: #031a15;
    background: linear-gradient(135deg, var(--emerald-light), var(--teal));
    box-shadow: 0 14px 30px rgba(16, 185, 129, 0.28);
    font-size: 15px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 2px;
}

.desktop-nav a,
.mobile-nav a {
    padding: 10px 13px;
    border-radius: 999px;
    color: #cbd5e1;
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.12);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: white;
    background: rgba(30, 41, 59, 0.8);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
}

main {
    padding-top: 72px;
}

.hero-carousel {
    position: relative;
    min-height: calc(100vh - 72px);
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.36;
    transform: scale(1.04);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 44%, rgba(15, 23, 42, 0.28) 100%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.12), #0f172a 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: calc(100vh - 72px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
    align-items: center;
    gap: 54px;
    padding: 60px 0;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    padding: 7px 13px;
    border: 1px solid rgba(16, 185, 129, 0.32);
    border-radius: 999px;
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.12);
    font-size: 13px;
    font-weight: 700;
}

.hero-content h1 {
    margin: 22px 0 16px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #d1d5db;
    font-size: clamp(16px, 2vw, 20px);
}

.hero-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

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

.btn-primary {
    color: white;
    background: linear-gradient(90deg, var(--emerald), var(--teal));
    box-shadow: 0 18px 35px rgba(16, 185, 129, 0.28);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
    transform: translateY(-2px);
}

.btn-primary:hover {
    box-shadow: 0 24px 48px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.66);
}

.btn-ghost {
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
}

.hero-poster {
    position: relative;
    align-self: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 34px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.66);
    box-shadow: var(--shadow);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    opacity: 0.92;
    transition: transform 0.45s ease;
}

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

.hero-poster-meta {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
}

.hero-poster-meta strong {
    display: block;
    margin-bottom: 4px;
    font-size: 20px;
}

.hero-poster-meta span {
    color: #cbd5e1;
    font-size: 14px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 5;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-arrow,
.hero-dot {
    pointer-events: auto;
    cursor: pointer;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.62);
}

.hero-dot.is-active {
    width: 26px;
    background: #34d399;
}

.section,
.page-hero,
.detail-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 58px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.045em;
}

.section-head p,
.page-hero p,
.detail-title p {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted-bright);
}

.section-link {
    color: #6ee7b7;
    font-weight: 800;
}

.search-band {
    width: min(1180px, calc(100% - 32px));
    margin: -42px auto 0;
    position: relative;
    z-index: 8;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.search-form,
.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.filter-panel {
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 180px));
    margin-bottom: 24px;
}

.search-form input,
.filter-panel input,
.filter-panel select,
.search-page-controls input,
.search-page-controls select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
    outline: none;
    padding: 0 16px;
}

.search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-page-controls input:focus,
.search-page-controls select:focus {
    border-color: rgba(52, 211, 153, 0.72);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.13);
}

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

.category-tile {
    min-height: 160px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(20, 184, 166, 0.06)),
        rgba(15, 23, 42, 0.76);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.48);
}

.category-tile h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.category-tile p {
    margin: 0;
    color: var(--muted-bright);
    font-size: 14px;
}

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

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

.mini-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    background: #1e293b;
}

.mini-card span {
    overflow: hidden;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
    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.5);
    box-shadow: 0 26px 48px rgba(16, 185, 129, 0.12);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #1e293b;
}

.movie-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    opacity: 0.94;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .movie-poster {
    transform: scale(1.06);
    opacity: 1;
}

.quality-badge,
.year-badge,
.rank-mark {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.quality-badge {
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    color: #032014;
    background: #6ee7b7;
}

.year-badge {
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    color: white;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.rank-mark {
    top: 12px;
    right: 12px;
    min-width: 34px;
    height: 34px;
    color: white;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.3);
}

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

.movie-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #6ee7b7;
    font-size: 12px;
    font-weight: 800;
}

.movie-meta-row span + span::before {
    content: "•";
    margin-right: 8px;
    color: #64748b;
}

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

.movie-card p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted-bright);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-list span,
.info-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 999px;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.1);
    font-size: 12px;
    font-weight: 700;
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 260px);
    gap: 18px;
    overflow-x: auto;
    padding: 4px 0 18px;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.page-hero {
    padding: 80px 0 34px;
}

.page-hero-card {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), transparent 30rem),
        rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

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

.breadcrumb a {
    color: #6ee7b7;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 60px 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
}

.ranking-number {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    font-weight: 900;
}

.ranking-item img {
    width: 96px;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    object-fit: cover;
}

.ranking-item h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.ranking-item p {
    margin: 0;
    color: var(--muted-bright);
}

.detail-shell {
    padding: 46px 0 64px;
}

.detail-title {
    margin-bottom: 24px;
}

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

.player-card,
.detail-side,
.content-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
}

.player-wrap {
    position: relative;
    background: #020617;
}

.player-wrap video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
    outline: none;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.72));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 24px 52px rgba(16, 185, 129, 0.36);
    cursor: pointer;
    font-size: 34px;
}

.player-info {
    padding: 20px;
}

.player-info h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.player-info p {
    margin: 0;
    color: var(--muted-bright);
}

.detail-side {
    padding: 18px;
}

.detail-side img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 22px;
    object-fit: cover;
    margin-bottom: 18px;
}

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

.info-row {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    color: #e2e8f0;
}

.info-row span:first-child {
    color: var(--muted);
}

.content-card {
    margin-top: 28px;
    padding: 26px;
}

.content-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.content-card p {
    margin: 0 0 14px;
    color: #dbeafe;
}

.search-page-controls {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, 180px));
    gap: 12px;
    margin: 24px 0;
}

.empty-state {
    display: none;
    padding: 34px;
    border: 1px dashed rgba(148, 163, 184, 0.32);
    border-radius: 24px;
    color: var(--muted-bright);
    text-align: center;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.34);
}

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

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

.site-footer p {
    max-width: 520px;
    margin: 0;
    color: var(--muted-bright);
}

.site-footer h3 {
    margin: 0 0 14px;
}

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

.footer-links a {
    color: var(--muted-bright);
    font-size: 14px;
}

.footer-links a:hover {
    color: #6ee7b7;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

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

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .mobile-nav.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-content,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 420px;
    }

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

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

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

    main {
        padding-top: 64px;
    }

    .brand {
        font-size: 19px;
    }

    .hero-carousel,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        display: block;
        padding: 54px 0 110px;
    }

    .hero-poster {
        margin-top: 34px;
    }

    .hero-controls {
        bottom: 20px;
    }

    .section {
        padding: 42px 0;
    }

    .section-head,
    .ranking-item {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .section-head {
        display: grid;
    }

    .search-form,
    .filter-panel,
    .search-page-controls {
        grid-template-columns: 1fr;
    }

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

    .ranking-item img {
        width: 100%;
        max-width: 140px;
    }
}

@media (max-width: 520px) {
    .category-grid,
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .mobile-nav.is-open {
        grid-template-columns: 1fr;
    }

    .page-hero-card,
    .content-card {
        padding: 22px;
    }
}
