* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(59, 130, 246, 0.28);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --dim: #64748b;
    --cyan: #22d3ee;
    --blue: #38bdf8;
    --yellow: #facc15;
    --shadow: 0 24px 60px rgba(8, 145, 178, 0.16);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 28rem),
        radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.18), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
}

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

img {
    display: block;
    width: 100%;
}

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.9), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 36px rgba(2, 6, 23, 0.35);
    backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: #082f49;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.42);
    font-size: 16px;
}

.nav-links,
.category-strip-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a,
.category-strip-inner a {
    color: #dbeafe;
    font-weight: 700;
    transition: color 0.22s ease, transform 0.22s ease;
}

.nav-links a:hover,
.category-strip-inner a:hover,
.nav-links a.is-active {
    color: var(--cyan);
}

.nav-links a:hover,
.category-strip-inner a:hover {
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.7);
    cursor: pointer;
}

.category-strip {
    border-top: 1px solid rgba(59, 130, 246, 0.16);
    background: rgba(2, 6, 23, 0.18);
}

.category-strip-inner {
    min-height: 42px;
    overflow-x: auto;
    white-space: nowrap;
}

.hero {
    position: relative;
    margin: 32px auto 64px;
    height: min(68vh, 620px);
    min-height: 520px;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    align-items: end;
    gap: 32px;
    padding: 56px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

.hero-bg img {
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
}

.hero-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, transparent 60%);
}

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-eyebrow,
.chip-row span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 12px;
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.13);
    font-size: 13px;
    font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 18px 0 18px;
    max-width: 800px;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1.02;
    letter-spacing: -0.055em;
    color: #f8fafc;
}

.hero p,
.page-hero p,
.detail-copy p {
    max-width: 760px;
    margin: 0 0 26px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

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

.primary-btn,
.secondary-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn {
    color: #082f49;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 36px rgba(34, 211, 238, 0.26);
}

.secondary-btn {
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: var(--text);
    background: rgba(15, 23, 42, 0.62);
}

.primary-btn:hover,
.secondary-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-poster {
    align-self: center;
    max-width: 330px;
    justify-self: center;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.56);
}

.hero-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-arrow.prev {
    left: 18px;
}

.hero-arrow.next {
    right: 18px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: width 0.22s ease, background 0.22s ease;
}

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

.section {
    margin: 58px auto;
}

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

.section-heading h2 {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.04em;
    color: #f8fafc;
}

.section-heading h2::after {
    content: "";
    width: min(24vw, 260px);
    height: 1px;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.72), transparent);
}

.section-more {
    min-height: 40px;
    padding-inline: 18px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.09);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.64);
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.18);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    border-color: rgba(34, 211, 238, 0.56);
    box-shadow: 0 22px 52px rgba(34, 211, 238, 0.16);
    transform: translateY(-6px) scale(1.015);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.poster-link img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.55s ease;
}

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

.year-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #422006;
    background: rgba(250, 204, 21, 0.92);
    font-size: 12px;
    font-weight: 900;
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    min-height: 52px;
    align-items: flex-end;
    padding: 14px;
    color: #e0f2fe;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), transparent);
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.card-body {
    padding: 16px;
}

.card-body h2,
.card-body h3 {
    margin: 0 0 9px;
    color: #f8fafc;
    font-size: 16px;
    line-height: 1.35;
}

.card-body h2 a:hover,
.card-body h3 a:hover {
    color: var(--cyan);
}

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

.card-meta {
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

.card-meta span:last-child {
    max-width: 58%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero,
.detail-hero,
.content-panel,
.player-section,
.related-section,
.filter-panel,
.category-card,
.ranking-panel {
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.2);
    backdrop-filter: blur(12px);
}

.page-hero {
    margin: 32px auto 42px;
    padding: clamp(28px, 5vw, 56px);
}

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

.category-card {
    display: flex;
    min-height: 180px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
    border-color: rgba(34, 211, 238, 0.5);
    transform: translateY(-5px);
}

.category-card h2 {
    margin: 0 0 12px;
    color: #f8fafc;
    font-size: 22px;
}

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

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(280px, 1.6fr) minmax(160px, 0.7fr) minmax(160px, 0.7fr);
    gap: 16px;
    margin-bottom: 30px;
    padding: 18px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.58);
    outline: none;
    padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.6);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

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

