:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(180, 83, 9, 0.18);
    --brand: #d97706;
    --brand-dark: #92400e;
    --brand-soft: #fef3c7;
    --white: #ffffff;
    --shadow: 0 18px 40px rgba(120, 53, 15, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(135deg, #fafaf9 0%, #fff7ed 46%, #fffbeb 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(245, 158, 11, 0.18);
    background: rgba(255, 251, 235, 0.92);
    backdrop-filter: blur(16px);
}

.nav-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--brand-dark);
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, #d97706, #ea580c);
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
}

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

.site-nav a {
    padding: 10px 14px;
    color: #78350f;
    border-radius: 999px;
    font-size: 15px;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: #fff;
    background: linear-gradient(135deg, #d97706, #ea580c);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: #78350f;
    background: #fef3c7;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-bg {
    background-position: center;
    background-size: cover;
    transform: scale(1.05);
    filter: saturate(1.08);
}

.hero-overlay {
    background:
        radial-gradient(circle at 80% 25%, rgba(251, 191, 36, 0.25), transparent 34%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.78) 44%, rgba(17, 24, 39, 0.26) 100%),
        linear-gradient(0deg, rgba(17, 24, 39, 0.95) 0%, rgba(17, 24, 39, 0.1) 60%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(640px, calc(100% - 32px));
    padding-top: 142px;
    margin-left: max(24px, calc((100vw - 1280px) / 2 + 16px));
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #fcd34d;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    max-width: 760px;
}

.hero-content p {
    margin: 24px 0 0;
    max-width: 620px;
    color: #ffedd5;
    font-size: 18px;
    line-height: 1.9;
}

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #fff7ed;
    border: 1px solid rgba(253, 230, 138, 0.36);
    background: rgba(255, 255, 255, 0.12);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: #fff;
    background: linear-gradient(135deg, #d97706, #ea580c);
    box-shadow: 0 16px 30px rgba(234, 88, 12, 0.28);
}

.btn.ghost {
    color: #92400e;
    border-color: rgba(180, 83, 9, 0.2);
    background: rgba(255, 255, 255, 0.78);
}

.btn.on-dark {
    color: #fff7ed;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.14);
}

.hero-poster {
    position: absolute;
    z-index: 2;
    right: max(28px, calc((100vw - 1280px) / 2 + 16px));
    top: 118px;
    width: min(340px, 28vw);
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 30px;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.46);
}

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

.hero-thumbs {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 34px;
    width: min(1280px, calc(100% - 32px));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    transform: translateX(-50%);
}

.hero-thumb {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(17, 24, 39, 0.42);
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-thumb:hover,
.hero-thumb.is-active {
    color: #fff;
    background: rgba(217, 119, 6, 0.78);
    transform: translateY(-2px);
}

.hero-thumb img {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 12px;
}

.hero-thumb span {
    min-width: 0;
    overflow: hidden;
    text-align: left;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 700;
}

.section-wrap {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0;
}

.page-main {
    min-height: 60vh;
}

.quick-search {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 24px;
    align-items: stretch;
}

.search-panel,
.quick-links,
.rank-panel,
.page-hero,
.detail-copy article,
.filter-bar {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow);
}

.search-panel {
    padding: 28px;
}

.search-panel label {
    display: block;
    margin-bottom: 14px;
    color: #78350f;
    font-weight: 800;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.search-row input,
.filter-bar input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(180, 83, 9, 0.22);
    border-radius: 999px;
    outline: none;
    color: var(--text);
    background: #fff;
}

.search-row input:focus,
.filter-bar input:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.search-row button,
.filter-buttons button {
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #d97706, #ea580c);
    font-weight: 800;
}

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

.quick-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border-radius: 16px;
    color: #92400e;
    background: #fef3c7;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease;
}

.quick-links a:hover {
    transform: translateY(-2px);
    background: #fde68a;
}

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

.section-head.compact {
    margin-bottom: 18px;
}

.section-kicker {
    color: #d97706;
}

