:root {
    --primary-50: #e6f2f8;
    --primary-100: #cce5f1;
    --primary-400: #3397c7;
    --primary-600: #006494;
    --primary-700: #004b6f;
    --primary-800: #00324a;
    --secondary-600: #147494;
    --accent-50: #fef9e7;
    --accent-600: #c49c0c;
    --neutral-50: #f8f9fa;
    --neutral-100: #f1f3f5;
    --neutral-200: #e9ecef;
    --neutral-300: #dee2e6;
    --neutral-400: #ced4da;
    --neutral-500: #adb5bd;
    --neutral-600: #6c757d;
    --neutral-700: #495057;
    --neutral-900: #212529;
    --white: #ffffff;
    --shadow-soft: 0 2px 15px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.16);
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --container: 80rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--neutral-50);
    color: var(--neutral-900);
    font-family: 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;
}

.container {
    width: min(100% - 2rem, var(--container));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 5rem;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    box-shadow: var(--shadow-soft);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

.brand-text strong {
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    letter-spacing: -0.02em;
}

.brand-text small {
    color: var(--neutral-600);
    font-size: 0.78rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.45rem;
    color: var(--neutral-700);
    font-weight: 600;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover,
.text-link:hover {
    color: var(--primary-600);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--neutral-300);
    border-radius: 0.8rem;
    background: var(--white);
    overflow: hidden;
}

.header-search input,
.mobile-search input,
.filter-panel input {
    border: 0;
    outline: 0;
    background: transparent;
    min-width: 14rem;
    padding: 0.72rem 0.9rem;
}

.header-search button,
.mobile-search button {
    border: 0;
    color: var(--white);
    background: var(--primary-600);
    padding: 0.72rem 1rem;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 0.75rem;
    background: var(--neutral-100);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 1.2rem;
    height: 2px;
    margin: 0.27rem auto;
    background: var(--neutral-700);
}

.mobile-nav {
    display: none;
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--neutral-200);
    background: var(--white);
}

.mobile-nav a {
    display: block;
    padding: 0.8rem 0.5rem;
    color: var(--neutral-700);
    font-weight: 600;
}

.home-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-700), var(--primary-600) 48%, var(--secondary-600));
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.16), transparent 28rem),
        radial-gradient(circle at 80% 30%, rgba(196, 156, 12, 0.26), transparent 24rem),
        linear-gradient(135deg, rgba(0, 50, 74, 0.45), rgba(0, 0, 0, 0.2));
}

.hero-shell {
    position: relative;
    padding: clamp(3rem, 7vw, 6rem) 0 3rem;
}

.hero-slide {
    display: none;
    align-items: center;
    grid-template-columns: minmax(0, 1.08fr) minmax(18rem, 0.62fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    min-height: 28rem;
}

.hero-slide.is-active {
    display: grid;
    animation: heroFade 520ms ease both;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-50);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-weight: 700;
    font-size: 0.85rem;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 1rem 0 0.7rem;
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero-copy h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.55rem, 4vw, 2.6rem);
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    max-width: 48rem;
    color: var(--primary-50);
    font-size: clamp(1rem, 2.4vw, 1.22rem);
}

.hero-tags,
.tag-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    border-radius: 999px;
    padding: 0.34rem 0.7rem;
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.6rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    border-radius: 0.75rem;
    padding: 0.8rem 1.15rem;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.btn-light {
    color: var(--primary-700);
    background: var(--white);
}

.btn-glass {
    color: var(--white);
    background: rgba(0, 50, 74, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-medium);
    transform: rotate(1.2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: rgba(0, 0, 0, 0.68);
    font-size: 0.86rem;
    font-weight: 800;
}

.hero-controls {
    display: flex;
    gap: 0.55rem;
    margin-top: 1.8rem;
}

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

.hero-dot.is-active {
    background: var(--white);
}

.hero-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.hero-category-links a {
    border-radius: 999px;
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    font-weight: 700;
}

.hero-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.section-block {
    padding: clamp(2.8rem, 6vw, 4.5rem) 0;
}

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

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.2rem;
    margin-bottom: 1.7rem;
}

.section-heading h2 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 0;
    color: var(--neutral-600);
}

.text-link {
    color: var(--primary-600);
    font-weight: 800;
}

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

.movie-card {
    min-width: 0;
}

.movie-card-link {
    display: grid;
    overflow: hidden;
    height: 100%;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--primary-100), var(--neutral-200));
}

.movie-card-compact .poster-frame {
    aspect-ratio: 4 / 3;
}

.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.movie-card-link:hover img {
    transform: scale(1.05);
}

.card-badge,
.score-badge {
    position: absolute;
    top: 0.65rem;
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    color: var(--white);
    font-size: 0.76rem;
    font-weight: 800;
}

.card-badge {
    left: 0.65rem;
    background: var(--primary-600);
}

.score-badge {
    right: 0.65rem;
    background: var(--accent-600);
}

.card-content {
    display: grid;
    gap: 0.4rem;
    padding: 1rem;
}

.card-content strong {
    color: var(--neutral-900);
    font-size: 1.05rem;
    line-height: 1.35;
}

.card-content em,
.card-content small {
    color: var(--neutral-600);
    font-style: normal;
    font-size: 0.86rem;
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.75rem;
    color: var(--neutral-700);
    font-size: 0.9rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row span {
    background: var(--primary-50);
    color: var(--primary-700);
}

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

.category-tile,
.category-overview-card {
    display: grid;
    gap: 0.6rem;
    min-height: 8.5rem;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-xl);
    padding: 1.2rem;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.category-tile strong,
.category-overview-card strong {
    color: var(--primary-700);
    font-size: 1.2rem;
}

.category-tile span,
.category-overview-card em {
    color: var(--neutral-600);
    font-style: normal;
}

.category-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
}

