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

:root {
    --primary-50: #f0f4f8;
    --primary-100: #d9e2ec;
    --primary-500: #627d98;
    --primary-600: #486581;
    --primary-700: #334e68;
    --primary-800: #243b53;
    --primary-900: #102a43;
    --accent-500: #ffc107;
    --accent-600: #f0b000;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, .07), 0 10px 20px -2px rgba(0, 0, 0, .04);
    --shadow-medium: 0 4px 20px -2px rgba(0, 0, 0, .1), 0 10px 30px -5px rgba(0, 0, 0, .08);
    --shadow-hard: 0 10px 40px -5px rgba(0, 0, 0, .2), 0 20px 50px -10px rgba(0, 0, 0, .15);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-800);
    background: linear-gradient(180deg, var(--slate-50), #fff 520px);
    font-family: "Inter", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .95);
    border-bottom: 1px solid var(--slate-200);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(8px);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    gap: 20px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-900));
    box-shadow: var(--shadow-medium);
}

.brand-text,
.footer-logo span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong,
.footer-logo strong {
    color: var(--slate-900);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.03em;
}

.brand-text em,
.footer-logo em {
    margin-top: 2px;
    color: var(--slate-500);
    font-size: 12px;
    font-style: normal;
}

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

.nav-link {
    padding: 9px 14px;
    color: var(--slate-600);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition: .2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-900);
    background: var(--primary-100);
}

.nav-search,
.mobile-search,
.search-page-form,
.inline-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.mobile-search input,
.search-page-form input,
.inline-filter input {
    width: 230px;
    height: 40px;
    padding: 0 14px;
    color: var(--slate-800);
    border: 1px solid var(--slate-300);
    border-radius: 12px;
    outline: none;
    background: #fff;
    transition: .2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.inline-filter input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(98, 125, 152, .16);
}

.nav-search button,
.mobile-search button,
.search-page-form button,
.inline-filter button {
    height: 40px;
    padding: 0 16px;
    color: var(--slate-900);
    border: 0;
    border-radius: 12px;
    background: var(--accent-500);
    font-weight: 800;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--slate-700);
    background: var(--slate-100);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--slate-200);
    background: #fff;
}

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

.mobile-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.mobile-links a {
    padding: 10px 12px;
    color: var(--slate-700);
    border-radius: 10px;
    background: var(--slate-100);
    font-weight: 700;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-900), var(--primary-900), var(--slate-800));
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .3;
    transform: scale(1.02);
}

.hero-dim {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 30%, rgba(255, 193, 7, .22), transparent 30%),
        linear-gradient(90deg, rgba(15, 23, 42, .88), rgba(15, 23, 42, .58), rgba(15, 23, 42, .28));
}

.hero-content {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 7px 14px;
    color: #ffd75a;
    border-radius: 999px;
    background: rgba(255, 193, 7, .16);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
}

.hero h1 {
    margin: 16px 0 4px;
    color: #fff;
    font-size: clamp(40px, 7vw, 72px);
    line-height: .95;
    letter-spacing: -.05em;
}

.hero h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 24px;
    color: #e2e8f0;
    font-size: 20px;
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-meta span,
.detail-meta span {
    padding: 8px 12px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(8px);
    font-size: 14px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 900;
    transition: .22s ease;
}

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

.btn-accent {
    color: var(--slate-900);
    background: var(--accent-500);
    box-shadow: var(--shadow-hard);
}

.btn-accent:hover {
    background: var(--accent-600);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(8px);
}

.hero-controls {
    position: absolute;
    right: 50%;
    bottom: 32px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(1232px, calc(100% - 48px));
    transform: translateX(50%);
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #fff;
    border-radius: 14px;
    background: rgba(255, 255, 255, .14);
    font-size: 32px;
    line-height: 1;
    backdrop-filter: blur(8px);
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 26px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .36);
}

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

.section-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px;
}

.section-overlap {
    margin-top: -42px;
    padding-top: 0;
}

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

.section-head h2,
.rank-panel h2,
.content-card h2 {
    margin: 10px 0 6px;
    color: var(--slate-900);
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -.035em;
}

.section-head p {
    margin: 0;
    color: var(--slate-600);
}

.compact-head {
    align-items: center;
}

.text-link {
    display: inline-flex;
    align-items: center;
    min-width: max-content;
    color: var(--primary-700);
    font-weight: 900;
}

.text-link:hover {
    color: var(--primary-900);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--slate-200);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform .22s ease, box-shadow .22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--slate-200);
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 55%;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, .68));
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    color: var(--slate-900);
    background: var(--accent-500);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    color: #fff;
    background: rgba(15, 23, 42, .78);
    backdrop-filter: blur(8px);
}

.movie-body {
    padding: 18px;
}

.movie-meta {
    margin-bottom: 8px;
    color: var(--slate-500);
    font-size: 12px;
    font-weight: 700;
}

.movie-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: var(--slate-300);
}

.movie-body h3 {
    margin: 0 0 8px;
    color: var(--slate-900);
    font-size: 18px;
    line-height: 1.25;
}

