:root {
    --bg: #06111f;
    --bg-soft: #0c1d31;
    --card: rgba(255, 255, 255, 0.075);
    --card-strong: rgba(255, 255, 255, 0.12);
    --text: #f7fbff;
    --muted: #9fb1c8;
    --line: rgba(255, 255, 255, 0.14);
    --brand: #14b8a6;
    --brand-2: #2563eb;
    --gold: #fbbf24;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 10%, rgba(20, 184, 166, 0.22), transparent 30rem),
        radial-gradient(circle at 85% 0%, rgba(37, 99, 235, 0.22), transparent 28rem),
        linear-gradient(180deg, #07121f 0%, #0b1421 45%, #07111d 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(6, 17, 31, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 34px rgba(20, 184, 166, 0.34);
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.top-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.top-search input {
    width: 210px;
    color: white;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 8px 10px;
}

.top-search input::placeholder,
.filter-input::placeholder,
.global-search-input::placeholder {
    color: rgba(223, 235, 255, 0.55);
}

.top-search button,
.btn {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
}

.top-search button {
    padding: 8px 16px;
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

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

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
}

.hero-carousel {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    min-height: 650px;
    margin: 30px auto 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #081522;
    box-shadow: var(--shadow);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.12) contrast(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 13, 24, 0.96) 0%, rgba(5, 13, 24, 0.77) 42%, rgba(5, 13, 24, 0.2) 100%),
        linear-gradient(0deg, rgba(5, 13, 24, 0.94) 0%, transparent 52%);
}

.hero-content {
    position: relative;
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 48px;
    padding: 74px 70px 116px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #8ee8de;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 14px 0 18px;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-info .lead {
    max-width: 760px;
    margin: 0;
    color: #d7e5f5;
    font-size: 18px;
}

.hero-tags,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0;
}

.hero-tags span,
.detail-meta span,
.mini-tags span,
.tag-cloud span {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.08);
}

.hero-tags span,
.detail-meta span {
    padding: 7px 12px;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.25);
}

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

.hero-poster {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 28px;
    transform: rotate(2deg);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.52);
}

.hero-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    left: 42px;
    right: 42px;
    bottom: 28px;
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 14px;
}

.hero-prev,
.hero-next {
    width: 44px;
    height: 44px;
    color: white;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

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

.hero-thumb {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px;
    color: #dbeafe;
    border: 1px solid transparent;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.hero-thumb.active {
    border-color: rgba(20, 184, 166, 0.8);
    background: rgba(20, 184, 166, 0.14);
}

.hero-thumb img {
    width: 42px;
    height: 56px;
    flex: 0 0 auto;
    border-radius: 10px;
    object-fit: cover;
}

.hero-thumb span {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 800;
}

.quick-panel,
.content-section,
.page-main,
.detail-main,
.site-footer {
    width: min(1280px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.quick-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.quick-panel a {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.07);
}

.quick-panel strong,
.quick-panel span {
    display: block;
}

.quick-panel strong {
    font-size: 20px;
}

.quick-panel span {
    margin-top: 4px;
    color: var(--muted);
}

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

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

.section-head h2 {
    margin: 8px 0 4px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.055));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(20, 184, 166, 0.45);
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.07);
}

.poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: rgba(20, 184, 166, 0.88);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.rank-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #111827;
    background: linear-gradient(135deg, #fef3c7, var(--gold));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.card-body {
    padding: 14px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
}

.card-body h3 {
    min-height: 3.3em;
    margin: 8px 0 6px;
    font-size: 17px;
    line-height: 1.35;
}

.card-body p {
    min-height: 4.8em;
    margin: 0 0 10px;
    color: #b7c7dc;
    font-size: 13px;
}

.mini-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mini-tags span {
    padding: 3px 8px;
    font-size: 12px;
}

.card-compact .card-body p {
    display: none;
}

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

