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

:root {
    --primary: #ee7f38;
    --primary-dark: #d85f18;
    --primary-soft: #fff1e6;
    --secondary: #26313f;
    --muted: #6b7280;
    --warm: #fff8f6;
    --line: #f0ddd5;
    --white: #ffffff;
    --shadow: 0 22px 60px rgba(94, 47, 23, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--secondary);
    background: radial-gradient(circle at top left, #fff0df 0, transparent 28rem), var(--warm);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(240, 221, 213, 0.85);
    backdrop-filter: blur(18px);
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #f3ba36);
    box-shadow: 0 12px 30px rgba(238, 127, 56, 0.35);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.main-nav a,
.header-search {
    padding: 10px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 700;
    transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.header-search:hover {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.header-search {
    background: var(--secondary);
    color: #fff;
}

.header-search:hover {
    color: #fff;
    background: var(--primary);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--primary-soft);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--primary-dark);
}

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

.page-main {
    padding: 34px 0 70px;
}

.hero {
    position: relative;
    width: min(1240px, calc(100% - 28px));
    margin: 26px auto 44px;
    border-radius: 34px;
    overflow: hidden;
    min-height: 640px;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 1s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(16, 24, 39, 0.92) 0%, rgba(16, 24, 39, 0.66) 43%, rgba(16, 24, 39, 0.1) 100%), linear-gradient(0deg, rgba(16, 24, 39, 0.95), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 620px;
    padding: 90px 64px 190px;
    color: #fff;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 18px 0 18px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 0.96;
    letter-spacing: -0.07em;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags span,
.detail-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.24);
}

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

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

.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #f1b82f);
    box-shadow: 0 16px 34px rgba(238, 127, 56, 0.34);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(238, 127, 56, 0.42);
}

.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn.ghost:hover {
    background: rgba(255, 255, 255, 0.24);
}

.hero-rail {
    position: absolute;
    left: 40px;
    right: 40px;
    bottom: 34px;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.hero-dot {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    padding: 8px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    cursor: pointer;
    transition: 0.2s ease;
}

.hero-dot.active,
.hero-dot:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-2px);
}

.hero-dot img {
    width: 46px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
    flex: 0 0 auto;
}

.hero-dot span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.category-strip,
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 52px;
}

.category-tile,
.category-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 42px rgba(103, 64, 44, 0.08);
    transition: 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
    transform: translateY(-4px);
    border-color: #f2b178;
    box-shadow: 0 24px 60px rgba(103, 64, 44, 0.14);
}

.category-tile span,
.category-card span {
    display: block;
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 8px;
}

.category-tile strong,
.category-card p {
    margin: 0;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.7;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 24px;
}

.section-heading h2 {
    margin: 6px 0 0;
    font-size: clamp(28px, 3vw, 42px);
    letter-spacing: -0.05em;
}

.section-heading a {
    color: var(--primary-dark);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(240, 221, 213, 0.85);
    box-shadow: 0 16px 40px rgba(88, 52, 32, 0.08);
    transition: 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 64px rgba(88, 52, 32, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.15;
    overflow: hidden;
    background: #1f2937;
}

.large-card .poster-link {
    aspect-ratio: 16 / 10;
}

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

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

.poster-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 58%);
    opacity: 0.75;
}

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(238, 127, 56, 0.92);
    font-size: 13px;
    font-weight: 900;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #111827, var(--primary));
}

.card-body {
    padding: 16px;
}

.card-meta,
.detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.card-meta a,
.detail-meta a {
    color: var(--primary-dark);
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.32;
    letter-spacing: -0.03em;
}

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

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

.tag-row span {
    padding: 6px 9px;
    border-radius: 999px;
    color: #8a4a20;
    background: var(--primary-soft);
    border: 1px solid #f6d5bf;
    font-size: 12px;
    font-weight: 800;
}

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

.rank-panel {
    position: sticky;
    top: 96px;
    border-radius: 26px;
    padding: 22px;
    background: #111827;
    color: #fff;
    box-shadow: var(--shadow);
}

