:root {
    --bg: #fff7ed;
    --bg-soft: #fffbeb;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(251, 146, 60, 0.24);
    --brand: #d97706;
    --brand-strong: #c2410c;
    --brand-deep: #9a3412;
    --rose: #e11d48;
    --card: rgba(255, 255, 255, 0.92);
    --shadow: 0 20px 55px rgba(146, 64, 14, 0.16);
    --shadow-hover: 0 30px 70px rgba(146, 64, 14, 0.26);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.22), transparent 32rem),
        linear-gradient(135deg, #fff7ed 0%, #fffbeb 48%, #fff1f2 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.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.86);
    backdrop-filter: blur(20px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #78350f;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c, #e11d48);
    box-shadow: 0 12px 26px rgba(234, 88, 12, 0.32);
    font-size: 15px;
}

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

.nav-link,
.mobile-link {
    color: #78350f;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 999px;
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #fff;
    background: linear-gradient(135deg, #d97706, #ea580c);
    box-shadow: 0 12px 25px rgba(217, 119, 6, 0.25);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(146, 64, 14, 0.14);
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #78350f;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.03);
    transition: opacity 0.65s ease, transform 0.75s ease, visibility 0.65s ease;
    background-image: linear-gradient(90deg, rgba(20, 10, 0, 0.86) 0%, rgba(120, 53, 15, 0.62) 42%, rgba(190, 18, 60, 0.22) 100%), var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    width: min(760px, calc(100% - 32px));
    margin-left: max(24px, calc((100vw - 1180px) / 2));
    color: #fff;
}

.hero-kicker,
.page-hero span {
    display: inline-flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fffbeb;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    font-weight: 800;
    font-size: 14px;
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(18px, 2.4vw, 24px);
}

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

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #d97706, #ea580c, #e11d48);
    box-shadow: 0 18px 35px rgba(217, 119, 6, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 22px 45px rgba(217, 119, 6, 0.46);
}

.btn-outline {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.08);
}

.btn-outline:hover {
    color: #b45309;
    background: #fff;
}

.btn-light {
    color: #b45309;
    background: #fff;
}

.btn-outline-dark {
    color: #78350f;
    border-color: rgba(120, 53, 15, 0.24);
    background: rgba(255, 255, 255, 0.72);
}

.hero-side {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    top: 50%;
    z-index: 4;
    width: 290px;
    transform: translateY(-50%);
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 26px;
    background: rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.26);
}

.hero-side strong {
    color: #fff;
    font-size: 18px;
}

.hero-mini-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 800;
}

.hero-mini-card img {
    width: 72px;
    height: 54px;
    border-radius: 14px;
    object-fit: cover;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    transition: 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: #fff;
}

.section-pad {
    padding: 72px 0;
}

.soft-section {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.88), rgba(255, 237, 213, 0.88));
}

.section-heading {
    margin-bottom: 34px;
    text-align: center;
}

.heading-icon {
    color: #f59e0b;
    font-size: 26px;
}

.section-heading h2 {
    margin: 6px 0 8px;
    color: #1f2937;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 0 auto;
    max-width: 680px;
    color: var(--muted);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    transition: 0.28s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

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

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

.card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    font-size: 42px;
    transition: 0.25s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    background: rgba(0, 0, 0, 0.32);
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #d97706, #ea580c);
    font-size: 12px;
    font-weight: 900;
}

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

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

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

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

.movie-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #92400e;
    font-size: 13px;
    font-weight: 800;
}

.movie-meta span,
.rank-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #fffbeb;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-list span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #b45309;
    background: #fef3c7;
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    border-radius: 24px;
    color: #fff;
    box-shadow: var(--shadow);
    isolation: isolate;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(69, 26, 3, 0.84));
}

.category-card img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.category-card span {
    font-size: 22px;
    font-weight: 950;
}

.category-card small {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.45;
}

.rank-section {
    color: #fff;
    background: linear-gradient(135deg, #b45309, #ea580c 48%, #be123c);
}

.rank-section .section-heading h2,
.rank-section .section-heading p,
.rank-section .heading-icon {
    color: #fff;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 92px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 14px 35px rgba(124, 45, 18, 0.12);
}

.rank-section .rank-item {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
}

.rank-number {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #e11d48);
    font-weight: 950;
}

.rank-cover img {
    width: 92px;
    height: 70px;
    border-radius: 16px;
    object-fit: cover;
}

.rank-content h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 950;
}

