* {
    box-sizing: border-box;
}

:root {
    --frost-950: #082f49;
    --frost-900: #0c4a6e;
    --frost-800: #075985;
    --frost-700: #0369a1;
    --frost-600: #0284c7;
    --frost-500: #0ea5e9;
    --ice-900: #164e63;
    --ice-600: #0891b2;
    --ice-400: #22d3ee;
    --ice-300: #67e8f9;
    --ice-200: #a5f3fc;
    --silver-950: #020617;
    --silver-900: #0f172a;
    --silver-800: #1e293b;
    --silver-700: #334155;
    --silver-600: #475569;
    --silver-500: #64748b;
    --silver-400: #94a3b8;
    --silver-300: #cbd5e1;
    --silver-200: #e2e8f0;
    --silver-100: #f1f5f9;
    --silver-50: #f8fafc;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.16);
    --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.12);
    --radius-xl: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: var(--silver-900);
    background: linear-gradient(180deg, var(--silver-50), var(--white) 46%, #eef9ff);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--frost-900), var(--frost-800), var(--ice-900));
    box-shadow: 0 12px 28px rgba(8, 47, 73, 0.22);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--ice-400), var(--frost-500));
    color: var(--white);
    box-shadow: 0 10px 22px rgba(34, 211, 238, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 650;
    color: rgba(255, 255, 255, 0.88);
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
    color: var(--ice-200);
}

.menu-toggle {
    display: none;
    border: 0;
    color: var(--white);
    padding: 9px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
    grid-template-columns: 1fr;
    gap: 6px;
}

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
}

.mobile-nav.is-open {
    display: grid;
}

.hero-carousel {
    position: relative;
    height: 76vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--silver-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
    transition: opacity 0.65s ease, transform 1.2s ease;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 74% 22%, rgba(34, 211, 238, 0.26), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.12));
}

.hero-inner {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 42px;
    align-items: center;
    color: var(--white);
}

.hero-copy {
    max-width: 760px;
}

.hero-kicker,
.section-kicker {
    margin: 0 0 12px;
    color: var(--ice-200);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    line-height: 1.08;
    font-size: clamp(2.4rem, 6vw, 5.8rem);
    letter-spacing: -0.05em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    margin: 22px 0 0;
    font-size: clamp(1rem, 2.2vw, 1.24rem);
    color: rgba(255, 255, 255, 0.86);
}

.hero-tags,
.detail-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags,
.detail-tags {
    margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-tags span,
.detail-tags span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.tag-row span {
    color: var(--frost-700);
    background: #e0f2fe;
}

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

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

.primary-btn {
    color: var(--white);
    background: linear-gradient(135deg, var(--frost-600), var(--ice-600));
    box-shadow: 0 14px 30px rgba(2, 132, 199, 0.34);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.compact-card:hover,
.category-card:hover,
.overview-card:hover {
    transform: translateY(-3px);
}

.ghost-btn {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.ghost-btn.dark {
    color: var(--frost-700);
    background: var(--silver-50);
    border-color: var(--silver-200);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--white);
    font-weight: 800;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dots button {
    width: 28px;
    height: 8px;
    overflow: hidden;
    text-indent: -999px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 48px;
    background: var(--ice-300);
}

.home-search-strip,
.content-section,
.filter-panel,
.breadcrumb,
.detail-hero,
.prev-next {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.home-search-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: -52px;
    position: relative;
    z-index: 5;
    padding: 28px;
    border-radius: var(--radius-xl);
    color: var(--white);
    background: linear-gradient(135deg, var(--frost-900), var(--frost-700), var(--ice-900));
    box-shadow: var(--shadow-soft);
}

.home-search-strip h2 {
    margin: 0 0 6px;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.home-search-strip p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.content-section {
    padding: 64px 0 0;
}

.alt-section {
    padding-top: 72px;
}

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

.section-head.compact {
    margin-bottom: 18px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.7rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head p:not(.section-kicker) {
    max-width: 640px;
    margin: 8px 0 0;
    color: var(--silver-600);
}

.section-head > a {
    flex: 0 0 auto;
    color: var(--frost-700);
    font-weight: 800;
}

.movie-grid,
.compact-grid,
.category-grid,
.overview-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

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

.movie-card,
.compact-card,
.category-card,
.overview-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.compact-card:hover,
.category-card:hover,
.overview-card:hover {
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.18);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--silver-200);
}

.poster-wrap img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.48s ease;
}

.movie-card:hover .poster-wrap img,
.compact-card:hover img,
.category-card:hover img,
.overview-card:hover img {
    transform: scale(1.08);
}

.type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--white);
    background: var(--frost-600);
    font-size: 0.78rem;
    font-weight: 800;
}

.poster-hover {
    position: absolute;
    inset: auto 12px 12px;
    padding: 10px;
    border-radius: 14px;
    color: var(--white);
    text-align: center;
    font-weight: 800;
    background: rgba(2, 6, 23, 0.72);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-hover {
    opacity: 1;
    transform: translateY(0);
}

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

.movie-card-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: var(--silver-900);
    font-weight: 850;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card-title:hover,
.ranking-title:hover,
.category-link:hover {
    color: var(--frost-600);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 9px 0;
    color: var(--silver-500);
    font-size: 0.9rem;
}

.movie-card-body p,
.compact-card p,
.ranking-info p,
.overview-card p,
.category-card span,
.site-footer p {
    color: var(--silver-600);
}

.movie-card-body p {
    min-height: 48px;
    margin: 0 0 14px;
    font-size: 0.92rem;
}

.category-link {
    display: inline-flex;
    margin-top: 12px;
    color: var(--frost-700);
    font-size: 0.88rem;
    font-weight: 800;
}

.compact-card a {
    display: block;
    position: relative;
    overflow: hidden;
}

.compact-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.48s ease;
}

