* {
    box-sizing: border-box;
}

:root {
    --primary-50: #faf8f5;
    --primary-100: #f5f0e8;
    --primary-600: #a67c4a;
    --primary-700: #8a6640;
    --secondary-50: #f0f9ff;
    --secondary-600: #0284c7;
    --accent-50: #fffbeb;
    --accent-500: #f59e0b;
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-500: #78716c;
    --neutral-600: #57534e;
    --neutral-700: #44403c;
    --neutral-800: #292524;
    --neutral-900: #1c1917;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.08);
    --shadow-lg: 0 18px 45px rgba(28, 25, 23, 0.14);
    --shadow-xl: 0 28px 70px rgba(28, 25, 23, 0.18);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
    color: var(--neutral-900);
    background: var(--neutral-50);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

[hidden] {
    display: none !important;
}

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

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
    box-shadow: 0 8px 20px rgba(166, 124, 74, 0.28);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--neutral-700);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-menu a:hover {
    color: var(--primary-700);
    background: var(--primary-50);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--primary-50);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--primary-700);
    border-radius: 2px;
}

.hero-section {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-100), var(--secondary-50), var(--accent-50));
}

.hero-background,
.hero-mask,
.hero-bg-image {
    position: absolute;
    inset: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.6s ease, transform 0.8s ease;
}

.hero-bg-image.is-active {
    opacity: 0.22;
    transform: scale(1);
}

.hero-mask {
    background: linear-gradient(90deg, rgba(255,255,255,0.96), rgba(255,255,255,0.72), rgba(255,255,255,0.35));
}

.hero-inner {
    position: relative;
    max-width: 1180px;
    min-height: 70vh;
    margin: 0 auto;
    padding: 80px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 48px;
    align-items: center;
}

.hero-copy {
    position: relative;
    min-height: 430px;
}

.hero-slide {
    position: absolute;
    inset: 0 auto auto 0;
    max-width: 760px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(22px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    color: var(--primary-600);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-slide h1 {
    margin: 14px 0 10px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-slide h2 {
    margin: 0 0 20px;
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.14;
    color: var(--primary-700);
}

.hero-summary {
    max-width: 720px;
    margin: 0 0 30px;
    color: var(--neutral-700);
    font-size: 19px;
}

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

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

.primary-button {
    color: var(--white);
    background: var(--primary-600);
    box-shadow: 0 16px 34px rgba(166, 124, 74, 0.25);
}

.primary-button:hover {
    background: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.primary-button.small {
    min-height: 38px;
    padding: 0 16px;
    font-size: 14px;
}

.ghost-button,
.section-more {
    color: var(--primary-700);
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(166, 124, 74, 0.22);
}

.ghost-button.dark {
    background: var(--neutral-900);
    color: var(--white);
    border-color: transparent;
}

.hero-panel {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 26px;
    padding: 20px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(18px);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    color: var(--neutral-600);
    font-size: 14px;
}

.panel-heading strong {
    color: var(--neutral-900);
}

.hero-tabs {
    display: grid;
    gap: 12px;
}

.hero-tab {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 18px;
    color: var(--neutral-700);
    background: rgba(250, 250, 249, 0.72);
    cursor: pointer;
    text-align: left;
    transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.hero-tab img {
    width: 82px;
    height: 58px;
    object-fit: cover;
    border-radius: 13px;
    background: var(--neutral-200);
}

.hero-tab span {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-weight: 800;
}

.hero-tab.is-active,
.hero-tab:hover {
    border-color: rgba(166, 124, 74, 0.34);
    background: var(--white);
    transform: translateY(-1px);
}

.section-block {
    max-width: 1180px;
    margin: 0 auto;
    padding: 72px 20px;
}

.tinted-section {
    max-width: none;
    background: linear-gradient(135deg, var(--secondary-50), var(--primary-50));
}

.tinted-section > .section-heading,
.tinted-section > .movie-grid,
.tinted-section > .horizontal-row,
.tinted-section > .category-grid {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

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

.section-heading h2 {
    margin: 6px 0 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--neutral-200);
}

.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-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.56));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-link::after {
    opacity: 1;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--primary-600);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rank-mark {
    position: absolute;
    z-index: 3;
    left: 12px;
    top: 12px;
    min-width: 42px;
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--accent-500), var(--primary-600));
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

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

.movie-meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--neutral-500);
    font-size: 13px;
}

.movie-meta-line span + span::before {
    content: "·";
    margin-right: 8px;
    color: var(--neutral-500);
}

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

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

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

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}

.card-tags span,
.detail-tags span {
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--primary-700);
    background: var(--primary-50);
    font-size: 12px;
    font-weight: 700;
}

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

