:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --blue: #38bdf8;
    --green: #34d399;
    --orange: #fb923c;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background:
        radial-gradient(circle at 15% 8%, rgba(34, 211, 238, 0.16), transparent 30%),
        radial-gradient(circle at 80% 0%, rgba(56, 189, 248, 0.12), transparent 26%),
        linear-gradient(180deg, #0f172a 0%, #111827 48%, #0f172a 100%);
}

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

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

button,
input {
    font: inherit;
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
    padding: 16px 28px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #06202b;
    background: linear-gradient(135deg, var(--cyan), var(--green));
    box-shadow: 0 10px 34px rgba(34, 211, 238, 0.32);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #cbd5e1;
}

.main-nav a,
.nav-dropdown button,
.mobile-panel a {
    border: 0;
    color: #cbd5e1;
    background: transparent;
    transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.nav-dropdown button:hover,
.mobile-panel a:hover {
    color: var(--cyan);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    display: grid;
    min-width: 180px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.dropdown-panel a {
    padding: 10px 12px;
    border-radius: 12px;
}

.dropdown-panel a:hover,
.dropdown-panel a.active {
    background: rgba(34, 211, 238, 0.1);
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-panel {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 20px 18px;
}

.mobile-panel.open {
    display: grid;
}

.mobile-panel a {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.hero-wrap {
    padding: 26px 28px 0;
}

.hero-shell {
    position: relative;
    min-height: 600px;
    max-width: 1440px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.14)),
        linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(51, 65, 85, 0.5));
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

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

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

.hero-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.54), rgba(15, 23, 42, 0.1)),
        radial-gradient(circle at 70% 25%, rgba(34, 211, 238, 0.24), transparent 30%);
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    filter: saturate(1.08) contrast(1.05);
}

.hero-copy {
    position: relative;
    z-index: 2;
    width: min(680px, 100%);
    padding: 78px 72px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.sub-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy p,
.sub-hero p,
.detail-line {
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.detail-meta,
.sub-stats,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.hero-tags span,
.detail-meta span,
.sub-stats span,
.chip-row span {
    padding: 7px 12px;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    color: #cffafe;
    background: rgba(8, 47, 73, 0.44);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    color: var(--text);
    font-weight: 800;
    transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

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

.btn.primary,
.btn.full {
    color: #05212e;
    border-color: transparent;
    background: linear-gradient(135deg, var(--cyan), var(--green));
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.24);
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.06);
}

.btn.full {
    width: 100%;
    margin-top: 18px;
}

.hero-controls {
    position: absolute;
    right: 32px;
    bottom: 148px;
    z-index: 4;
    display: flex;
    gap: 12px;
}

.hero-controls button {
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text);
    font-size: 32px;
    background: rgba(15, 23, 42, 0.7);
}

.hero-thumbs {
    position: absolute;
    right: 28px;
    bottom: 28px;
    left: 28px;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.hero-thumb {
    display: grid;
    gap: 4px;
    min-height: 84px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: #cbd5e1;
    text-align: left;
    background: rgba(15, 23, 42, 0.7);
}

.hero-thumb.active {
    border-color: rgba(34, 211, 238, 0.64);
    background: rgba(8, 47, 73, 0.72);
}

.hero-thumb span {
    color: var(--cyan);
    font-weight: 900;
}

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

.content-section {
    max-width: 1440px;
    margin: 0 auto;
    padding: 64px 28px 0;
}

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

.section-heading h2,
.panel-title h2,
.article-card h2,
.library-title h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
}

.section-heading p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-more,
.library-title a {
    color: var(--cyan);
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.18);
}

.category-card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.95));
}

.category-card img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.46;
}

.category-card span,
.category-card strong,
.category-card p {
    position: relative;
    z-index: 2;
}

.category-card span {
    display: block;
    color: var(--cyan);
    font-weight: 900;
}

.category-card strong {
    display: block;
    margin-top: 8px;
    font-size: 30px;
}

.category-card p {
    margin: 46px 0 0;
    color: #dbeafe;
    line-height: 1.65;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.2);
    transition: transform 0.2s ease, border 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.45);
}

