:root {
    --primary-50: #fef7ee;
    --primary-100: #fdecd3;
    --primary-500: #f07315;
    --primary-600: #e1590b;
    --primary-700: #bb420b;
    --accent-500: #d9804f;
    --secondary-500: #0fcaaa;
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-300: #d6d3d1;
    --neutral-500: #78716c;
    --neutral-600: #57534e;
    --neutral-700: #44403c;
    --neutral-800: #292524;
    --neutral-900: #1c1917;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(41, 37, 36, 0.12);
    --shadow-xl: 0 22px 55px rgba(41, 37, 36, 0.18);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--neutral-800);
    background: var(--neutral-50);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    box-shadow: 0 10px 22px rgba(225, 89, 11, 0.24);
}

.brand-text {
    font-size: 20px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
    color: var(--neutral-600);
    font-size: 14px;
    font-weight: 650;
}

.main-nav a,
.mobile-panel a,
.footer-links a,
.text-link {
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.top-search {
    display: flex;
    width: 280px;
    overflow: hidden;
    border: 1px solid var(--neutral-200);
    border-radius: 999px;
    background: #ffffff;
}

.top-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 10px 14px;
    color: var(--neutral-700);
}

.top-search button,
.search-page-form button {
    border: 0;
    color: #ffffff;
    background: var(--primary-600);
    padding: 0 18px;
    cursor: pointer;
}

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

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--neutral-800);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--neutral-200);
    padding: 12px 16px 18px;
    background: #ffffff;
}

.mobile-panel a {
    display: block;
    padding: 10px 0;
    color: var(--neutral-700);
    font-weight: 650;
}

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

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: #ffffff;
    background: var(--neutral-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 54px;
    align-items: center;
    position: relative;
    z-index: 2;
    padding: 84px 0 104px;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-title-row h1 {
    margin: 12px 0 18px;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.08em;
}

.hero-copy p,
.page-hero p,
.detail-title-row p {
    max-width: 690px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-600);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero .eyebrow,
.page-hero .eyebrow,
.detail-hero .eyebrow {
    color: var(--primary-100);
}

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

.hero-tags span,
.tag-row 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: 700;
}

.hero .hero-tags span,
.detail-hero .hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-light {
    color: var(--primary-700);
    background: #ffffff;
    box-shadow: var(--shadow-lg);
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
}

.btn-primary {
    color: #ffffff;
    background: var(--primary-600);
}

.btn-full {
    width: 100%;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
    aspect-ratio: 3 / 4;
    background: var(--neutral-800);
}

.hero-poster img,
.poster-wrap img,
.detail-cover,
.ranking-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.hero-dots button {
    width: 38px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: #ffffff;
}

.section {
    padding: 76px 0;
}

.section-soft {
    background: #ffffff;
}

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

.section-head-inline {
    align-items: center;
}

.section-head h2,
.panel-head h2,
.content-card h2,
.info-panel h2 {
    margin: 6px 0 8px;
    color: var(--neutral-800);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.12;
    letter-spacing: -0.05em;
}

.section-head p,
.panel-head p {
    max-width: 700px;
    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: 22px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--neutral-200);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    border-color: var(--primary-100);
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--primary-100), var(--neutral-200));
}

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

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(28, 25, 23, 0.72);
    font-size: 12px;
    font-weight: 750;
    backdrop-filter: blur(6px);
}

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

.movie-card h3 {
    margin: 0 0 6px;
    color: var(--neutral-800);
    font-size: 18px;
    line-height: 1.25;
}

.card-meta,
.card-line {
    margin: 0 0 10px;
    color: var(--neutral-600);
    font-size: 13px;
}

.card-line {
    min-height: 42px;
}

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

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

.movie-card-compact .card-line,
.movie-card-compact .tag-row {
    display: none;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
}

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