.rank-content p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14px;
}

.rank-section .rank-content p,
.rank-section .rank-meta {
    color: rgba(255, 255, 255, 0.84);
}

.rank-section .rank-meta span {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.center-actions {
    justify-content: center;
    margin-top: 32px;
}

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

.page-hero {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    padding: 72px max(24px, calc((100vw - 1180px) / 2));
    color: #fff;
    background-image: linear-gradient(110deg, rgba(69, 26, 3, 0.92), rgba(180, 83, 9, 0.76), rgba(225, 29, 72, 0.45)), var(--hero-image);
    background-size: cover;
    background-position: center;
}

.compact-hero,
.rank-hero {
    background: linear-gradient(135deg, #92400e, #ea580c 54%, #be123c);
}

.page-hero h1 {
    max-width: 860px;
    margin: 0 0 12px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.05em;
}

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

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

.category-overview-card {
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.category-cover-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    height: 150px;
    overflow: hidden;
}

.category-cover-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overview-card div {
    padding: 22px;
}

.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 950;
}

.category-overview-card p {
    margin: 0 0 14px;
    color: var(--muted);
}

.text-link {
    color: var(--brand-strong);
    font-weight: 900;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px 170px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 16px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 30px rgba(124, 45, 18, 0.08);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: #92400e;
    font-size: 13px;
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(217, 119, 6, 0.24);
    border-radius: 14px;
    color: #1f2937;
    background: #fff;
    outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 24px 0 0;
    color: #92400e;
    font-weight: 800;
}

.detail-main {
    background: radial-gradient(circle at top right, rgba(251, 146, 60, 0.2), transparent 36rem);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 28px;
    padding: 28px 0 48px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.28);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ea580c, #e11d48);
    box-shadow: 0 20px 45px rgba(234, 88, 12, 0.45);
    font-size: 34px;
}

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

.detail-card,
.detail-content-card {
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.93);
    box-shadow: var(--shadow);
}

.detail-card {
    align-self: start;
    padding: 26px;
}

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

.detail-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #d97706, #ea580c);
    font-size: 12px;
    font-weight: 900;
}

.detail-card h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #92400e;
}

.stars {
    display: flex;
    gap: 2px;
    color: #f59e0b;
}

.lead-text {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    color: #4b5563;
    background: #fffbeb;
    font-weight: 700;
}

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

.info-grid div {
    padding: 12px;
    border-radius: 14px;
    background: #fff7ed;
}

.info-grid dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.info-grid dd {
    margin: 3px 0 0;
    font-weight: 900;
}

.detail-tag-list {
    margin: 18px 0;
}

.detail-content-card {
    padding: 26px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(217, 119, 6, 0.18);
}

.tab-button {
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    font-weight: 900;
}

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

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel h2 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 950;
}

.tab-panel p {
    margin: 0;
    color: #374151;
    white-space: pre-line;
}

.prev-next-links {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(217, 119, 6, 0.18);
}

.prev-next-links a {
    color: var(--brand-strong);
    font-weight: 900;
}

.related-section {
    padding-top: 42px;
}

.site-footer {
    color: #fff7ed;
    background: #431407;
}

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

.footer-logo {
    color: #fff;
}

.site-footer p {
    max-width: 520px;
    margin: 12px 0 0;
    color: rgba(255, 247, 237, 0.72);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: start;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 247, 237, 0.86);
    font-weight: 800;
}

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

    .menu-toggle {
        display: inline-flex;
    }

    .hero-side {
        display: none;
    }

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

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

    .home-rank,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }
}

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

    .site-logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 34px;
        height: 34px;
    }

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

    .hero-content {
        margin-left: 16px;
        width: calc(100% - 32px);
    }

    .hero-actions,
    .detail-actions,
    .prev-next-links {
        flex-direction: column;
        align-items: stretch;
    }

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

    .rank-item {
        grid-template-columns: 42px 74px 1fr;
        gap: 10px;
    }

    .rank-cover img {
        width: 74px;
        height: 60px;
    }

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

    .section-pad {
        padding: 48px 0;
    }

    .page-hero {
        min-height: 280px;
        padding: 56px 16px;
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}
