:root {
    --bg: #f8fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #1e3a8a;
    --brand-strong: #172554;
    --gold: #f59e0b;
    --cyan: #0891b2;
    --panel: #ffffff;
    --night: #020617;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.nav-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--brand-strong);
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    box-shadow: 0 14px 30px rgba(30, 58, 138, 0.28);
}

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

.nav-links a {
    padding: 10px 13px;
    border-radius: 999px;
    color: #334155;
    font-size: 15px;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--brand-strong);
    background: #eff6ff;
}

.header-search {
    width: min(280px, 28vw);
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.header-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 10px 14px;
    color: #0f172a;
}

.header-search button {
    border: 0;
    padding: 10px 15px;
    color: #ffffff;
    background: var(--brand);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 13px;
    color: #ffffff;
    background: var(--brand);
}

.main-offset {
    padding-top: 66px;
}

.hero {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(180deg, #020617 0%, #0f172a 54%, #111827 100%);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
    transform: scale(1.02);
}

.hero-slide img.is-missing {
    opacity: 0;
}

.hero-veil {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 20%, rgba(14, 165, 233, 0.28), transparent 38%), linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.82) 45%, rgba(15, 23, 42, 0.35) 100%), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 48%, rgba(2, 6, 23, 0.62) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    min-height: 590px;
    margin: 0 auto;
    padding: 74px 22px 70px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: end;
    gap: 42px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #dbeafe;
    font-size: 14px;
    font-weight: 800;
    backdrop-filter: blur(14px);
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.hero p {
    margin: 0;
    max-width: 720px;
    color: #cbd5e1;
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 26px;
}

.hero-meta span,
.meta-pill,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 800;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 900;
    transition: 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--gold), #f97316);
    box-shadow: 0 18px 35px rgba(245, 158, 11, 0.32);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 46px rgba(245, 158, 11, 0.38);
}

.btn-secondary {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.btn-light {
    color: var(--brand-strong);
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.hero-panel {
    align-self: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.48);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.36);
    backdrop-filter: blur(18px);
}

.hero-panel img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 22px;
    background: linear-gradient(135deg, #172554, #0891b2);
}

.hero-panel img.is-missing {
    opacity: 0;
}

.hero-search {
    display: flex;
    margin-top: 20px;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.hero-search input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 16px 18px;
    color: #0f172a;
}

.hero-search button {
    border: 0;
    padding: 0 20px;
    color: #ffffff;
    background: var(--brand);
    font-weight: 900;
}

.hero-controls {
    position: absolute;
    z-index: 3;
    right: 22px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 22px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    opacity: 0.65;
}

.hero-dot.active {
    width: 28px;
    opacity: 1;
    background: var(--gold);
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 22px;
}

.section {
    padding: 58px 0;
}

.section-dark {
    color: #ffffff;
    background: linear-gradient(180deg, #0f172a, #020617);
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: 950;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-dark .section-desc {
    color: #94a3b8;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    transition: 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.14);
}

.section-dark .movie-card {
    border-color: rgba(255, 255, 255, 0.1);
    background: #1e293b;
}

.poster-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.42), transparent 32%), linear-gradient(135deg, #172554, #0f172a 62%, #78350f);
}

.poster-shell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

.poster-shell img.is-missing {
    opacity: 0;
}

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

.type-pill,
.rank-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(10px);
}

.rank-pill {
    left: auto;
    right: 12px;
    background: linear-gradient(135deg, var(--gold), #ef4444);
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    margin: 0 0 8px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 950;
    color: #0f172a;
}

.section-dark .card-title {
    color: #f8fafc;
}

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

.section-dark .card-text {
    color: #cbd5e1;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.card-meta span {
    padding: 5px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.section-dark .card-meta span {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.08);
}

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

.channel-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    padding: 24px;
    border-radius: 26px;
    color: #ffffff;
    background: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.28), transparent 34%), linear-gradient(135deg, var(--brand), var(--cyan));
    box-shadow: 0 20px 56px rgba(30, 58, 138, 0.18);
    transition: 0.22s ease;
}

.channel-card:nth-child(2n) {
    background: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.25), transparent 34%), linear-gradient(135deg, #7c2d12, #f59e0b);
}

.channel-card:nth-child(3n) {
    background: radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.23), transparent 34%), linear-gradient(135deg, #312e81, #db2777);
}

.channel-card:hover {
    transform: translateY(-4px);
}

.channel-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 950;
}

.channel-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 52px 112px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.rank-no {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: var(--brand);
    font-weight: 950;
}

.rank-row img {
    width: 112px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 14px;
    background: linear-gradient(135deg, #172554, #0891b2);
}

.rank-row img.is-missing {
    opacity: 0;
}

.rank-row h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 950;
}

.rank-row p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.3), transparent 34%), linear-gradient(135deg, #172554, #0f172a 70%);
    padding: 70px 0 52px;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.05em;
    font-weight: 950;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: #cbd5e1;
    font-size: 17px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #bfdbfe;
    font-weight: 800;
    font-size: 14px;
}

.filter-panel {
    margin: -28px auto 34px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(140px, 1fr));
    gap: 12px;
}

.filter-row input,
.filter-row select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    outline: 0;
    padding: 0 13px;
    background: #f8fafc;
    color: #0f172a;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 360px;
    gap: 28px;
    align-items: start;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.25);
}

.player-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
    object-fit: cover;
}

.player-trigger {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
}

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

.play-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--gold), #f97316);
    box-shadow: 0 20px 42px rgba(245, 158, 11, 0.38);
    font-size: 30px;
}

.detail-panel,
.content-panel {
    border: 1px solid #e2e8f0;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.detail-panel {
    overflow: hidden;
}

.detail-panel img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: linear-gradient(135deg, #172554, #0891b2);
}

.detail-panel img.is-missing {
    opacity: 0;
}

.detail-panel-body {
    padding: 20px;
}

.detail-title {
    margin: 22px 0 14px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: 950;
}

.detail-intro {
    margin: 0 0 18px;
    color: #475569;
    font-size: 18px;
}

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

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
}

.info-list strong {
    color: #0f172a;
}

.content-panel {
    margin-top: 24px;
    padding: 26px;
}

.content-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 950;
}

.content-panel p {
    margin: 0 0 18px;
    color: #334155;
}

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

.tags .tag {
    color: #1e3a8a;
    background: #eff6ff;
}

.footer {
    padding: 42px 0;
    color: #cbd5e1;
    background: #020617;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 24px;
}

.footer h2,
.footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.footer p,
.footer a {
    color: #94a3b8;
}

.footer-links {
    display: grid;
    gap: 8px;
}

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

@media (max-width: 1024px) {
    .header-search {
        display: none;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-items: end;
    }

    .hero-panel {
        display: none;
    }

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

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

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

@media (max-width: 760px) {
    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 14px;
        right: 14px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid #e2e8f0;
        border-radius: 20px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

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

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

    .hero-content {
        padding-top: 56px;
        padding-bottom: 88px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-search {
        flex-direction: column;
        border-radius: 18px;
    }

    .hero-search button {
        width: 100%;
        padding: 13px;
    }

    .hero-controls {
        left: 22px;
        right: auto;
    }

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

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

    .filter-row {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 42px 96px minmax(0, 1fr);
        gap: 12px;
    }

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

@media (max-width: 480px) {
    .nav-shell,
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .movie-grid,
    .movie-grid.compact,
    .channel-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .section-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
