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

:root {
    --ice-950: #020617;
    --ice-900: #0f172a;
    --ice-850: #111c33;
    --ice-800: #1e293b;
    --ice-700: #334155;
    --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: #2563eb;
    --glacier-500: #3b82f6;
    --gold: #facc15;
    --shadow-ice: 0 8px 32px rgba(15, 23, 42, 0.45);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.25);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--ice-950);
    color: var(--ice-50);
    font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.86);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    backdrop-filter: blur(18px);
}

.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.04em;
    color: #ffffff;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--frost-500), var(--glacier-600));
    color: white;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.36);
}

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

.nav-list a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--ice-300);
    font-size: 15px;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-list a:hover,
.nav-list a.is-active {
    color: #ffffff;
    background: rgba(14, 165, 233, 0.16);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    background: rgba(30, 41, 59, 0.9);
}

.mobile-toggle span,
.mobile-toggle span::before,
.mobile-toggle span::after {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    content: "";
}

.mobile-toggle span::before {
    transform: translateY(-7px);
}

.mobile-toggle span::after {
    transform: translateY(5px);
}

.btn-primary,
.btn-ghost,
.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-primary {
    padding: 13px 24px;
    background: linear-gradient(135deg, var(--frost-600), var(--glacier-600));
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.34);
}

.btn-ghost {
    padding: 12px 20px;
    background: rgba(15, 23, 42, 0.65);
    color: var(--ice-100);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.btn-ghost:hover {
    background: rgba(30, 41, 59, 0.9);
    color: #ffffff;
}

.btn-small {
    padding: 9px 14px;
    background: rgba(14, 165, 233, 0.14);
    color: var(--frost-400);
    font-size: 14px;
    font-weight: 700;
}

.hero {
    position: relative;
    height: 78vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--ice-950);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.22) 100%), linear-gradient(0deg, var(--ice-950) 0%, rgba(2, 6, 23, 0) 34%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 700px;
    padding-top: 30px;
    animation: fadeIn 0.8s ease both;
}

.hero-eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.hero-badge,
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.88);
    color: white;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
}

.hero-rating {
    color: var(--gold);
    font-size: 24px;
    font-weight: 800;
}

.hero h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-shadow: 0 6px 26px rgba(0, 0, 0, 0.5);
}

.hero p {
    margin: 24px 0 0;
    max-width: 640px;
    color: var(--ice-200);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 34px;
    color: var(--ice-300);
}

.hero-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.78);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
    transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow:hover {
    background: rgba(30, 41, 59, 0.96);
    transform: translateY(-50%) scale(1.06);
}

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

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

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

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

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

.section {
    padding: 78px 0;
}

.section.tight {
    padding: 48px 0;
}

.section.alt {
    background: linear-gradient(180deg, var(--ice-950), var(--ice-900));
}

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

.section-kicker {
    margin: 0 0 10px;
    color: var(--frost-400);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.04em;
}

.section h2 {
    font-size: clamp(28px, 4vw, 44px);
}

.section-desc,
.page-title p,
.detail-title p {
    margin: 12px 0 0;
    color: var(--ice-300);
    line-height: 1.8;
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

.card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--ice-900);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 16px 40px rgba(14, 165, 233, 0.15);
}

.movie-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0b1224;
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.movie-card:hover .poster img {
    transform: scale(1.08);
    filter: saturate(1.14) brightness(1.05);
}

.poster::after {
    position: absolute;
    inset: auto 0 0 0;
    height: 46%;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0));
}

.poster-meta {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: white;
    font-size: 13px;
    font-weight: 800;
}

.rating {
    color: var(--gold);
}

.movie-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.movie-body h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
}

.movie-body p {
    margin: 10px 0 0;
    color: var(--ice-300);
    font-size: 14px;
    line-height: 1.7;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.movie-tags span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.76);
    color: var(--ice-300);
    padding: 5px 9px;
    font-size: 12px;
}

.category-card {
    min-height: 180px;
    padding: 22px;
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.24), transparent 38%), linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.86));
}

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

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

