: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: #e0a800;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --white: #ffffff;
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 4px 20px -2px rgba(0, 0, 0, 0.10), 0 10px 30px -5px rgba(0, 0, 0, 0.08);
    --shadow-hard: 0 10px 40px -5px rgba(0, 0, 0, 0.20), 0 20px 50px -10px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--slate-800);
    background: linear-gradient(180deg, var(--slate-50) 0%, #ffffff 45%, #ffffff 100%);
    font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

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

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-900));
    box-shadow: var(--shadow-medium);
}

.brand-name {
    display: block;
    color: var(--slate-900);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    display: block;
    margin-top: -2px;
    color: var(--slate-500);
    font-size: 12px;
}

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

.nav-links a,
.mobile-panel a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 10px;
    color: var(--slate-600);
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.mobile-panel a:hover,
.mobile-panel a.is-active {
    color: var(--primary-800);
    background: var(--primary-100);
}

.nav-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min(260px, 26vw);
}

.nav-search input {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 38px;
    border: 1px solid var(--slate-300);
    border-radius: 10px;
    color: var(--slate-700);
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(98, 125, 152, 0.18);
}

.nav-search span {
    position: absolute;
    left: 13px;
    color: var(--slate-500);
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    color: var(--slate-700);
    background: transparent;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--slate-200);
    background: #ffffff;
}

.mobile-panel-inner {
    display: grid;
    gap: 8px;
    padding: 12px 0 16px;
}

.mobile-panel .nav-search {
    width: 100%;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.66) 46%, rgba(15, 23, 42, 0.28) 100%);
    z-index: 1;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 420px);
    align-items: center;
    gap: 54px;
    padding: 80px 0;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 8px 16px;
    border-radius: 999px;
    color: #ffe08a;
    background: rgba(255, 193, 7, 0.18);
    backdrop-filter: blur(6px);
    font-size: 14px;
    font-weight: 800;
}

.hero-title {
    margin: 0 0 22px;
    color: #ffffff;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.hero-desc {
    max-width: 760px;
    margin: 0 0 30px;
    color: var(--slate-200);
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 24px;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px) scale(1.02);
}

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

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

.btn-glass {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
}

.hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.hero-poster {
    position: relative;
    z-index: 2;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow-hard);
}

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transform: translateY(-50%);
}

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

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

.section {
    padding: 64px 0;
}

.section.alt {
    background: linear-gradient(90deg, var(--primary-50), var(--slate-50));
}

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

.section-head h1,
.section-head h2 {
    margin: 0 0 8px;
    color: var(--slate-900);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-head p,
.page-lead {
    margin: 0;
    color: var(--slate-600);
    line-height: 1.8;
}

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

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

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

.movie-card,
.category-card,
.rank-card,
.info-panel {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover {
    border-color: var(--primary-100);
    box-shadow: var(--shadow-medium);
    transform: translateY(-4px);
}

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

.poster-wrap.aspect-video img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

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

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

.poster-wrap img {
    transition: transform 0.45s ease;
}

.poster-badge,
.rank-badge,
.type-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(6px);
    font-size: 12px;
    font-weight: 800;
}

.poster-badge {
    right: 10px;
    bottom: 10px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    color: var(--slate-900);
    background: var(--accent-500);
}

.type-badge {
    left: 10px;
    bottom: 10px;
    background: rgba(72, 101, 129, 0.82);
}

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

.movie-title {
    margin: 0 0 10px;
    color: var(--slate-900);
    font-size: 18px;
    line-height: 1.38;
    font-weight: 800;
}

.movie-card:hover .movie-title,
.rank-card:hover .movie-title {
    color: var(--primary-700);
}

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

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

.movie-meta span,
.tag-list span,
.breadcrumb a,
.breadcrumb span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--primary-700);
    background: var(--primary-50);
    font-size: 12px;
    font-weight: 800;
}

.category-card {
    padding: 22px;
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    color: var(--slate-900);
    font-size: 20px;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--slate-600);
    font-size: 14px;
    line-height: 1.7;
}

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

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

.rank-card {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
}

.rank-card .poster-wrap {
    border-radius: 14px;
}

.rank-card .movie-card-body {
    padding: 4px 4px 4px 0;
}

.page-hero {
    padding: 66px 0 42px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(255, 193, 7, 0.20), transparent 34%), linear-gradient(135deg, var(--slate-900), var(--primary-900));
}

.page-hero h1 {
    max-width: 860px;
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.12;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: var(--slate-200);
    font-size: 18px;
    line-height: 1.85;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid var(--slate-200);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--slate-300);
    border-radius: 12px;
    color: var(--slate-700);
    background: #ffffff;
    outline: none;
}

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

.player-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--slate-900);
    box-shadow: var(--shadow-hard);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.26), rgba(15, 23, 42, 0.82));
    cursor: pointer;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
}

.play-button {
    position: relative;
    z-index: 2;
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: var(--slate-900);
    background: var(--accent-500);
    box-shadow: var(--shadow-hard);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
    transform: scale(1.06);
    background: var(--accent-600);
}

.player-shell.is-playing .player-cover {
    display: none;
}

.detail-body,
.sidebar-card {
    padding: 26px;
    border: 1px solid var(--slate-200);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.detail-body h2,
.detail-body h3,
.sidebar-card h2,
.sidebar-card h3 {
    margin: 0 0 14px;
    color: var(--slate-900);
}

.detail-body p {
    margin: 0 0 18px;
    color: var(--slate-700);
    font-size: 16px;
    line-height: 1.9;
}

.detail-poster {
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: 16px;
}

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

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

.related-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.related-item:hover {
    background: var(--slate-50);
}

.related-item img {
    width: 96px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
}

.related-item strong {
    display: block;
    margin-bottom: 6px;
    color: var(--slate-900);
    line-height: 1.35;
}

.related-item span {
    color: var(--slate-500);
    font-size: 12px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    padding: 44px 0;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer p,
.site-footer a {
    color: var(--slate-400);
    line-height: 1.8;
}

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

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

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

.no-results {
    display: none;
    padding: 24px;
    border-radius: 18px;
    color: var(--slate-600);
    background: var(--slate-50);
    text-align: center;
}

@media (max-width: 1024px) {
    .nav-links,
    .navbar > .nav-search {
        display: none;
    }

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

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-poster {
        display: none;
    }

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

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

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

    .brand-name {
        font-size: 17px;
    }

    .brand-subtitle {
        font-size: 11px;
    }

    .hero-slider {
        min-height: 560px;
    }

    .hero-content {
        padding: 64px 0 88px;
    }

    .hero-arrow {
        display: none;
    }

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

    .btn,
    .hero-meta {
        width: 100%;
    }

    .section {
        padding: 44px 0;
    }

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

    .movie-grid,
    .category-grid,
    .rank-list {
        grid-template-columns: 1fr;
    }

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

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

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