:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --yellow: #facc15;
    --red: #ef4444;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 15% 8%, rgba(6, 182, 212, 0.18), transparent 32rem),
        radial-gradient(circle at 82% 0%, rgba(37, 99, 235, 0.22), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.header-inner,
.footer-inner,
.section-inner,
.page-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #ffffff;
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 34px rgba(6, 182, 212, 0.28);
    font-size: 15px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}

.nav-link,
.mobile-link {
    color: #cbd5e1;
    border-radius: 999px;
    transition: color 0.24s ease, background 0.24s ease, transform 0.24s ease;
}

.nav-link {
    padding: 10px 14px;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
}

.menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
}

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

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

.mobile-link {
    padding: 10px 12px;
    font-size: 14px;
}

.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #000000;
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.62) 45%, rgba(0, 0, 0, 0.08) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.1) 0%, rgba(2, 6, 23, 0.9) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    padding: 60px 0;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--cyan);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-copy h1 {
    margin: 0 0 20px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    font-weight: 900;
}

.hero-copy p {
    max-width: 620px;
    margin: 0 0 28px;
    color: #d1d5db;
    font-size: clamp(17px, 2.3vw, 22px);
    line-height: 1.7;
}

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

.btn-primary,
.btn-secondary,
.search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 800;
    color: #ffffff;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary,
.search-button {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 40px rgba(6, 182, 212, 0.22);
}

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
}

.btn-primary:hover,
.btn-secondary:hover,
.search-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.54);
    color: #ffffff;
    font-size: 28px;
    transform: translateY(-50%);
    transition: background 0.24s ease, transform 0.24s ease;
    backdrop-filter: blur(8px);
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.78);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--cyan);
}

.main-section,
.page-section {
    padding: 72px 0;
}

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

.section-title h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-title p,
.page-title p,
.detail-title p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.card-grid.featured {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.movie-card,
.rank-card,
.category-summary-card,
.info-panel {
    border: 1px solid var(--line);
    background: rgba(30, 41, 59, 0.72);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.movie-card {
    border-radius: 22px;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(6, 182, 212, 0.42);
    box-shadow: 0 28px 80px rgba(6, 182, 212, 0.12), var(--shadow);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

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

.movie-card:hover .poster-wrap img,
.category-tile:hover img,
.rank-card:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    max-width: calc(100% - 24px);
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--cyan);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.movie-card-large .movie-card-body {
    padding: 24px;
}

.movie-title {
    display: block;
    min-height: 48px;
    margin-bottom: 10px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
    color: #ffffff;
    transition: color 0.25s ease;
}

.movie-card-large .movie-title {
    min-height: 64px;
    font-size: 24px;
}

.movie-card:hover .movie-title,
.rank-card:hover .rank-title,
.related-card:hover strong {
    color: #22d3ee;
}

.movie-card-body p {
    min-height: 44px;
    margin: 0 0 14px;
    color: #94a3b8;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta,
.rank-meta,
.detail-meta,
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: #94a3b8;
    font-size: 13px;
}

.movie-meta span,
.rank-meta span,
.detail-meta span,
.breadcrumbs a,
.breadcrumbs span {
    display: inline-flex;
    align-items: center;
}

.movie-meta span:not(:last-child)::after,
.rank-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
    content: "";
    width: 4px;
    height: 4px;
    margin-left: 10px;
    border-radius: 999px;
    background: #475569;
}

.tag-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.tag-row span,
.detail-tags a,
.detail-tags span {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 12px;
}

.category-strip {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.66), rgba(15, 23, 42, 0.82));
    backdrop-filter: blur(10px);
}

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

.category-tile {
    position: relative;
    min-height: 166px;
    border-radius: 24px;
    overflow: hidden;
    background: #0f172a;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.88));
}

.category-content {
    position: absolute;
    inset: auto 18px 18px;
    display: grid;
    gap: 7px;
}

.category-content strong {
    font-size: 21px;
    font-style: normal;
    font-weight: 900;
}

.category-content em {
    color: #cbd5e1;
    font-size: 13px;
    font-style: normal;
}

.search-panel {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow);
}