.category-card .btn-small {
    margin-top: 20px;
}

.page-hero {
    position: relative;
    padding: 76px 0 54px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.23), transparent 36%), linear-gradient(180deg, var(--ice-950), var(--ice-900));
}

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

.page-title h1 {
    font-size: clamp(36px, 6vw, 64px);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 32px 0;
}

.filter-input,
.filter-select {
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.82);
    color: var(--ice-50);
    outline: none;
}

.filter-input {
    flex: 1 1 260px;
    padding: 0 16px;
}

.filter-select {
    flex: 0 0 170px;
    padding: 0 14px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
    gap: 34px;
    align-items: start;
}

.watch-player {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000000;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    aspect-ratio: 16 / 9;
}

.watch-player video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.watch-player video {
    z-index: 1;
    background: #000000;
}

.player-cover {
    z-index: 2;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

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

.play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--frost-500), var(--glacier-600));
    color: white;
    box-shadow: 0 18px 50px rgba(14, 165, 233, 0.38);
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 24px 64px rgba(37, 99, 235, 0.45);
}

.play-button svg {
    width: 34px;
    height: 34px;
    margin-left: 5px;
}

.watch-player.is-playing .player-cover,
.watch-player.is-playing .play-button {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

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

.detail-title h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.detail-panel,
.sidebar-panel {
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: var(--shadow-card);
}

.detail-panel {
    margin-top: 26px;
    padding: 28px;
}

.detail-panel h2,
.sidebar-panel h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 26px;
}

.detail-panel p {
    margin: 0 0 18px;
    color: var(--ice-200);
    line-height: 1.9;
}

.sidebar-panel {
    padding: 22px;
}

.sidebar-poster {
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 20px;
}

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

.info-list {
    display: grid;
    gap: 12px;
    color: var(--ice-300);
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    padding-bottom: 10px;
}

.info-list strong {
    color: #ffffff;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 46px 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: background 0.25s ease, transform 0.25s ease;
}

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

.rank-number {
    color: var(--gold);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-thumb {
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 2 / 3;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-main h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
}

.rank-main p {
    margin: 6px 0 0;
    color: var(--ice-300);
    line-height: 1.6;
}

.site-footer {
    padding: 42px 0;
    background: #020617;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--ice-400);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

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

.empty-state {
    display: none;
    padding: 38px;
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.8);
    color: var(--ice-300);
    text-align: center;
}

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

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

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

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

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

@media (max-width: 760px) {
    .header-inner {
        min-height: 64px;
    }

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

    .nav-list {
        position: absolute;
        left: 16px;
        right: 16px;
        top: calc(100% + 10px);
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.98);
        border: 1px solid rgba(148, 163, 184, 0.18);
        box-shadow: var(--shadow-ice);
    }

    .site-header.is-open .nav-list {
        display: flex;
    }

    .nav-list a {
        border-radius: 12px;
    }

    .hero {
        min-height: 620px;
        height: 86vh;
    }

    .hero-arrow {
        top: auto;
        bottom: 86px;
        width: 42px;
        height: 42px;
    }

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

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

    .section {
        padding: 54px 0;
    }

    .section-head,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .grid.movies,
    .grid.movies.compact,
    .grid.categories,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .movie-body {
        padding: 13px;
    }

    .movie-body h3 {
        font-size: 16px;
    }

    .filter-select {
        flex: 1 1 140px;
    }

    .rank-item {
        grid-template-columns: 36px 64px minmax(0, 1fr);
    }

    .rank-item .btn-small {
        grid-column: 3;
        justify-self: start;
    }

    .detail-panel {
        padding: 22px;
    }
}

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

    .logo {
        font-size: 18px;
    }

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

    .hero-copy {
        padding-top: 80px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary,
    .btn-ghost {
        width: 100%;
    }

    .grid.movies,
    .grid.movies.compact,
    .grid.categories,
    .related-grid {
        grid-template-columns: 1fr;
    }
}