.section-head h2,
.page-hero h1,
.detail-text h1,
.detail-copy h2 {
    margin: 0;
    color: #111827;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.more-link {
    color: #d97706;
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(180, 83, 9, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 28px rgba(120, 53, 15, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(120, 53, 15, 0.18);
}

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

.poster-link img {
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

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

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, #d97706, #ea580c);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    color: #b45309;
    font-size: 12px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 0;
    color: #111827;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: #d97706;
}

.movie-card p {
    margin: 10px 0 14px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.7;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.55fr);
    gap: 28px;
    align-items: start;
}

.category-grid,
.category-overview-grid {
    display: grid;
    gap: 16px;
}

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

.category-tile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 126px;
    padding: 20px;
    border: 1px solid rgba(180, 83, 9, 0.16);
    border-radius: 20px;
    background: linear-gradient(135deg, #fff 0%, #fef3c7 100%);
    box-shadow: 0 12px 28px rgba(120, 53, 15, 0.08);
}

.category-tile strong {
    color: #78350f;
    font-size: 20px;
}

.category-tile span {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.7;
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.rank-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.rank-item a {
    display: grid;
    grid-template-columns: 42px 58px 1fr;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border-radius: 16px;
    background: rgba(254, 243, 199, 0.62);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item a:hover {
    background: #fde68a;
    transform: translateX(2px);
}

.rank-num {
    color: #d97706;
    font-size: 18px;
    font-weight: 900;
}

.rank-item img {
    width: 58px;
    height: 78px;
    border-radius: 12px;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-info strong {
    color: #111827;
    font-size: 15px;
}

.rank-info small {
    margin-top: 5px;
    color: #6b7280;
    font-size: 12px;
}

.page-hero {
    width: min(1280px, calc(100% - 32px));
    margin: 34px auto 0;
    padding: clamp(30px, 5vw, 58px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 20%, rgba(251, 191, 36, 0.22), transparent 32%),
        linear-gradient(135deg, #111827, #78350f);
    color: #fff;
}

.page-hero h1 {
    color: #fff;
    font-size: clamp(34px, 6vw, 62px);
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #ffedd5;
    font-size: 17px;
    line-height: 1.85;
}

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

.category-card {
    overflow: hidden;
    border: 1px solid rgba(180, 83, 9, 0.16);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
}

.category-card a {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.category-card img {
    width: 100%;
    height: 100%;
    filter: saturate(1.05);
    transition: transform 0.3s ease;
}

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

.category-card a span {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 8px 12px;
    color: #fff;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.72);
    font-weight: 900;
}

.category-card p {
    margin: 0;
    padding: 16px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.7;
}

.filter-bar {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-buttons button {
    color: #92400e;
    background: #fef3c7;
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
    color: #fff;
    background: linear-gradient(135deg, #d97706, #ea580c);
}

.movie-card.is-hidden,
.rank-item.is-hidden {
    display: none;
}

.breadcrumb {
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #92400e;
    font-size: 14px;
    font-weight: 700;
}

.detail-hero {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
    gap: 24px;
    align-items: stretch;
}

.player-card,
.detail-info {
    overflow: hidden;
    border: 1px solid rgba(180, 83, 9, 0.16);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
}

.video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-wrap video {
    width: 100%;
    height: 100%;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.56));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-button {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d97706, #ea580c);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
    font-size: 32px;
}

.detail-info {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 18px;
    padding: 18px;
}

.detail-poster {
    width: 130px;
    height: 196px;
    border-radius: 18px;
}

.detail-text h1 {
    font-size: clamp(28px, 4vw, 46px);
}

.one-line {
    margin: 14px 0;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 12px;
    font-weight: 800;
}

.large-tags span {
    min-height: 30px;
}

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

.detail-copy article {
    padding: 26px;
}

.detail-copy h2 {
    margin-bottom: 14px;
    font-size: 28px;
}

.detail-copy p {
    margin: 0;
    color: #4b5563;
    line-height: 2;
}

.site-footer {
    margin-top: 56px;
    border-top: 1px solid rgba(180, 83, 9, 0.16);
    background: rgba(255, 251, 235, 0.82);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.footer-inner p {
    margin: 0;
    color: #6b7280;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #92400e;
    font-weight: 800;
}

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

    .hero-poster {
        width: min(280px, 28vw);
    }

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

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        position: absolute;
        top: 70px;
        right: 16px;
        left: 16px;
        display: none;
        padding: 12px;
        border: 1px solid rgba(180, 83, 9, 0.18);
        border-radius: 18px;
        background: #fffbeb;
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-carousel {
        min-height: 740px;
    }

    .hero-content {
        padding-top: 104px;
        margin: 0 auto;
    }

    .hero-poster {
        display: none;
    }

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

    .hero-thumb:nth-child(n+5) {
        display: none;
    }

    .quick-search,
    .two-column-section,
    .detail-hero,
    .detail-copy {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: relative;
        top: auto;
    }

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

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

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .nav-shell,
    .section-wrap,
    .page-hero,
    .breadcrumb,
    .detail-hero,
    .footer-inner {
        width: min(100% - 22px, 1280px);
    }

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

    .hero-content p {
        font-size: 15px;
    }

    .hero-thumbs {
        bottom: 18px;
        grid-template-columns: 1fr;
    }

    .hero-thumb:nth-child(n+4) {
        display: none;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

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

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

    .movie-card p {
        display: none;
    }

    .category-grid,
    .category-overview-grid,
    .quick-links {
        grid-template-columns: 1fr;
    }

    .page-hero {
        display: block;
    }

    .detail-info {
        grid-template-columns: 96px 1fr;
    }

    .detail-poster {
        width: 96px;
        height: 144px;
    }

    .play-button {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
