@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap");

:root {
    --ice-950: #020617;
    --ice-925: #07111f;
    --ice-900: #0f172a;
    --ice-850: #13213a;
    --ice-800: #1e293b;
    --ice-700: #334155;
    --ice-600: #475569;
    --ice-500: #64748b;
    --ice-400: #94a3b8;
    --ice-300: #cbd5e1;
    --ice-200: #e2e8f0;
    --ice-50: #f8fafc;
    --frost-700: #0369a1;
    --frost-600: #0284c7;
    --frost-500: #0ea5e9;
    --frost-400: #38bdf8;
    --glacier-600: #0891b2;
    --glacier-500: #06b6d4;
    --gold: #facc15;
    --shadow-ice: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-frost: 0 12px 36px rgba(14, 165, 233, 0.22);
    --radius-lg: 18px;
    --radius-xl: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ice-50);
    background:
        radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.16), transparent 28rem),
        radial-gradient(circle at 80% 8%, rgba(6, 182, 212, 0.12), transparent 32rem),
        var(--ice-950);
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-ice);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--frost-600), var(--glacier-600));
    box-shadow: 0 12px 32px rgba(14, 165, 233, 0.3);
    transition: transform 0.3s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-3deg);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.brand-text small {
    margin-top: 4px;
    color: var(--ice-400);
    font-size: 0.75rem;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--ice-300);
    font-size: 0.95rem;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(14, 165, 233, 0.16);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.12);
    color: white;
}

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

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 10px 16px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.mobile-nav.open {
    display: flex;
}

.hero-carousel {
    position: relative;
    height: min(80vh, 760px);
    min-height: 560px;
    overflow: hidden;
    background: var(--ice-900);
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.84) 0%, transparent 48%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(100%, 720px);
    padding-top: 34px;
    animation: fadeIn 0.5s ease both;
}

.hero-badges {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.hero-badges span,
.cover-tag,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 13px;
    background: rgba(14, 165, 233, 0.9);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
}

.hero-badges strong {
    color: var(--gold);
    font-size: 1.35rem;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    max-width: 920px;
    font-size: clamp(2.4rem, 6vw, 5.8rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
    text-shadow: 0 3px 22px rgba(0, 0, 0, 0.45);
}

.hero-copy p,
.page-hero p {
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--ice-200);
    font-size: clamp(1rem, 2vw, 1.35rem);
    line-height: 1.8;
}

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

.hero-tags span {
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--ice-200);
    backdrop-filter: blur(10px);
}

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

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--frost-600), var(--glacier-600));
    box-shadow: var(--shadow-frost);
}

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

.btn-ghost {
    color: var(--ice-100);
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(10px);
}

.full {
    width: 100%;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    color: white;
    font-size: 2.2rem;
    line-height: 1;
    backdrop-filter: blur(10px);
    transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow:hover {
    background: rgba(14, 165, 233, 0.82);
    transform: translateY(-50%) scale(1.06);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.58);
    transition: width 0.3s ease, background 0.3s ease;
}

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

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

.alt-section {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.95));
}

.section-stack {
    display: grid;
    gap: 34px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    color: var(--frost-400);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-heading h2,
.search-panel h2,
.article-section h2,
.side-card h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.55rem);
    letter-spacing: -0.035em;
}

.section-more {
    color: var(--frost-400);
    font-weight: 700;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: var(--shadow-ice);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.92);
    box-shadow: var(--shadow-frost);
}

.movie-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.compact-grid .movie-cover {
    aspect-ratio: 3 / 4;
}

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

.movie-card:hover .movie-cover img,
.category-card:hover img {
    transform: scale(1.08);
}

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), transparent 54%);
}

.rating,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    padding: 6px 9px;
    border-radius: 10px;
    color: white;
    background: rgba(2, 6, 23, 0.78);
    font-size: 0.8rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.rank-badge {
    left: 12px;
    right: auto;
    background: rgba(14, 165, 233, 0.88);
}

.cover-tag {
    position: absolute;
    z-index: 2;
    left: 12px;
    bottom: 12px;
}

.movie-body {
    padding: 18px;
}

.movie-body.compact {
    padding: 14px;
}

.movie-body h3 {
    margin: 0 0 10px;
    color: white;
    font-size: 1.1rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.movie-body p {
    margin: 0;
    color: var(--ice-400);
    font-size: 0.92rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 14px;
    color: var(--ice-500);
    font-size: 0.82rem;
}

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

.category-card {
    position: relative;
    min-height: 250px;
    overflow: hidden;
    border-radius: 22px;
    background: var(--ice-900);
    box-shadow: var(--shadow-ice);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s ease;
}

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

.category-card div {
    position: absolute;
    z-index: 2;
    right: 18px;
    bottom: 18px;
    left: 18px;
}

.category-card span,
.category-overview-body span {
    color: var(--frost-400);
    font-weight: 800;
    font-size: 0.84rem;
}

.category-card h3,
.category-overview-body h2 {
    margin: 7px 0;
    color: white;
}

.category-card p,
.category-overview-body p {
    margin: 0;
    color: var(--ice-300);
    font-size: 0.92rem;
    line-height: 1.55;
}

.rank-section {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.9));
}

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

