:root {
    --bg: #0f172a;
    --bg-soft: #111c33;
    --bg-panel: #1e293b;
    --bg-card: #172033;
    --border: rgba(34, 211, 238, 0.18);
    --border-strong: rgba(34, 211, 238, 0.45);
    --text: #ffffff;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --blue: #3b82f6;
    --shadow: 0 22px 60px rgba(8, 145, 178, 0.16);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 34rem), var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

body.nav-open {
    overflow: hidden;
}

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

img {
    max-width: 100%;
}

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.28);
}

.brand-mark svg {
    width: 22px;
    height: 22px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted-strong);
    font-size: 15px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.12);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.9);
    color: #ffffff;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
    border-radius: 2px;
}

.main-content {
    padding-top: 72px;
}

.hero {
    position: relative;
    min-height: 82vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0f172a 0%, #172033 50%, #083344 100%);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    filter: blur(72px);
    opacity: 0.35;
    animation: pulse-glow 5.5s ease-in-out infinite;
}

.hero::before {
    top: 90px;
    left: 8%;
    background: var(--cyan);
}

.hero::after {
    right: 9%;
    bottom: 70px;
    background: var(--blue);
    animation-delay: 1.2s;
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    gap: 52px;
    align-items: center;
    padding: 70px 0 86px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #a5f3fc;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(8, 47, 73, 0.54);
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.12);
    margin-bottom: 24px;
    font-size: 14px;
}

.hero-title {
    margin: 0;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.06em;
    font-weight: 900;
    background: linear-gradient(90deg, #ffffff, #cffafe, #bfdbfe);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: clamp(19px, 2.6vw, 30px);
    color: #a5f3fc;
    margin: 22px 0 12px;
    font-weight: 700;
}

.hero-desc {
    max-width: 690px;
    color: var(--muted-strong);
    font-size: 17px;
    margin: 0 0 28px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(30, 41, 59, 0.72);
    color: #ffffff;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}

.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
}

.btn-ghost {
    background: rgba(15, 23, 42, 0.45);
}

.hero-panel {
    position: relative;
}

.hero-slider {
    position: relative;
    min-height: 560px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-card {
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38);
}

.hero-card-image {
    position: relative;
    height: 100%;
    min-height: 560px;
}

.hero-card-image img {
    width: 100%;
    height: 100%;
    min-height: 560px;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 18%, rgba(15, 23, 42, 0.28) 44%, rgba(15, 23, 42, 0.98) 100%);
}

.hero-card-content {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 2;
}

.hero-card-content h2 {
    margin: 0 0 10px;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.12;
}

.hero-card-content p {
    margin: 0 0 18px;
    color: var(--muted-strong);
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ecfeff;
    background: rgba(34, 211, 238, 0.18);
    border: 1px solid rgba(34, 211, 238, 0.28);
    font-size: 13px;
    font-weight: 700;
}

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

.slider-dots button {
    width: 28px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.45);
    padding: 0;
}

.slider-dots button.is-active {
    background: var(--cyan);
}

.section {
    padding: 76px 0;
}

.section-soft {
    background: linear-gradient(180deg, #0f172a 0%, #152033 48%, #0f172a 100%);
}

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

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

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

.section-head p,
.page-hero p {
    margin: 10px 0 0;
    color: var(--muted);
    max-width: 680px;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.92));
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card a:hover {
    transform: translateY(-5px) scale(1.015);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: #020617;
}

.compact .poster-wrap {
    height: 220px;
}

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

.movie-card a:hover img {
    transform: scale(1.09);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 26%, rgba(15, 23, 42, 0.92) 100%);
}

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 10px;
    background: rgba(8, 145, 178, 0.9);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.poster-play {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.24s ease;
}

.poster-play span {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.9);
    color: #ffffff;
    box-shadow: 0 0 34px rgba(34, 211, 238, 0.35);
}

.movie-card a:hover .poster-play {
    opacity: 1;
}

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.28;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.category-card {
    min-height: 160px;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.2), transparent 55%), rgba(30, 41, 59, 0.72);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    font-size: 22px;
}

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

.rank-list {
    display: grid;
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: 58px 88px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-md);
    background: rgba(30, 41, 59, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: var(--border-strong);
}

.rank-number {
    color: var(--cyan);
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.rank-cover {
    width: 88px;
    height: 118px;
    border-radius: 12px;
    overflow: hidden;
    background: #020617;
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 21px;
}

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

.rank-score {
    min-width: 88px;
    text-align: right;
    color: #a5f3fc;
    font-weight: 800;
}

.page-hero {
    padding: 128px 0 54px;
    background: radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.2), transparent 32rem), linear-gradient(135deg, #0f172a, #172033 58%, #083344);
    border-bottom: 1px solid var(--border);
}

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

.breadcrumb a {
    color: #a5f3fc;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px 180px;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.72);
    margin: 0 0 28px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.9);
    color: #ffffff;
    padding: 0 14px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--border-strong);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #020617;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.82));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-ring {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 46px rgba(34, 211, 238, 0.42);
}

.play-ring svg {
    width: 34px;
    height: 34px;
    transform: translateX(2px);
}

.detail-panel,
.side-panel {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius-lg);
    background: rgba(30, 41, 59, 0.72);
    padding: 24px;
}

.detail-title {
    margin-top: 26px;
    margin-bottom: 14px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #dffbff;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.2);
    font-size: 14px;
}

.prose-block {
    color: var(--muted-strong);
}

.prose-block h2,
.side-panel h2 {
    color: #ffffff;
    margin: 28px 0 12px;
    font-size: 24px;
}

.prose-block p {
    margin: 0 0 16px;
}

.side-poster {
    overflow: hidden;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.side-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.7);
    padding: 40px 0;
    color: var(--muted);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

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

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

.hidden-card {
    display: none;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.28;
    }
    50% {
        transform: scale(1.14);
        opacity: 0.42;
    }
}

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

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

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

    .hero-slider {
        min-height: 500px;
    }

    .hero-card-image,
    .hero-card-image img {
        min-height: 500px;
    }
}

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

    .nav-toggle {
        display: inline-block;
    }

    .site-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 22px;
        background: rgba(15, 23, 42, 0.98);
    }

    body.nav-open .site-nav {
        display: flex;
    }

    .site-nav a {
        border-radius: 14px;
        background: rgba(30, 41, 59, 0.72);
    }

    .main-content {
        padding-top: 64px;
    }

    .hero {
        min-height: auto;
    }

    .hero-inner {
        padding: 54px 0 78px;
        gap: 34px;
    }

    .hero-slider,
    .hero-card-image,
    .hero-card-image img {
        min-height: 430px;
    }

    .section {
        padding: 54px 0;
    }

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

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

    .poster-wrap,
    .compact .poster-wrap {
        height: 218px;
    }

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

    .rank-item {
        grid-template-columns: 42px 72px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 2 / -1;
        text-align: left;
    }

    .rank-cover {
        width: 72px;
        height: 96px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .brand {
        font-size: 17px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

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

    .poster-wrap,
    .compact .poster-wrap {
        height: 280px;
    }

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