.horizontal-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.compact-card {
    width: 210px;
    flex: 0 0 auto;
    border-radius: 18px;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

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

.compact-card span {
    display: block;
    padding: 12px;
    font-weight: 800;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ranking-preview,
.ranking-list {
    display: grid;
    gap: 18px;
}

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

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

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

.category-card,
.category-overview-card,
.story-card {
    border: 1px solid rgba(231, 229, 228, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-sm);
}

.category-card {
    padding: 22px;
}

.category-card h3,
.category-overview-copy h2 {
    margin: 8px 0;
    font-size: 24px;
}

.category-card span,
.category-overview-copy span {
    color: var(--primary-600);
    font-weight: 900;
}

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

.category-mini-links {
    display: grid;
    gap: 6px;
    margin-top: 16px;
}

.category-mini-links a {
    color: var(--neutral-700);
    font-size: 14px;
}

.category-mini-links a:hover {
    color: var(--primary-700);
}

.page-hero {
    max-width: 1180px;
    margin: 0 auto;
    padding: 72px 20px 32px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
}

.page-hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--neutral-600);
    font-size: 18px;
}

.simple-hero,
.category-hero,
.ranking-hero {
    min-height: 280px;
}

.category-overview-list {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 20px 72px;
    display: grid;
    gap: 24px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    padding: 24px;
}

.category-sample-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(150px, 0.5fr));
    gap: 12px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(231, 229, 228, 0.9);
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--neutral-600);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--neutral-200);
    border-radius: 14px;
    padding: 0 12px;
    color: var(--neutral-800);
    background: var(--neutral-50);
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(166, 124, 74, 0.55);
    box-shadow: 0 0 0 4px rgba(166, 124, 74, 0.12);
}

.breadcrumb {
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--neutral-500);
    font-size: 14px;
}

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

.detail-hero {
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px 20px 50px;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-cover {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: var(--neutral-200);
}

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

.detail-copy h1 {
    margin: 10px 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-one-line {
    margin: 0 0 24px;
    color: var(--neutral-700);
    font-size: 19px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 26px;
}

.detail-meta div {
    padding: 14px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.detail-meta span {
    display: block;
    color: var(--neutral-500);
    font-size: 12px;
    font-weight: 800;
}

.detail-meta strong {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.player-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px 54px;
}

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

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(0,0,0,0.22), rgba(0,0,0,0.72));
    cursor: pointer;
}

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

.play-circle {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--primary-700);
    background: rgba(255, 255, 255, 0.92);
    font-size: 28px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.3);
}

.player-overlay strong {
    font-size: clamp(22px, 4vw, 36px);
}

.player-overlay em {
    font-style: normal;
    color: rgba(255,255,255,0.82);
}

.detail-content {
    padding-top: 0;
}

.story-card {
    padding: 28px;
}

.story-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.story-card h2:not(:first-child) {
    margin-top: 28px;
}

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

.detail-tags {
    margin-top: 24px;
    margin-bottom: 0;
}

.sibling-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.sibling-links a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--primary-700);
    background: var(--primary-50);
    font-weight: 800;
}

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

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 52px 20px 28px;
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 180px 180px;
    gap: 32px;
}

.footer-main p {
    max-width: 520px;
    color: #a8a29e;
}

.footer-links {
    display: grid;
    gap: 10px;
    align-content: start;
}

.footer-links a {
    color: #d6d3d1;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--accent-500);
}

.footer-bottom {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #a8a29e;
    font-size: 14px;
}

@media (max-width: 1040px) {
    .hero-inner,
    .detail-hero,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        max-width: 640px;
    }

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

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

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

@media (max-width: 760px) {
    .header-inner {
        padding: 12px 16px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 64px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--neutral-200);
        border-radius: 18px;
        background: var(--white);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.is-open {
        display: flex;
    }

    .hero-inner {
        min-height: auto;
        padding: 52px 16px;
    }

    .hero-copy {
        min-height: 520px;
    }

    .hero-slide h1 {
        font-size: 38px;
    }

    .hero-summary {
        font-size: 16px;
    }

    .section-heading,
    .page-hero,
    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .dense-grid,
    .ranking-preview,
    .ranking-list,
    .category-grid,
    .filter-panel,
    .footer-main {
        grid-template-columns: 1fr;
    }

    .section-block,
    .page-hero,
    .detail-hero,
    .player-section,
    .category-overview-list {
        padding-left: 16px;
        padding-right: 16px;
    }

    .detail-cover {
        max-width: 340px;
    }

    .player-shell {
        border-radius: 18px;
    }
}
