:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --ink: #1c1917;
    --paper: #fffaf0;
    --shadow: 0 18px 45px rgba(120, 53, 15, 0.16);
    --soft-shadow: 0 10px 30px rgba(41, 37, 36, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, var(--stone-50) 0%, rgba(254, 243, 199, 0.45) 42%, var(--stone-100) 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.96), rgba(28, 25, 23, 0.96));
    color: var(--amber-50);
    box-shadow: 0 10px 30px rgba(28, 25, 23, 0.28);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--amber-400), var(--amber-700));
    color: white;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 22px;
    letter-spacing: 0.01em;
}

.brand-text em {
    color: var(--amber-200);
    font-style: normal;
    font-size: 12px;
}

.header-search {
    flex: 1 1 360px;
    max-width: 460px;
    display: flex;
    align-items: center;
    background: rgba(69, 26, 3, 0.45);
    border: 1px solid rgba(253, 230, 138, 0.22);
    border-radius: 999px;
    overflow: hidden;
}

.header-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
    padding: 11px 16px;
}

.header-search input::placeholder {
    color: rgba(253, 230, 138, 0.68);
}

.header-search button {
    border: 0;
    color: white;
    background: var(--amber-600);
    padding: 11px 18px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.header-search button:hover {
    background: var(--amber-700);
}

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

.main-nav > a,
.nav-group > a {
    color: var(--amber-50);
    font-weight: 700;
    font-size: 15px;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--amber-200);
}

.nav-group {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 220px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 12px;
    background: white;
    color: var(--stone-700);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.nav-dropdown a {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
}

.nav-dropdown a:hover {
    color: var(--amber-900);
    background: var(--amber-50);
}

.nav-group:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mobile-nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: rgba(253, 230, 138, 0.15);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    cursor: pointer;
}

.hero-carousel {
    position: relative;
    height: clamp(460px, 63vw, 680px);
    overflow: hidden;
    color: white;
    background: var(--stone-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.75s ease, transform 4.8s ease;
}

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

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

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(28, 25, 23, 0.92) 0%, rgba(28, 25, 23, 0.66) 42%, rgba(28, 25, 23, 0.2) 100%), linear-gradient(0deg, rgba(28, 25, 23, 0.92) 0%, rgba(28, 25, 23, 0.08) 60%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: end;
    padding: 0 0 clamp(54px, 8vw, 92px);
}

.hero-copy {
    width: min(690px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amber-200);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 7vw, 72px);
    line-height: 1.06;
    letter-spacing: -0.035em;
}

.hero-copy p {
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(16px, 2vw, 20px);
    max-width: 640px;
}

.hero-meta,
.detail-meta,
.movie-meta-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-meta span,
.detail-meta span,
.movie-meta-line span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: inherit;
    padding: 4px 10px;
    font-size: 13px;
}

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

.primary-btn,
.secondary-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: white;
    background: var(--amber-600);
    padding: 12px 22px;
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.3);
}

.primary-btn:hover {
    background: var(--amber-700);
    transform: translateY(-2px);
}

.secondary-btn {
    color: white;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    padding: 11px 20px;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: white;
    font-size: 28px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 30px;
    border-radius: 999px;
    background: var(--amber-400);
}

.section {
    padding: 58px 0 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin-bottom: 22px;
}

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.1;
    color: var(--stone-900);
}

.section-intro {
    margin: 9px 0 0;
    color: var(--stone-600);
    max-width: 760px;
}

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

.category-tile {
    min-height: 140px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, white, var(--amber-50));
    border: 1px solid rgba(180, 83, 9, 0.12);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-tile span {
    display: block;
    margin-bottom: 10px;
    color: var(--amber-900);
    font-size: 20px;
    font-weight: 900;
}

.category-tile small {
    color: var(--stone-600);
    font-size: 14px;
}

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

.movie-card {
    border-radius: 22px;
    overflow: hidden;
    background: white;
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(180, 83, 9, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--stone-900), var(--amber-900));
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(28, 25, 23, 0.86) 100%);
}

.play-dot {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--amber-600);
    box-shadow: 0 12px 26px rgba(217, 119, 6, 0.35);
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 9px;
    color: white;
    background: rgba(28, 25, 23, 0.7);
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
    backdrop-filter: blur(10px);
}

.rank-badge {
    right: auto;
    left: 12px;
    background: var(--amber-600);
}

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

.movie-card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.3;
    color: var(--stone-900);
}

.movie-card-body h3 a:hover {
    color: var(--amber-800);
}

.movie-card-body p {
    margin: 0 0 12px;
    min-height: 44px;
    color: var(--stone-600);
    font-size: 14px;
}

.movie-meta-line {
    color: var(--stone-500);
}

.movie-meta-line span {
    background: var(--stone-100);
}

.feature-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 24px;
}

.ranking-panel {
    padding: 20px;
    border-radius: 28px;
    background: linear-gradient(180deg, var(--amber-900), var(--stone-900));
    color: white;
    box-shadow: var(--shadow);
}

.ranking-panel h2 {
    margin: 0 0 18px;
    font-size: 26px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 54px 74px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(180, 83, 9, 0.1);
    box-shadow: 0 10px 26px rgba(41, 37, 36, 0.08);
}

.ranking-panel .ranking-row {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(253, 230, 138, 0.12);
}

.ranking-index {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: white;
    background: var(--amber-600);
    font-weight: 900;
}

.ranking-thumb {
    display: block;
    width: 74px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: var(--stone-800);
}