.rank-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.rank-title span {
    font-size: 24px;
    font-weight: 900;
}

.rank-title a {
    color: #f4bc43;
    font-weight: 800;
}

.rank-line {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.rank-line span {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 900;
}

.rank-line strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-line em {
    color: rgba(255, 255, 255, 0.64);
    font-size: 13px;
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    padding: 54px;
    margin-bottom: 28px;
    color: #fff;
    background: linear-gradient(135deg, #111827, #5b2c17 52%, var(--primary));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 12px 0;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.06em;
}

.page-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.8;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, 180px);
    gap: 14px;
    padding: 16px;
    margin-bottom: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 42px rgba(103, 64, 44, 0.08);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid #ead4ca;
    border-radius: 16px;
    padding: 0 14px;
    color: var(--secondary);
    background: #fff;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(238, 127, 56, 0.12);
}

.empty-state {
    display: none;
    padding: 30px;
    margin: 0 0 24px;
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: #fff;
}

.empty-state.show {
    display: block;
}

.category-card {
    min-height: 160px;
}

.containerless-block {
    margin-top: 50px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--muted);
    font-weight: 700;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    border-radius: 32px;
    padding: 34px;
    color: #fff;
    background: radial-gradient(circle at top right, rgba(238, 127, 56, 0.45), transparent 30rem), #111827;
    box-shadow: var(--shadow);
}

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

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

.detail-info h1 {
    margin: 12px 0 16px;
    font-size: clamp(36px, 5vw, 70px);
    line-height: 1.02;
    letter-spacing: -0.07em;
}

.detail-one-line {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.8;
}

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

.player-section {
    margin: 30px 0;
}

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

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: contain;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    display: grid;
    place-items: center;
    color: #fff;
    cursor: pointer;
    background: radial-gradient(circle, rgba(238, 127, 56, 0.28), rgba(0, 0, 0, 0.45));
}

.player-start span {
    width: 94px;
    height: 94px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    background: linear-gradient(135deg, var(--primary), #f2be35);
    box-shadow: 0 24px 60px rgba(238, 127, 56, 0.45);
    font-size: 36px;
}

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

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 32px 0 50px;
}

.detail-content article {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 28px;
    background: #fff;
    box-shadow: 0 14px 42px rgba(103, 64, 44, 0.08);
}

.detail-content h2 {
    margin: 0 0 16px;
    font-size: 26px;
    letter-spacing: -0.04em;
}

.detail-content p {
    margin: 0;
    color: #4b5563;
    line-height: 2;
    white-space: pre-line;
}

.site-footer {
    margin-top: 60px;
    color: rgba(255, 255, 255, 0.78);
    background: #111827;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 1fr;
    gap: 32px;
}

.footer-logo {
    color: #fff;
}

.site-footer p {
    max-width: 520px;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-weight: 700;
}

.footer-links.compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-content: start;
}

.footer-links a:hover {
    color: #f2be35;
}

.footer-bottom {
    padding: 18px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.is-filter-hidden {
    display: none;
}

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

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

    .rank-panel {
        position: static;
    }
}

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

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero {
        min-height: 720px;
        border-radius: 24px;
    }

    .hero-content {
        padding: 54px 28px 260px;
    }

    .hero-rail {
        left: 18px;
        right: 18px;
        bottom: 18px;
        grid-template-columns: repeat(2, 1fr);
    }

    .category-strip,
    .category-grid,
    .movie-grid,
    .library-grid,
    .ranking-grid,
    .detail-content,
    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .filter-panel .search-field {
        grid-column: 1 / -1;
    }

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

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

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

    .hero {
        width: min(100% - 20px, 1240px);
        margin-top: 14px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-dot span {
        display: none;
    }

    .hero-dot {
        justify-content: center;
    }

    .page-hero,
    .detail-hero {
        padding: 28px;
        border-radius: 24px;
    }

    .category-strip,
    .category-grid,
    .movie-grid,
    .library-grid,
    .ranking-grid,
    .detail-content,
    .footer-inner,
    .filter-panel {
        grid-template-columns: 1fr;
    }

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