.category-images img {
    aspect-ratio: 3 / 4;
    width: 100%;
    border-radius: 0.6rem;
    object-fit: cover;
    background: var(--neutral-200);
}

.ranking-section {
    background: var(--neutral-100);
}

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

.ranking-list-large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ranking-link {
    display: grid;
    align-items: center;
    grid-template-columns: auto 6.5rem minmax(0, 1fr);
    gap: 1rem;
    min-height: 7.5rem;
    border-radius: var(--radius-xl);
    padding: 0.8rem;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.ranking-number {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    color: var(--white);
    background: var(--primary-600);
    font-weight: 900;
}

.ranking-link img {
    width: 6.5rem;
    aspect-ratio: 16 / 9;
    border-radius: 0.75rem;
    object-fit: cover;
    background: var(--neutral-200);
}

.ranking-copy {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.ranking-copy strong {
    font-size: 1.05rem;
}

.ranking-copy em,
.ranking-copy small {
    color: var(--neutral-600);
    font-style: normal;
}

.final-cta {
    padding-top: 2rem;
}

.cta-card,
.page-hero,
.detail-hero {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-700), var(--primary-600) 48%, var(--secondary-600));
}

.cta-card {
    border-radius: var(--radius-2xl);
    padding: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    box-shadow: var(--shadow-medium);
}

.cta-card h2 {
    margin: 0 0 0.8rem;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.cta-card p {
    max-width: 44rem;
    margin: 0 auto;
    color: var(--primary-50);
}

.center-buttons {
    justify-content: center;
}

.page-hero {
    padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.compact-hero .breadcrumbs {
    margin-bottom: 1rem;
}

.page-hero h1 {
    max-width: 58rem;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.breadcrumbs a:hover {
    color: var(--white);
}

.filter-panel {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-xl);
    padding: 1.1rem;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.filter-panel label {
    display: grid;
    gap: 0.4rem;
    color: var(--neutral-700);
    font-weight: 800;
}

.filter-panel input {
    width: 100%;
    border: 1px solid var(--neutral-300);
    border-radius: 0.75rem;
    background: var(--neutral-50);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.filter-chips button {
    border: 1px solid var(--neutral-300);
    border-radius: 999px;
    padding: 0.5rem 0.8rem;
    color: var(--neutral-700);
    background: var(--white);
    cursor: pointer;
}

.filter-chips button.is-active {
    color: var(--white);
    border-color: var(--primary-600);
    background: var(--primary-600);
}

.empty-state {
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    color: var(--neutral-600);
    background: var(--white);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.detail-hero {
    padding: clamp(2.8rem, 6vw, 5rem) 0;
}

.detail-grid {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(15rem, 0.38fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-medium);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: var(--neutral-200);
}

.detail-copy h1 {
    margin-top: 1rem;
}

.detail-meta {
    margin: 1.1rem 0;
}

.player-section {
    background: var(--neutral-900);
    color: var(--white);
}

.detail-section-heading p {
    color: var(--neutral-300);
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    background: #000000;
    box-shadow: var(--shadow-medium);
}

.player-box video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 0.75rem;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72));
    cursor: pointer;
    text-align: center;
}

.player-box.is-playing .player-cover {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 999px;
    color: var(--primary-700);
    background: var(--white);
    font-size: 1.7rem;
    box-shadow: var(--shadow-medium);
}

.player-cover strong {
    padding: 0 1rem;
    font-size: clamp(1.2rem, 3vw, 2rem);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.3rem;
}

.content-card {
    border-radius: var(--radius-xl);
    padding: 1.35rem;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.content-card h2 {
    margin: 0 0 0.75rem;
    color: var(--primary-700);
}

.content-card p {
    margin: 0;
    color: var(--neutral-700);
}

.wide-card {
    grid-column: 1 / -1;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
}

.info-list div {
    border-radius: 0.8rem;
    padding: 0.9rem;
    background: var(--neutral-50);
}

.info-list dt {
    color: var(--neutral-600);
    font-size: 0.82rem;
}

.info-list dd {
    margin: 0.25rem 0 0;
    color: var(--neutral-900);
    font-weight: 800;
}

.neighbor-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.neighbor-links a {
    flex: 1;
    border-radius: var(--radius-xl);
    padding: 1rem;
    color: var(--primary-700);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    font-weight: 800;
}

.site-footer {
    color: var(--neutral-300);
    background: var(--neutral-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding: 3rem 0;
}

.footer-logo .brand-text strong {
    color: var(--white);
}

.footer-logo .brand-text small,
.footer-brand p,
.site-footer li,
.footer-bottom {
    color: var(--neutral-400);
}

.footer-brand p {
    max-width: 34rem;
}

.site-footer h2 {
    margin: 0 0 1rem;
    color: var(--white);
    font-size: 1.05rem;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--neutral-700);
    padding: 1.2rem 0;
    font-size: 0.9rem;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1100px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

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

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

@media (max-width: 820px) {
    .hero-slide,
    .detail-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 22rem;
    }

    .hero-mini-grid,
    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .ranking-list,
    .ranking-list-large {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 1rem, var(--container));
    }

    .header-inner {
        min-height: 4rem;
    }

    .brand-text small {
        display: none;
    }

    .hero-shell {
        padding-top: 2.2rem;
    }

    .hero-mini-grid,
    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .ranking-list,
    .ranking-list-large,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .ranking-link {
        grid-template-columns: auto 5.2rem minmax(0, 1fr);
    }

    .ranking-link img {
        width: 5.2rem;
    }

    .neighbor-links,
    .footer-bottom {
        flex-direction: column;
    }

    .info-list {
        grid-template-columns: 1fr;
    }
}