.compact-card span {
    display: block;
    padding: 13px 14px 0;
    font-weight: 800;
    line-height: 1.35;
}

.compact-card p {
    margin: 6px 14px 14px;
    font-size: 0.86rem;
}

.category-card,
.overview-card a {
    display: block;
}

.category-card {
    padding: 16px;
}

.category-thumbs,
.overview-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.overview-thumbs {
    grid-template-columns: repeat(5, 1fr);
}

.category-thumbs img,
.overview-thumbs img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.38s ease;
}

.category-card strong,
.overview-card h2 {
    display: block;
    margin: 0 0 8px;
    font-size: 1.18rem;
}

.overview-card a {
    padding: 16px;
}

.overview-card h2 {
    font-size: 1.35rem;
}

.overview-card p,
.category-card span {
    margin: 0;
    display: block;
}

.overview-card span {
    display: inline-flex;
    margin-top: 16px;
    color: var(--frost-700);
    font-weight: 800;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 58px 82px minmax(0, 1fr) 80px;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--silver-200);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.rank-number {
    display: flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--white);
    font-weight: 900;
    background: linear-gradient(135deg, var(--frost-600), var(--ice-600));
}

.ranking-cover img {
    width: 82px;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    object-fit: cover;
}

.ranking-title {
    font-size: 1.08rem;
    font-weight: 850;
}

.ranking-info p {
    margin: 6px 0 0;
}

.heat-score {
    justify-self: end;
    padding: 8px 10px;
    border-radius: 999px;
    color: var(--frost-700);
    font-weight: 900;
    background: #e0f2fe;
}

.page-hero {
    color: var(--white);
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.34), transparent 28%),
        linear-gradient(135deg, var(--frost-900), var(--frost-800), var(--ice-900));
    padding: 86px min(7vw, 72px);
    border-radius: 0 0 36px 36px;
}

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

.small-hero,
.category-hero,
.ranking-hero {
    min-height: 320px;
    display: flex;
    align-items: center;
}

.filter-panel {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
    gap: 14px;
    align-items: end;
    margin-top: -38px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-card);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--silver-600);
    font-size: 0.88rem;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--silver-200);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--silver-900);
    background: var(--white);
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--frost-500);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.no-result {
    display: none;
    grid-column: 1 / -1;
    margin: 0;
    padding: 14px;
    border-radius: 14px;
    color: var(--silver-600);
    background: var(--silver-100);
}

.no-result.is-visible {
    display: block;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 30px;
    color: var(--silver-500);
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--frost-700);
    font-weight: 800;
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
    margin-top: 28px;
    padding: 34px;
    border-radius: 34px;
    color: var(--white);
    background:
        radial-gradient(circle at 86% 18%, rgba(34, 211, 238, 0.28), transparent 28%),
        linear-gradient(135deg, var(--silver-950), var(--frost-900), var(--ice-900));
    box-shadow: var(--shadow-soft);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

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

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow-soft);
}

.video-frame video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.76));
    cursor: pointer;
}

.play-layer.is-hidden {
    display: none;
}

.play-symbol {
    display: inline-flex;
    width: 82px;
    height: 82px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--frost-600), var(--ice-600));
    box-shadow: 0 18px 40px rgba(2, 132, 199, 0.42);
    font-size: 2rem;
}

.play-layer span:last-child {
    font-size: 1.1rem;
    font-weight: 900;
}

.detail-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.detail-text article {
    padding: 28px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.detail-text h2 {
    margin: 0 0 12px;
    font-size: 1.55rem;
}

.detail-text p {
    margin: 0;
    color: var(--silver-700);
}

.prev-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 46px 0 64px;
}

.prev-next a {
    padding: 18px 20px;
    border-radius: 18px;
    color: var(--frost-700);
    font-weight: 800;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.prev-next a:last-child {
    text-align: right;
}

.site-footer {
    margin-top: 74px;
    color: var(--silver-300);
    background: linear-gradient(180deg, var(--silver-900), var(--frost-950));
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 34px;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) 1fr 1fr;
    gap: 32px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 1.05rem;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.footer-brand {
    color: var(--white);
    margin-bottom: 14px;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(203, 213, 225, 0.18);
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.footer-bottom p {
    margin: 0;
}

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

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

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

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

    .hero-poster {
        display: none;
    }

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

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

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

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

@media (max-width: 760px) {
    .hero-carousel {
        height: 82vh;
        min-height: 620px;
    }

    .hero-inner {
        width: min(100% - 28px, 1180px);
    }

    .hero-arrow {
        display: none;
    }

    .home-search-strip,
    .section-head,
    .footer-bottom,
    .prev-next {
        display: grid;
        grid-template-columns: 1fr;
    }

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

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

    .heat-score {
        grid-column: 2 / 4;
        justify-self: start;
    }

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

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

    .detail-hero {
        padding: 22px;
    }

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

    .prev-next a:last-child {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .large-grid,
    .related-grid,
    .compact-grid,
    .category-grid,
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .hero-copy h2,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 2.25rem;
    }

    .page-hero {
        padding-left: 18px;
        padding-right: 18px;
    }
}