.category-card,
.category-overview-card a,
.ranking-panel,
.info-panel,
.content-card,
.player-card {
    display: block;
    border: 1px solid var(--neutral-200);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.category-card,
.category-overview-card a {
    min-height: 168px;
    padding: 22px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-overview-card a:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.category-card span,
.category-overview-card h2 {
    display: block;
    color: var(--neutral-800);
    font-size: 22px;
    font-weight: 850;
}

.category-card strong {
    display: inline-flex;
    margin: 10px 0;
    color: var(--primary-600);
    font-size: 34px;
}

.category-card p,
.category-overview-card p {
    margin: 0;
    color: var(--neutral-600);
}

.sample-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.sample-links strong {
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--primary-700);
    background: var(--primary-50);
    font-size: 12px;
}

.ranking-panel {
    position: sticky;
    top: 92px;
    align-self: start;
    padding: 24px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border-radius: 16px;
    background: var(--neutral-50);
}

.rank-item span,
.ranking-number {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    font-weight: 850;
}

.rank-item strong,
.ranking-row h2 {
    color: var(--neutral-800);
}

.rank-item p,
.ranking-row p {
    margin: 3px 0 0;
    color: var(--neutral-600);
    font-size: 13px;
}

.filter-box input,
.search-page-form input {
    width: min(420px, 100%);
    min-height: 46px;
    border: 1px solid var(--neutral-200);
    border-radius: 999px;
    outline: 0;
    padding: 0 18px;
    background: #ffffff;
}

.filter-box input:focus,
.search-page-form input:focus,
.top-search input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(240, 115, 21, 0.14);
}

.no-result {
    margin-top: 24px;
    color: var(--neutral-600);
    font-weight: 700;
}

.page-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 16% 12%, rgba(240, 115, 21, 0.55), transparent 30%),
        linear-gradient(135deg, var(--neutral-900), var(--neutral-800) 55%, #3f1d10);
    padding: 84px 0;
}

.page-hero h1 {
    margin-bottom: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.ranking-board {
    display: grid;
    gap: 14px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 48px 112px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--neutral-200);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.ranking-row img {
    height: 126px;
    border-radius: 16px;
    background: var(--neutral-200);
}

.ranking-row h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.ranking-row strong {
    display: block;
    margin-top: 8px;
    color: var(--neutral-700);
}

.search-page-form {
    display: flex;
    max-width: 700px;
    margin-top: 26px;
    overflow: hidden;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
}

.search-page-form input {
    width: 100%;
    border: 0;
    border-radius: 0;
}

.search-page-form button {
    padding: 0 28px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: var(--neutral-900);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(0px);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 72px 0 58px;
}

.detail-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 34px;
    align-items: end;
}

.detail-cover {
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.detail-section {
    padding-top: 44px;
}

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

.detail-main {
    display: grid;
    gap: 22px;
}

.player-card,
.content-card,
.info-panel {
    padding: 22px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
    cursor: pointer;
}

.player-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    color: var(--primary-700);
    background: #ffffff;
    font-size: 26px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.36);
}

.content-card h2,
.info-panel h2 {
    font-size: 26px;
}

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

.detail-aside {
    position: sticky;
    top: 92px;
}

.info-panel dl {
    display: grid;
    gap: 12px;
    margin: 16px 0 18px;
}

.info-panel dl div {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--neutral-200);
}

.info-panel dt {
    color: var(--neutral-500);
    font-weight: 700;
}

.info-panel dd {
    margin: 0;
    color: var(--neutral-800);
    font-weight: 750;
}

.detail-tags {
    margin-bottom: 20px;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 36px;
}

.footer-brand {
    color: #ffffff;
    font-size: 20px;
}

.site-footer p {
    max-width: 420px;
    color: var(--neutral-400);
}

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

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

.footer-bottom {
    margin-top: 42px;
    padding: 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--neutral-400);
    text-align: center;
    font-size: 14px;
}

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

    .top-search {
        margin-left: auto;
    }

    .menu-toggle {
        display: block;
    }

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

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

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

    .ranking-panel,
    .detail-aside {
        position: static;
    }
}

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

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

    .top-search {
        display: none;
    }

    .hero {
        min-height: 760px;
    }

    .hero-content,
    .detail-title-row,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-cover {
        width: min(280px, 80vw);
        margin: 0 auto;
    }

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

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

    .ranking-row {
        grid-template-columns: 42px 80px 1fr;
        gap: 12px;
    }

    .ranking-row img {
        height: 96px;
    }
}

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

    .hero-copy h1,
    .hero-copy h2,
    .page-hero h1,
    .detail-title-row h1 {
        font-size: 38px;
    }

    .hero-actions,
    .search-page-form {
        flex-direction: column;
        border-radius: 20px;
    }

    .search-page-form button {
        min-height: 46px;
    }

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .category-grid,
    .category-overview-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-compact {
        display: grid;
        grid-template-columns: 110px 1fr;
    }

    .movie-card-compact a {
        display: contents;
    }

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

    .ranking-row {
        grid-template-columns: 38px 1fr;
    }

    .ranking-row img {
        display: none;
    }
}