.rank-row {
    display: grid;
    grid-template-columns: 48px 84px 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.88);
    transition: background 0.25s ease, transform 0.25s ease;
}

.rank-row:hover {
    background: rgba(30, 41, 59, 0.96);
    transform: translateX(4px);
}

.rank-row img {
    width: 84px;
    height: 54px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-num {
    color: var(--frost-400);
    font-size: 1.35rem;
    font-weight: 900;
}

.rank-title {
    color: white;
    font-weight: 800;
}

.rank-info {
    color: var(--ice-400);
    font-size: 0.9rem;
}

.rank-row strong {
    color: var(--gold);
}

.search-band {
    padding: 34px 0;
    background: rgba(15, 23, 42, 0.72);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(360px, 680px);
    gap: 28px;
    align-items: center;
}

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

.search-input,
.filter-select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    outline: none;
    color: white;
    background: rgba(2, 6, 23, 0.66);
    padding: 0 15px;
}

.search-input:focus,
.filter-select:focus {
    border-color: rgba(14, 165, 233, 0.7);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.page-main {
    min-height: 68vh;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 92px 0 76px;
    background:
        radial-gradient(circle at 25% 20%, rgba(14, 165, 233, 0.18), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
}

.small-hero {
    padding-top: 78px;
}

.category-hero p {
    max-width: 780px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: var(--ice-400);
    font-size: 0.92rem;
}

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

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

.category-overview-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: var(--shadow-ice);
}

.category-overview-card a {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 210px;
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

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

.category-overview-body {
    padding: 28px;
}

.detail-main {
    min-height: 70vh;
    padding-bottom: 20px;
}

.detail-top {
    padding: 24px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.72);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 32px;
    padding-top: 34px;
}

.detail-content {
    display: grid;
    gap: 26px;
}

.player-card,
.side-card,
.detail-copy {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: var(--shadow-ice);
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: black;
}

.video-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: black;
}

.cover-button {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: rgba(2, 6, 23, 0.38);
    transition: background 0.3s ease;
}

.cover-button span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--frost-600), var(--glacier-600));
    box-shadow: var(--shadow-frost);
    font-size: 2rem;
    padding-left: 5px;
    transition: transform 0.3s ease;
}

.cover-button:hover {
    background: rgba(2, 6, 23, 0.52);
}

.cover-button:hover span {
    transform: scale(1.08);
}

.cover-button.is-hidden {
    display: none;
}

.detail-copy {
    padding: 30px;
}

.detail-copy h1 {
    font-size: clamp(2rem, 5vw, 3.6rem);
}

.lead-text {
    margin: 18px 0 0;
    color: var(--ice-200);
    font-size: 1.15rem;
    line-height: 1.85;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 26px 0;
}

.detail-meta-grid div {
    padding: 14px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.5);
}

.detail-meta-grid span,
.info-list dt {
    display: block;
    color: var(--ice-500);
    font-size: 0.78rem;
    margin-bottom: 6px;
}

.detail-meta-grid strong,
.info-list dd {
    margin: 0;
    color: var(--ice-100);
    font-weight: 800;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 28px;
}

.detail-tags span {
    background: rgba(30, 41, 59, 0.95);
    color: var(--ice-200);
}

.article-section {
    padding-top: 26px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.article-section + .article-section {
    margin-top: 26px;
}

.article-section p {
    margin: 14px 0 0;
    color: var(--ice-300);
    line-height: 1.9;
    font-size: 1.02rem;
}

.detail-sidebar {
    display: grid;
    align-content: start;
    gap: 22px;
}

.side-card {
    padding: 22px;
}

.poster-side img {
    width: 100%;
    aspect-ratio: 3 / 4;
    margin-bottom: 18px;
    border-radius: 16px;
    object-fit: cover;
}

.info-list {
    display: grid;
    gap: 15px;
    margin: 18px 0 0;
}

.info-list div {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.related-section {
    padding-top: 54px;
}

.site-footer {
    margin-top: 30px;
    padding: 54px 0 24px;
    background: rgba(15, 23, 42, 0.96);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.footer-brand p {
    max-width: 420px;
    margin: 18px 0 0;
    color: var(--ice-400);
    line-height: 1.75;
}

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

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links a {
    color: var(--ice-400);
}

.footer-links a:hover {
    color: var(--frost-400);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 42px;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--ice-500);
    font-size: 0.88rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        min-height: 640px;
    }

    .hero-copy {
        padding-right: 26px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .category-overview-card a {
        grid-template-columns: 1fr;
    }

    .category-covers {
        height: 210px;
    }

    .search-panel,
    .search-controls {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 36px 72px 1fr;
    }

    .rank-info,
    .rank-row strong {
        display: none;
    }

    .detail-meta-grid,
    .detail-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .brand-text small {
        display: none;
    }

    .brand-text strong {
        font-size: 1.08rem;
    }

    .hero-carousel {
        min-height: 610px;
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 82px;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-overview-grid,
    .footer-grid,
    .detail-meta-grid,
    .detail-sidebar {
        grid-template-columns: 1fr;
    }

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

    .detail-copy,
    .side-card {
        padding: 20px;
    }
}