.search-label {
    display: block;
    margin-bottom: 10px;
    color: #e2e8f0;
    font-weight: 800;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.search-input {
    min-height: 50px;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    padding: 0 18px;
    outline: 0;
    background: rgba(2, 6, 23, 0.72);
    color: #ffffff;
}

.search-input:focus {
    border-color: rgba(6, 182, 212, 0.7);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.page-hero {
    padding: 72px 0 28px;
}

.page-title {
    max-width: 880px;
}

.breadcrumbs {
    margin-bottom: 18px;
}

.breadcrumbs a:hover {
    color: #22d3ee;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 20px;
    align-items: center;
    border-radius: 22px;
    padding: 14px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-card:hover {
    transform: translateY(-3px);
    border-color: rgba(6, 182, 212, 0.38);
}

.rank-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.rank-mark {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    min-width: 38px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--yellow), #f97316);
    color: #111827;
    font-weight: 900;
    font-size: 13px;
}

.rank-title {
    display: inline-flex;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.rank-body p {
    margin: 0 0 12px;
    color: #94a3b8;
    line-height: 1.7;
}

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

.category-summary-card {
    position: relative;
    min-height: 220px;
    border-radius: 26px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

.category-summary-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.46;
    transition: transform 0.6s ease;
}

.category-summary-card:hover img {
    transform: scale(1.08);
}

.category-summary-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.94));
}

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

.category-summary-card strong {
    font-size: 25px;
    font-weight: 900;
}

.category-summary-card p {
    margin: 10px 0 18px;
    color: #cbd5e1;
    line-height: 1.7;
}

.category-summary-card span {
    color: #22d3ee;
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.85fr);
    gap: 30px;
    align-items: start;
}

.player-box {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 36px 100px rgba(0, 0, 0, 0.48);
    aspect-ratio: 16 / 9;
}

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12), rgba(0, 0, 0, 0.55));
    z-index: 4;
}

.play-overlay.hidden {
    display: none;
}

.play-icon {
    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 18px 55px rgba(6, 182, 212, 0.35);
    font-size: 28px;
}

.play-overlay span:last-child {
    font-size: 18px;
    font-weight: 900;
}

.detail-title {
    margin: 28px 0;
}

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

.detail-tags {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin: 18px 0 0;
}

.info-panel {
    border-radius: 26px;
    padding: 26px;
    margin-bottom: 24px;
}

.info-panel h2,
.info-panel h3 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 900;
}

.info-panel p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.9;
}

.detail-cover {
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #0f172a;
    box-shadow: var(--shadow);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.detail-side {
    position: sticky;
    top: 100px;
}

.related-grid {
    display: grid;
    gap: 14px;
}

.related-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    transition: border-color 0.24s ease, transform 0.24s ease;
}

.related-card:hover {
    transform: translateY(-2px);
    border-color: rgba(6, 182, 212, 0.38);
}

.related-card img {
    width: 112px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.45s ease;
}

.related-card strong {
    display: block;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.35;
}

.related-card span {
    display: block;
    margin-top: 6px;
    color: #94a3b8;
    font-size: 12px;
}

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

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 40px;
    padding: 46px 0;
}

.footer-brand p {
    max-width: 560px;
    margin: 18px 0 0;
    color: #94a3b8;
    line-height: 1.8;
}

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

.footer-links h3 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 16px;
}

.footer-links a {
    display: block;
    margin: 9px 0;
    color: #94a3b8;
    font-size: 14px;
}

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

.footer-bottom {
    padding: 18px;
    border-top: 1px solid var(--line);
    color: #64748b;
    text-align: center;
    font-size: 13px;
}

[data-movie-card].is-hidden {
    display: none;
}

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

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

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

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

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

    .detail-side {
        position: static;
    }
}

@media (max-width: 720px) {
    .header-inner,
    .footer-inner,
    .section-inner,
    .page-inner,
    .hero-content {
        width: min(100% - 24px, 1280px);
    }

    .logo {
        font-size: 19px;
    }

    .hero-slider {
        height: 560px;
    }

    .hero-copy {
        padding: 86px 0 70px;
    }

    .hero-copy h1 {
        font-size: 44px;
    }

    .hero-control {
        display: none;
    }

    .main-section,
    .page-section {
        padding: 46px 0;
    }

    .section-heading {
        display: block;
    }

    .section-actions {
        margin-top: 18px;
    }

    .card-grid,
    .card-grid.featured,
    .category-grid,
    .category-summary-grid {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 116px 1fr;
        gap: 14px;
    }

    .rank-title {
        font-size: 16px;
    }

    .rank-body p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 13px;
    }

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

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

    .related-card {
        grid-template-columns: 100px 1fr;
    }

    .related-card img {
        width: 100px;
    }
}
