:root {
    --color-page: #00141a;
    --color-panel: rgba(0, 40, 64, 0.82);
    --color-panel-strong: rgba(0, 26, 38, 0.96);
    --color-card: rgba(0, 65, 102, 0.52);
    --color-border: rgba(26, 177, 255, 0.22);
    --color-text: #eefbff;
    --color-muted: #99cde4;
    --color-soft: #d7f4ff;
    --color-ocean: #0099e6;
    --color-ocean-light: #1ab1ff;
    --shadow-card: 0 24px 70px rgba(0, 0, 0, 0.38);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --header-height: 72px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-text);
    background:
        radial-gradient(circle at 12% 0%, rgba(26, 177, 255, 0.18), transparent 32rem),
        radial-gradient(circle at 88% 14%, rgba(0, 153, 230, 0.14), transparent 38rem),
        linear-gradient(180deg, #00141a 0%, #001a26 42%, #000f14 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(0, 20, 26, 0.86);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-ocean-light), var(--color-ocean));
    color: white;
    box-shadow: 0 14px 32px rgba(0, 153, 230, 0.35);
}

.brand-text {
    font-size: 20px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--color-muted);
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(0, 153, 230, 0.18);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: rgba(0, 40, 64, 0.7);
    color: white;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 99px;
}

.mobile-menu {
    display: none;
    border-top: 1px solid var(--color-border);
    background: rgba(0, 20, 26, 0.94);
}

.mobile-menu.open {
    display: block;
}

.mobile-menu-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 0 18px;
}

.mobile-menu-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 85, 128, 0.24);
    color: var(--color-soft);
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #00141a;
}

.hero-slide {
    display: none;
    min-height: 680px;
    position: relative;
    background-image:
        linear-gradient(90deg, rgba(0, 20, 26, 0.94) 0%, rgba(0, 20, 26, 0.78) 46%, rgba(0, 20, 26, 0.36) 100%),
        var(--cover-image),
        radial-gradient(circle at 70% 18%, rgba(0, 153, 230, 0.42), transparent 28rem);
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    display: block;
    animation: fadeIn 580ms ease both;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 20, 26, 0.16), rgba(0, 20, 26, 0.94)),
        radial-gradient(circle at 70% 34%, rgba(26, 177, 255, 0.16), transparent 22rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 56px;
    padding: 60px 0 80px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--color-ocean-light);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: white;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy h1 {
    max-width: 760px;
    font-size: clamp(42px, 7vw, 82px);
}

.hero-one-line,
.detail-one-line,
.page-hero p {
    max-width: 760px;
    margin: 20px 0 0;
    color: var(--color-soft);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

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

.hero-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: rgba(0, 85, 128, 0.32);
    color: var(--color-soft);
    font-size: 14px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button-primary {
    background: linear-gradient(135deg, var(--color-ocean-light), var(--color-ocean));
    color: white;
    box-shadow: 0 16px 38px rgba(0, 153, 230, 0.34);
}

.button-secondary {
    border-color: var(--color-border);
    background: rgba(0, 40, 64, 0.76);
    color: var(--color-soft);
}

.hero-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    background-image: var(--cover-image), linear-gradient(135deg, #004166, #001a26);
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow-card);
    transform: rotate(2deg);
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 4;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 44px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(215, 244, 255, 0.32);
}

.hero-dot.active {
    background: var(--color-ocean-light);
}

.category-strip {
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: rgba(0, 20, 26, 0.68);
    backdrop-filter: blur(12px);
}

.category-strip-inner {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 14px 0;
}

.category-strip a {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(0, 85, 128, 0.28);
    color: var(--color-soft);
    font-size: 14px;
}

.section {
    padding: 66px 0;
}

.section-dark {
    background: rgba(0, 20, 26, 0.46);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.section-heading,
.search-panel,
.category-overview-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-heading h2,
.search-panel h2,
.content-panel h2,
.side-panel h2,
.category-overview-head h2 {
    margin: 0;
    color: white;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.text-link {
    color: var(--color-ocean-light);
    font-weight: 800;
}

.search-panel {
    align-items: center;
    padding: 26px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(0, 65, 102, 0.5), rgba(0, 26, 38, 0.78));
    box-shadow: var(--shadow-card);
}

.search-box {
    width: min(100%, 460px);
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    height: 48px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0 18px;
    outline: none;
    color: white;
    background: rgba(0, 20, 26, 0.62);
}

.search-box button {
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0 16px;
    background: rgba(0, 85, 128, 0.36);
    color: var(--color-soft);
    cursor: pointer;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(0, 65, 102, 0.54), rgba(0, 26, 38, 0.9));
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(26, 177, 255, 0.54);
    box-shadow: var(--shadow-card);
}

.poster-link {
    display: block;
}

.poster,
.ranking-thumb,
.detail-poster,
.player-cover,
.category-thumbs span {
    background-image: var(--cover-image), linear-gradient(135deg, #004166, #001a26 62%, #0099e6);
    background-size: cover;
    background-position: center;
}

.poster {
    position: relative;
    aspect-ratio: 2 / 3;
    min-height: 220px;
}

.poster::after,
.ranking-thumb::after,
.detail-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 20, 26, 0.76));
}

.poster-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 20, 26, 0.72);
    backdrop-filter: blur(8px);
}

.poster-year {
    right: 12px;
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, var(--color-ocean-light), var(--color-ocean));
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 9px;
    color: var(--color-muted);
    font-size: 12px;
}

.movie-meta-line a {
    color: var(--color-ocean-light);
}

.movie-card h3 {
    margin: 0;
    color: white;
    font-size: 18px;
    line-height: 1.35;
}

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

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-list span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(0, 153, 230, 0.12);
    color: var(--color-soft);
    font-size: 12px;
}

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