.category-card {
    display: block;
    overflow: hidden;
    min-height: 260px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.075);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(20, 184, 166, 0.5);
}

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

.category-covers img {
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
}

.category-card div:last-child {
    padding: 0 18px 18px;
}

.category-card h3 {
    margin: 8px 0 6px;
    font-size: 21px;
}

.category-card p,
.category-card span {
    color: var(--muted);
}

.page-main,
.detail-main {
    padding: 32px 0 70px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 64px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(37, 99, 235, 0.18)),
        rgba(255, 255, 255, 0.065);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 900px;
}

.page-hero p {
    margin-bottom: 28px;
}

.filters-bar,
.search-panel {
    margin: 24px 0;
    padding: 14px;
    display: flex;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.07);
}

.filter-input,
.sort-select,
.global-search-input {
    min-height: 48px;
    color: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(3, 9, 18, 0.36);
    outline: 0;
    padding: 0 14px;
}

.filter-input {
    flex: 1;
}

.sort-select {
    width: 210px;
}

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

.channel-block {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.07);
}

.channel-visual {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.channel-visual img {
    height: 94px;
    border-radius: 12px;
    object-fit: cover;
}

.channel-body span {
    color: var(--brand);
    font-weight: 900;
}

.channel-body h2 {
    margin: 6px 0;
}

.channel-body p {
    color: var(--muted);
}

.channel-sample {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.channel-sample a {
    padding: 5px 9px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.09);
}

.search-panel {
    display: block;
}

.site-search-form {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.global-search-input {
    flex: 1;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 4px 0 18px;
    color: var(--muted);
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(37, 99, 235, 0.14)),
        rgba(255, 255, 255, 0.065);
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

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

.detail-info h1 {
    font-size: clamp(34px, 5vw, 62px);
}

.tag-cloud span {
    padding: 7px 12px;
}

.player-section {
    margin: 26px 0;
}

.player-box {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

.video-el {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: white;
    border: 0;
    background: radial-gradient(circle at center, rgba(20, 184, 166, 0.22), rgba(0, 0, 0, 0.42));
    cursor: pointer;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
    font-size: 32px;
}

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

.player-box.ready .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.detail-content article {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.07);
}

.detail-content h2 {
    margin-top: 0;
}

.detail-content p {
    color: #d0deef;
}

.site-footer {
    margin-top: 70px;
    margin-bottom: 24px;
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.07);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1.2fr;
    gap: 28px;
}

.footer-logo {
    margin-bottom: 12px;
}

.site-footer p,
.site-footer a {
    color: var(--muted);
}

.site-footer h3 {
    margin-top: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.footer-links a {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.empty-results {
    grid-column: 1 / -1;
    padding: 28px;
    color: var(--muted);
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
}

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

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

    .top-search {
        display: none;
    }
}

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

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

    .mobile-nav.open {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 46px 24px 140px;
    }

    .hero-poster {
        display: none;
    }

    .hero-controls {
        left: 18px;
        right: 18px;
        grid-template-columns: 38px 1fr 38px;
    }

    .hero-thumbs {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-thumb:nth-child(n + 4) {
        display: none;
    }

    .quick-panel,
    .detail-content,
    .footer-grid,
    .channel-list {
        grid-template-columns: 1fr;
    }

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

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

    .page-hero {
        padding: 36px 24px;
    }
}

@media (max-width: 640px) {
    .header-inner {
        width: min(100% - 20px, 1280px);
    }

    .hero-carousel,
    .quick-panel,
    .content-section,
    .page-main,
    .detail-main,
    .site-footer {
        width: min(100% - 20px, 1280px);
    }

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

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

    .filters-bar,
    .site-search-form {
        flex-direction: column;
    }

    .sort-select {
        width: 100%;
    }

    .channel-block {
        grid-template-columns: 1fr;
    }

    .card-body h3 {
        min-height: auto;
        font-size: 15px;
    }

    .card-body p {
        display: none;
    }
}