.ranking-panel {
    padding: 22px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 56px;
    padding: 10px 14px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.3);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    border-color: rgba(34, 211, 238, 0.52);
    transform: translateX(4px);
}

.rank-index {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #082f49;
    background: linear-gradient(135deg, var(--yellow), var(--cyan));
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    color: #f8fafc;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    color: var(--muted);
    font-size: 13px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    margin: 32px auto 36px;
    padding: clamp(24px, 4vw, 42px);
}

.detail-poster {
    overflow: hidden;
    align-self: start;
    border: 1px solid rgba(34, 211, 238, 0.25);
    border-radius: 22px;
    background: #0f172a;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
}

.detail-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

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

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

.chip-row,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-meta {
    margin: 14px 0 18px;
}

.player-section {
    margin: 36px auto;
    padding: clamp(20px, 4vw, 32px);
}

.player-section h2,
.content-panel h2,
.related-section h2,
.ranking-panel h2 {
    margin: 0 0 20px;
    color: #f8fafc;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.player-box {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 24px;
    background: #020617;
    box-shadow: inset 0 0 70px rgba(8, 145, 178, 0.16);
}

.player-box video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(8, 145, 178, 0.15), rgba(2, 6, 23, 0.62));
    cursor: pointer;
}

.play-layer strong {
    display: block;
    margin-top: 14px;
    font-size: 18px;
}

.play-layer span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    color: #082f49;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 50px rgba(34, 211, 238, 0.42);
    font-size: 30px;
}

.player-box.is-playing .play-layer {
    display: none;
}

.content-panel,
.related-section {
    margin: 36px auto;
    padding: clamp(22px, 4vw, 36px);
}

.content-panel p {
    margin: 0 0 20px;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.9;
}

.content-panel p:last-child {
    margin-bottom: 0;
}

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

.site-footer {
    margin-top: 76px;
    border-top: 1px solid rgba(59, 130, 246, 0.28);
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(30, 58, 138, 0.65), rgba(2, 6, 23, 0.98));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 42px;
    padding: 42px 0;
}

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

.site-footer h2 {
    margin: 0 0 16px;
    color: #f8fafc;
    font-size: 18px;
}

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

.site-footer a:hover {
    color: var(--cyan);
}

.footer-bottom {
    padding: 18px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--dim);
    text-align: center;
}

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

.empty-state {
    display: none;
    padding: 28px;
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 18px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.48);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

@media (max-width: 1100px) {
    .movie-grid,
    .category-overview {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 260px;
    }
}

@media (max-width: 860px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.95);
    }

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

    .nav-links a {
        width: 100%;
        padding: 10px 0;
    }

    .hero {
        height: auto;
        min-height: 680px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-items: end;
        padding: 34px 24px 70px;
    }

    .hero-poster {
        display: none;
    }

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

    .filter-panel,
    .detail-hero,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 260px;
    }

    .rank-row {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .rank-meta {
        grid-column: 2;
    }
}

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

    .brand {
        font-size: 23px;
    }

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

    .hero {
        margin-top: 18px;
        min-height: 610px;
        border-radius: 20px;
    }

    .hero-slide {
        padding: 28px 20px 66px;
    }

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

    .hero p,
    .page-hero p,
    .detail-copy p {
        font-size: 15px;
    }

    .hero-arrow {
        display: none;
    }

    .movie-grid,
    .category-overview,
    .ranking-grid,
    .content-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body h2,
    .card-body h3 {
        font-size: 14px;
    }

    .card-body p {
        min-height: 40px;
        font-size: 12px;
    }

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

    .section-heading h2::after {
        width: 120px;
    }
}