.poster-shell {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 250px;
    background:
        radial-gradient(circle at 24% 18%, rgba(34, 211, 238, 0.28), transparent 28%),
        linear-gradient(135deg, #0f172a, #1e293b 52%, #0e7490);
}

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.9));
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    color: #05212e;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--green));
}

.card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    margin: 0;
    color: var(--cyan);
    font-size: 13px;
}

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

.chip-row {
    margin-top: 0;
}

.chip-row span {
    padding: 5px 9px;
    font-size: 12px;
}

.chip-row.large span {
    padding: 8px 12px;
    font-size: 14px;
}

.rank-panel {
    position: sticky;
    top: 86px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel-strong);
    box-shadow: var(--shadow);
}

.rank-list {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.rank-line {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.rank-line:hover {
    border-color: rgba(34, 211, 238, 0.36);
}

.rank-line span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #05212e;
    font-weight: 900;
    background: var(--cyan);
}

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

.rank-line em {
    color: var(--orange);
    font-style: normal;
    font-weight: 900;
}

.sub-hero {
    max-width: 1440px;
    margin: 26px auto 0;
    padding: 68px 48px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 76% 8%, rgba(34, 211, 238, 0.18), transparent 28%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.74));
    box-shadow: var(--shadow);
}

.rank-hero {
    background:
        radial-gradient(circle at 80% 4%, rgba(251, 146, 60, 0.18), transparent 28%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.74));
}

.tool-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.search-box {
    display: grid;
    width: min(460px, 100%);
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
}

.search-box.wide {
    width: min(720px, 100%);
}

.search-box input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    padding: 0 18px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.78);
}

.search-box input:focus {
    border-color: rgba(34, 211, 238, 0.64);
}

.detail-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 34px;
    max-width: 1440px;
    margin: 26px auto 0;
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 80% 12%, rgba(34, 211, 238, 0.14), transparent 28%),
        rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.detail-cover {
    min-height: 500px;
    border-radius: 26px;
}

.detail-cover img {
    min-height: 500px;
}

.detail-copy {
    align-self: center;
}

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

.breadcrumbs a {
    color: var(--cyan);
}

.player-section {
    max-width: 1440px;
    margin: 28px auto 0;
    padding: 0 28px;
}

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

.player-card video {
    width: 100%;
    min-height: 520px;
    max-height: 78vh;
    background: #020617;
}

.play-cover {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    color: #05212e;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--green));
    box-shadow: 0 20px 60px rgba(34, 211, 238, 0.32);
    transform: translate(-50%, -50%);
}

.player-card.playing .play-cover {
    display: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    max-width: 1440px;
    margin: 28px auto 0;
    padding: 0 28px;
}

.article-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
}

.article-card p {
    margin: 16px 0 0;
    color: #cbd5e1;
    line-height: 1.95;
}

.library-group {
    margin-bottom: 34px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
}

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

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

.library-link {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.library-link strong,
.library-link span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.library-link strong {
    font-weight: 900;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 32px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 38px 28px;
}

.footer-grid p {
    max-width: 620px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.footer-links a {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #cbd5e1;
}

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

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

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

    .rank-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

    .hero-shell {
        min-height: 720px;
    }

    .hero-copy {
        padding: 44px 28px 150px;
    }

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

    .hero-controls {
        right: 22px;
        bottom: 220px;
    }

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

    .section-heading,
    .library-title,
    .footer-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }

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

    .detail-cover,
    .detail-cover img,
    .player-card video {
        min-height: 360px;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .hero-wrap,
    .content-section,
    .player-section,
    .detail-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .sub-hero {
        margin-left: 16px;
        margin-right: 16px;
        padding: 38px 22px;
    }

    .hero-shell,
    .sub-hero,
    .detail-hero {
        border-radius: 24px;
    }

    .hero-thumbs,
    .category-grid,
    .movie-grid,
    .movie-grid.compact,
    .movie-grid.large,
    .library-links,
    .mobile-panel {
        grid-template-columns: 1fr;
    }

    .hero-shell {
        min-height: 760px;
    }

    .hero-thumbs {
        max-height: 260px;
        overflow: auto;
    }
}