.ranking-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-info h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.ranking-info p {
    margin: 0 0 8px;
    color: var(--stone-600);
    font-size: 14px;
}

.ranking-panel .ranking-info p,
.ranking-panel .movie-meta-line {
    color: rgba(255, 255, 255, 0.72);
}

.text-link {
    color: var(--amber-800);
    padding: 9px 14px;
    background: var(--amber-50);
}

.ranking-panel .text-link {
    color: white;
    background: rgba(245, 158, 11, 0.34);
}

.page-hero {
    padding: 64px 0 38px;
    background: radial-gradient(circle at 12% 20%, rgba(245, 158, 11, 0.22), transparent 28%), linear-gradient(135deg, var(--amber-950, #451a03), var(--stone-900));
    color: white;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 6vw, 60px);
    line-height: 1.08;
}

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

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

.breadcrumb a:hover {
    color: var(--amber-200);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 0.2fr));
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 24px;
    background: white;
    box-shadow: var(--soft-shadow);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--stone-200);
    border-radius: 999px;
    padding: 12px 14px;
    outline: none;
    background: var(--stone-50);
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.empty-state {
    display: none;
    margin: 30px 0;
    padding: 32px;
    border-radius: 24px;
    text-align: center;
    color: var(--stone-600);
    background: white;
    box-shadow: var(--soft-shadow);
}

.detail-shell {
    padding: 42px 0 0;
}

.detail-top {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) 380px;
    gap: 30px;
    align-items: start;
}

.player-card {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    background: var(--stone-950, #0c0a09);
    box-shadow: 0 22px 60px rgba(28, 25, 23, 0.28);
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: black;
}

.player-frame video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: black;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(28, 25, 23, 0.08), rgba(28, 25, 23, 0.45));
    transition: opacity 0.2s ease, visibility 0.2s ease;
    cursor: pointer;
}

.player-card.is-playing .player-overlay {
    opacity: 0;
    visibility: hidden;
}

.player-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    color: white;
    background: var(--amber-600);
    font-size: 32px;
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(217, 119, 6, 0.36);
}

.player-caption {
    padding: 18px 22px;
    color: white;
    background: linear-gradient(90deg, var(--amber-900), var(--stone-900));
}

.player-caption strong {
    display: block;
    font-size: 20px;
}

.player-caption span {
    color: var(--amber-100);
    font-size: 14px;
}

.detail-aside {
    border-radius: 30px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow);
}

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

.detail-aside-body {
    padding: 20px;
}

.detail-aside-body h1 {
    margin: 0 0 12px;
    color: var(--stone-900);
    font-size: 30px;
    line-height: 1.15;
}

.detail-meta {
    color: var(--stone-600);
    margin-bottom: 16px;
}

.detail-meta span {
    background: var(--stone-100);
}

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

.tag-chip {
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--amber-900);
    background: var(--amber-100);
    font-size: 13px;
    font-weight: 700;
}

.content-card {
    margin-top: 28px;
    padding: 28px;
    border-radius: 28px;
    background: white;
    box-shadow: var(--soft-shadow);
}

.content-card h2 {
    margin: 0 0 14px;
    color: var(--stone-900);
    font-size: 28px;
}

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

.category-list-page {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.category-list-card {
    padding: 24px;
    border-radius: 24px;
    background: white;
    box-shadow: var(--soft-shadow);
}

.category-list-card h2 {
    margin: 0 0 10px;
    color: var(--amber-900);
}

.category-list-card p {
    margin: 0 0 16px;
    color: var(--stone-600);
}

.site-footer {
    margin-top: 72px;
    color: var(--amber-100);
    background: linear-gradient(180deg, var(--amber-950, #451a03), var(--stone-950, #0c0a09));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

.footer-brand {
    display: inline-block;
    margin-bottom: 12px;
    color: white;
    font-size: 26px;
    font-weight: 900;
}

.site-footer p {
    margin: 0;
    color: rgba(254, 243, 199, 0.74);
}

.site-footer h2 {
    margin: 0 0 12px;
    color: white;
    font-size: 18px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(253, 230, 138, 0.12);
}

.footer-links a:hover {
    background: rgba(253, 230, 138, 0.22);
}

.footer-bottom {
    padding: 18px;
    text-align: center;
    color: rgba(254, 243, 199, 0.74);
    border-top: 1px solid rgba(253, 230, 138, 0.12);
}

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

    .category-grid,
    .category-list-page {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .detail-aside {
        max-width: 420px;
    }
}

@media (max-width: 840px) {
    .header-inner {
        flex-wrap: wrap;
        min-height: auto;
        padding: 12px 0;
    }

    .header-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    .mobile-nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        order: 4;
        padding: 8px 0;
    }

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

    .nav-dropdown {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 8px;
    }

    .hero-control {
        display: none;
    }

    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

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

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

    .ranking-row .text-link {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .container,
    .header-inner,
    .hero-content {
        width: min(100% - 22px, 1240px);
    }

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

    .hero-carousel {
        height: 560px;
    }

    .hero-meta span {
        font-size: 12px;
    }

    .category-grid,
    .category-list-page,
    .movie-grid,
    .filter-panel {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .movie-card-body p {
        display: none;
    }

    .detail-aside-body h1 {
        font-size: 25px;
    }

    .content-card {
        padding: 22px;
    }
}

@media (max-width: 390px) {
    .category-grid,
    .category-list-page,
    .movie-grid {
        grid-template-columns: 1fr;
    }
}