.movie-body h3 a:hover {
    color: var(--primary-700);
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag {
    display: inline-flex;
    padding: 5px 9px;
    color: var(--primary-800);
    border-radius: 999px;
    background: var(--primary-50);
    font-size: 12px;
    font-weight: 800;
}

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

.category-tile,
.category-card-large {
    border: 1px solid var(--slate-200);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.category-tile {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 193, 7, .28), transparent 30%),
        linear-gradient(135deg, #fff, var(--primary-50));
    transition: .22s ease;
}

.category-tile:hover,
.category-card-large:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.category-tile span {
    color: var(--slate-900);
    font-size: 22px;
    font-weight: 900;
}

.category-tile em {
    margin-top: 8px;
    color: var(--slate-600);
    font-size: 14px;
    font-style: normal;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 88px;
    padding: 22px;
    border: 1px solid var(--slate-200);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

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

.media-row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: var(--slate-50);
    transition: .2s ease;
}

.media-row:hover {
    background: var(--primary-50);
}

.media-row img {
    width: 74px;
    height: 54px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--slate-200);
}

.media-row-body {
    min-width: 0;
}

.media-row strong,
.media-row em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-row strong {
    color: var(--slate-900);
    font-size: 14px;
}

.media-row em {
    color: var(--slate-500);
    font-size: 12px;
    font-style: normal;
}

.mini-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--slate-900);
    border-radius: 999px;
    background: var(--accent-500);
    font-size: 12px;
    font-weight: 900;
}

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

.page-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 24px 40px;
}

.small-hero,
.category-hero {
    min-height: 320px;
}

.page-hero h1 {
    max-width: 900px;
    margin: 16px 0 14px;
    color: var(--slate-900);
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.04;
    letter-spacing: -.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--slate-600);
    font-size: 18px;
}

.inline-filter,
.search-page-form {
    margin-top: 26px;
    align-items: stretch;
}

.inline-filter input,
.search-page-form input {
    width: min(560px, 100%);
    height: 48px;
}

.inline-filter button,
.search-page-form button {
    height: 48px;
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    transition: .22s ease;
}

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

.category-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--slate-200);
}

.category-card-large h2 {
    margin: 8px 0 10px;
    color: var(--slate-900);
}

.category-card-large p {
    color: var(--slate-600);
}

.empty-state {
    padding: 44px 24px;
    color: var(--slate-500);
    text-align: center;
    border: 1px dashed var(--slate-300);
    border-radius: 18px;
    background: #fff;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 24px 0;
    color: var(--slate-500);
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 34px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 24px 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: var(--slate-200);
    box-shadow: var(--shadow-hard);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.detail-info h1 {
    margin: 16px 0 14px;
    color: var(--slate-900);
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.05;
    letter-spacing: -.05em;
}

.detail-line {
    max-width: 780px;
    margin: 0 0 22px;
    color: var(--slate-600);
    font-size: 20px;
}

.detail-meta span {
    color: var(--primary-800);
    border-color: var(--primary-100);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.detail-tags {
    margin: 20px 0 26px;
}

.player-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow-hard);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: #fff;
    border: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, .45), rgba(15, 23, 42, .88));
    cursor: pointer;
}

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

.player-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    color: var(--slate-900);
    border-radius: 999px;
    background: var(--accent-500);
    font-size: 34px;
    box-shadow: var(--shadow-hard);
}

.player-cover strong {
    max-width: 80%;
    font-size: clamp(22px, 4vw, 36px);
    line-height: 1.2;
    text-align: center;
}

.detail-content {
    padding-top: 42px;
    padding-bottom: 0;
}

.content-card {
    padding: 30px;
    border: 1px solid var(--slate-200);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.content-card p {
    color: var(--slate-700);
    font-size: 17px;
}

.site-footer {
    margin-top: 60px;
    color: var(--slate-300);
    background: var(--slate-900);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px;
}

.footer-logo strong {
    color: #fff;
}

.footer-logo em,
.footer-brand p,
.site-footer a,
.footer-bottom {
    color: var(--slate-400);
}

.footer-brand p {
    max-width: 540px;
    margin: 18px 0 0;
}

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

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

.site-footer a:hover {
    color: #fff;
}

.footer-bottom {
    padding: 20px 24px;
    border-top: 1px solid var(--slate-800);
    text-align: center;
    font-size: 14px;
}

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

    .split-section {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }

    .category-large-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .navbar {
        padding: 0 16px;
    }

    .nav-links,
    .nav-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-search input {
        width: 100%;
    }

    .hero {
        height: 680px;
    }

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

    .hero p {
        font-size: 17px;
    }

    .hero-controls {
        bottom: 24px;
        width: calc(100% - 32px);
    }

    .section-wrap,
    .page-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

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

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

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

    .detail-hero {
        grid-template-columns: 1fr;
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .player-section {
        padding-left: 16px;
        padding-right: 16px;
    }

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

@media (max-width: 560px) {
    .brand-text strong {
        font-size: 17px;
    }

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

    .grid-4,
    .grid-3,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .mobile-links {
        grid-template-columns: 1fr;
    }

    .inline-filter,
    .search-page-form,
    .mobile-search {
        flex-direction: column;
        align-items: stretch;
    }

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

    .hero-arrow {
        width: 38px;
        height: 38px;
    }

    .movie-body p {
        min-height: auto;
    }

    .player-box {
        border-radius: 16px;
    }

    .content-card {
        padding: 22px;
    }
}