.category-card {
    display: block;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: rgba(0, 65, 102, 0.42);
    transition: transform 180ms ease, border-color 180ms ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(26, 177, 255, 0.58);
}

.category-thumbs {
    display: flex;
    margin-bottom: 16px;
}

.category-thumbs span {
    width: 34%;
    aspect-ratio: 2 / 3;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-left: -10px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
}

.category-thumbs span:first-child {
    margin-left: 0;
}

.category-card h3 {
    margin: 0 0 6px;
    color: white;
    font-size: 18px;
}

.category-card p,
.category-overview-head p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.7;
}

.page-hero {
    position: relative;
    padding: 92px 0 62px;
    background:
        radial-gradient(circle at 24% 0%, rgba(26, 177, 255, 0.24), transparent 24rem),
        linear-gradient(180deg, rgba(0, 65, 102, 0.58), rgba(0, 20, 26, 0.3));
    border-bottom: 1px solid var(--color-border);
}

.compact-hero h1 {
    font-size: clamp(38px, 6vw, 64px);
}

.overview-stack {
    display: grid;
    gap: 30px;
}

.category-overview-block {
    padding: 26px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: rgba(0, 40, 64, 0.54);
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 70px 96px minmax(0, 1fr) 118px;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: rgba(0, 40, 64, 0.66);
}

.ranking-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(0, 153, 230, 0.18);
    color: var(--color-ocean-light);
    font-size: 22px;
    font-weight: 900;
}

.ranking-thumb {
    position: relative;
    width: 96px;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    overflow: hidden;
}

.ranking-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

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

.ranking-weight {
    text-align: right;
}

.ranking-weight span {
    display: block;
    color: white;
    font-size: 28px;
    font-weight: 900;
}

.ranking-weight small {
    color: var(--color-muted);
}

.breadcrumbs {
    padding: 18px 0;
    background: rgba(0, 20, 26, 0.52);
    border-bottom: 1px solid var(--color-border);
}

.breadcrumbs .container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--color-muted);
    font-size: 14px;
}

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

.detail-hero {
    position: relative;
    background-image:
        linear-gradient(90deg, rgba(0, 20, 26, 0.96), rgba(0, 20, 26, 0.72)),
        var(--cover-image),
        linear-gradient(135deg, #004166, #001a26);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 26%, rgba(26, 177, 255, 0.16), transparent 26rem);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
    padding: 58px 0;
}

.detail-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

.detail-copy h1 {
    font-size: clamp(38px, 6vw, 72px);
}

.large-tags span {
    font-size: 13px;
}

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

.detail-main,
.detail-side {
    display: grid;
    gap: 24px;
}

.player-card,
.content-panel,
.side-panel {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: rgba(0, 40, 64, 0.66);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.26);
    overflow: hidden;
}

.player-card {
    position: relative;
    aspect-ratio: 16 / 9;
    background: black;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    text-align: center;
    background-image:
        linear-gradient(180deg, rgba(0, 20, 26, 0.28), rgba(0, 20, 26, 0.88)),
        var(--cover-image),
        linear-gradient(135deg, #004166, #001a26);
    background-size: cover;
    background-position: center;
}

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

.play-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-ocean-light), var(--color-ocean));
    box-shadow: 0 24px 58px rgba(0, 153, 230, 0.46);
    cursor: pointer;
}

.play-icon {
    display: block;
    width: 0;
    height: 0;
    margin-left: 34px;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 25px solid white;
}

.player-cover-text strong {
    display: block;
    font-size: 22px;
}

.player-cover-text span {
    display: block;
    margin-top: 6px;
    color: var(--color-muted);
}

.player-video {
    display: block;
    width: 100%;
    height: 100%;
    background: black;
}

.player-message {
    position: absolute;
    left: 16px;
    bottom: 12px;
    z-index: 3;
    margin: 0;
    color: var(--color-soft);
    font-size: 13px;
}

.content-panel,
.side-panel {
    padding: 24px;
}

.content-panel p {
    margin: 16px 0 0;
    color: var(--color-soft);
    line-height: 1.95;
    font-size: 17px;
}

.side-panel dl {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    margin: 18px 0 0;
}

.side-panel dt {
    color: var(--color-muted);
}

.side-panel dd {
    margin: 0;
    color: white;
}

.side-panel a {
    color: var(--color-ocean-light);
}

.side-links {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.side-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(0, 85, 128, 0.24);
}

.side-links span {
    color: white;
}

.side-links small {
    color: var(--color-muted);
}

.site-footer {
    padding: 46px 0;
    border-top: 1px solid var(--color-border);
    background: rgba(0, 10, 13, 0.78);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
}

.footer-copy {
    max-width: 520px;
    color: var(--color-muted);
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: white;
}

.site-footer a:not(.brand) {
    display: block;
    margin: 8px 0;
    color: var(--color-muted);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.01);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 34px;
    }

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

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

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

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

    .hero-content {
        grid-template-columns: 1fr;
        align-items: end;
        padding: 56px 0 88px;
    }

    .hero-poster {
        display: none;
    }

    .search-panel,
    .section-heading,
    .category-overview-head {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

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

    .detail-hero-inner {
        grid-template-columns: 150px minmax(0, 1fr);
        gap: 20px;
    }

    .ranking-row {
        grid-template-columns: 52px 78px minmax(0, 1fr);
    }

    .ranking-weight {
        grid-column: 3;
        text-align: left;
    }

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .brand-text {
        font-size: 17px;
    }

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

    .movie-grid,
    .library-grid,
    .small-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: 190px;
    }

    .ranking-row {
        grid-template-columns: 44px 72px minmax(0, 1fr);
        gap: 12px;
    }

    .ranking-number {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
}
