:root {
    --bg: #f9fafb;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --blue: #2563eb;
    --blue-dark: #1e3a8a;
    --purple: #9333ea;
    --orange: #ea580c;
    --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--text);
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.logo-text {
    font-size: 20px;
    letter-spacing: -0.03em;
}

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

.nav-link {
    color: #4b5563;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #eff6ff;
    color: var(--blue);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.hero {
    background: #0f172a;
}

.hero-viewport {
    position: relative;
    min-height: 600px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 680px;
    color: #ffffff;
    padding: 110px 0 90px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(37, 99, 235, 0.9);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.eyebrow.dark {
    color: var(--blue);
    background: #eff6ff;
}

.hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 620px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags .tag,
.detail-tags .tag {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(14px);
}

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

.primary-button,
.ghost-button,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    background: var(--blue);
    color: #ffffff;
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.32);
}

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

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.text-button {
    min-height: 40px;
    color: var(--blue);
    background: #eff6ff;
}

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(14px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

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

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

.section-head h2,
.search-band h2,
.page-hero h1,
.detail-intro h1,
.detail-copy h2,
.detail-side h2 {
    margin: 10px 0 0;
    color: var(--text);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-head h2,
.search-band h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-head a {
    color: var(--blue);
    font-weight: 800;
}

.search-band {
    padding: 34px 0;
    background: linear-gradient(135deg, #eff6ff, #faf5ff 52%, #fff7ed);
    border-bottom: 1px solid #e5e7eb;
}

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

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 8px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.search-box input {
    min-height: 48px;
    width: 100%;
    border: 0;
    outline: 0;
    padding: 0 14px;
    color: var(--text);
    background: transparent;
}

.search-box button {
    border: 0;
    border-radius: 14px;
    padding: 0 18px;
    color: #ffffff;
    background: var(--blue);
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius);
    color: #ffffff;
    isolation: isolate;
    box-shadow: var(--shadow);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    transform: scale(1.03);
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.1);
}

.tile-glow {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.88));
}

.category-tile strong,
.category-tile em {
    position: absolute;
    left: 20px;
    right: 20px;
}

.category-tile strong {
    bottom: 72px;
    font-size: 24px;
    font-style: normal;
}

.category-tile em {
    bottom: 22px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-style: normal;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
}

.filter-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 16px;
    color: #4b5563;
    background: #ffffff;
    font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    border-color: var(--blue);
    background: var(--blue);
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card.is-hidden {
    display: none;
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
}

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

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

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

.watch-chip {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    font-size: 13px;
    font-weight: 800;
}

.rank-badge {
    position: absolute;
    z-index: 2;
    left: 12px;
    top: 12px;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--purple));
    font-weight: 900;
    box-shadow: 0 10px 25px rgba(234, 88, 12, 0.3);
}

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

.movie-meta-line,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-meta-line span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
}

.movie-meta-line span + span::before,
.detail-meta span + span::before {
    content: "·";
    margin-right: 8px;
    color: #c4c8cf;
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.3;
}

.movie-card h3 a:hover {
    color: var(--blue);
}

.movie-card p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.rank-section {
    background: #ffffff;
}

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

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #1e3a8a 55%, #581c87);
    padding: 72px 0;
}

.page-hero h1 {
    color: #ffffff;
    max-width: 760px;
    font-size: clamp(38px, 5vw, 64px);
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
}

.compact-hero {
    padding: 82px 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: #ffffff;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    overflow: hidden;
    padding: 18px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.overview-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    background: #dbeafe;
}

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

.category-overview-card h2 {
    margin: 8px 0 8px;
    font-size: 28px;
}

.category-overview-card p {
    margin: 0 0 14px;
    color: var(--muted);
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.mini-links a {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--blue);
    background: #eff6ff;
    font-size: 13px;
    font-weight: 800;
}

.detail-hero {
    color: #ffffff;
    background-size: cover;
    background-position: center;
    padding: 52px 0 62px;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
    background: rgba(255, 255, 255, 0.12);
}

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

.detail-intro h1 {
    color: #ffffff;
    max-width: 820px;
    font-size: clamp(38px, 6vw, 70px);
}

.intro-line {
    max-width: 760px;
    margin: 18px 0 18px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.detail-meta {
    margin: 18px 0 28px;
    color: rgba(255, 255, 255, 0.78);
}

.player-section {
    padding-bottom: 32px;
    background: #0f172a;
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.38);
}

.movie-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
    text-align: center;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    background: var(--blue);
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.44);
    font-size: 36px;
    text-indent: 4px;
}

.player-overlay strong {
    padding: 0 20px;
    font-size: clamp(20px, 4vw, 34px);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

.detail-copy,
.detail-side {
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.detail-copy {
    padding: 30px;
}

.detail-copy-block + .detail-copy-block {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.detail-copy h2,
.detail-side h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.detail-copy p {
    margin: 0;
    color: #374151;
    font-size: 17px;
}

.detail-side {
    padding: 20px;
}

.side-card-list {
    display: grid;
    gap: 16px;
}

.side-card-list .movie-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    box-shadow: none;
    border: 1px solid var(--line);
}

.side-card-list .poster-wrap {
    height: 100%;
}

.side-card-list .tag-row,
.side-card-list .movie-card p {
    display: none;
}

.site-footer {
    padding: 48px 0;
    background: #111827;
    color: #ffffff;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.footer-logo .logo-text {
    color: #ffffff;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
}

.site-footer p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
}

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

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

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

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

    .mobile-toggle {
        display: flex;
    }

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

    .hero-arrow {
        display: none;
    }

    .search-grid,
    .detail-hero-grid,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

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

    .detail-poster {
        width: min(260px, 70vw);
    }
}

@media (max-width: 520px) {
    .container,
    .header-inner,
    .mobile-nav,
    .footer-inner,
    .hero-content {
        width: min(100% - 22px, 1180px);
    }

    .logo-text {
        font-size: 18px;
    }

    .hero h1,
    .detail-intro h1,
    .page-hero h1 {
        letter-spacing: -0.04em;
    }

    .movie-grid,
    .category-grid {
        gap: 14px;
    }

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

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

    .search-box {
        grid-template-columns: 1fr;
    }

    .side-card-list .movie-card {
        grid-template-columns: 96px 1fr;
    }
}
