:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-850: #172033;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --amber-100: #fef3c7;
    --text: #1f2937;
    --shadow: 0 20px 35px rgba(15, 23, 42, 0.16);
    --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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;
    color: #ffffff;
    background: linear-gradient(90deg, var(--slate-800), var(--slate-700), var(--slate-800));
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 18px 30px rgba(2, 6, 23, 0.22);
}

.nav-shell {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark,
.footer-brand span {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--slate-900);
    background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.35);
}

.brand strong {
    display: block;
    font-size: 20px;
    letter-spacing: 0.03em;
}

.brand small {
    display: block;
    margin-top: 1px;
    color: var(--slate-300);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 600;
}

.desktop-nav a,
.nav-dropdown > a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-dropdown:hover > a {
    color: var(--amber-400);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 210px;
    padding: 10px;
    display: grid;
    gap: 2px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-panel a {
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--slate-200);
}

.dropdown-panel a:hover {
    background: rgba(51, 65, 85, 0.9);
}

.nav-search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 290px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(203, 213, 225, 0.12);
    overflow: hidden;
}

.nav-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 10px 90px 10px 18px;
}

.nav-search input::placeholder,
.hero-search input::placeholder,
.filter-bar input::placeholder {
    color: #94a3b8;
}

.nav-search button,
.hero-search button {
    position: absolute;
    right: 4px;
    border: 0;
    border-radius: 999px;
    padding: 7px 15px;
    color: var(--slate-900);
    background: var(--amber-400);
    font-weight: 700;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 0;
    color: #ffffff;
    background: transparent;
    font-size: 28px;
}

.mobile-nav {
    display: grid;
    gap: 10px;
    padding: 12px 24px 20px;
    border-top: 1px solid rgba(203, 213, 225, 0.15);
    background: var(--slate-800);
}

.mobile-nav a {
    padding: 10px 0;
}

.mobile-nav form {
    display: flex;
    gap: 8px;
}

.mobile-nav input {
    min-width: 0;
    flex: 1;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    color: #ffffff;
    background: var(--slate-700);
}

.mobile-nav button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: var(--amber-400);
    font-weight: 700;
}

.hero {
    position: relative;
    min-height: 500px;
    height: 70vh;
    overflow: hidden;
    background: var(--slate-900);
}

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.45), rgba(15, 23, 42, 0.18));
}

.hero-content {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 12%;
    width: min(1180px, calc(100% - 48px));
    transform: translateX(-50%);
    color: #ffffff;
}

.hero-label,
.section-kicker {
    display: inline-flex;
    width: max-content;
    align-items: center;
    border-radius: 999px;
    padding: 5px 12px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.94);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-content h1 {
    max-width: 880px;
    margin: 18px 0 14px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    font-weight: 900;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 20px;
    color: var(--slate-200);
    font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-meta span,
.card-meta span {
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(15, 23, 42, 0.65);
    color: var(--slate-200);
    font-size: 13px;
}

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

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

.primary-btn {
    color: #ffffff;
    background: var(--amber-500);
}

.primary-btn:hover,
.section-link:hover {
    background: var(--amber-600);
    transform: translateY(-1px);
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(8px);
}

.ghost-btn:hover {
    color: var(--slate-900);
    background: rgba(255, 255, 255, 0.92);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.52);
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.75);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--amber-500);
}

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

.pale-section {
    background: var(--slate-50);
}

.white-section {
    background: #ffffff;
}

.dark-section {
    color: #ffffff;
    background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.section-shell {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}

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

.section-heading h2 {
    margin: 12px 0 4px;
    color: inherit;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.15;
    font-weight: 900;
}

.section-heading p {
    max-width: 720px;
    margin: 0;
    color: var(--slate-500);
}

.dark-section .section-heading p {
    color: var(--slate-300);
}

.section-link {
    color: #ffffff;
    background: var(--amber-500);
}

.card-grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dark-section .movie-card {
    background: rgba(255, 255, 255, 0.08);
}

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

.card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--slate-800);
}

.movie-card.compact .card-cover {
    aspect-ratio: 3 / 4;
}

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

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

.card-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 4px 10px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.68);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: 12px;
    right: auto;
    color: var(--slate-900);
    background: var(--amber-400);
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: var(--slate-800);
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.dark-section .card-body h3 {
    color: #ffffff;
}

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

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

.dark-section .card-body p {
    color: var(--slate-300);
}

.card-meta span {
    background: var(--slate-100);
    color: var(--slate-600);
}

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

.category-tile,
.category-card {
    min-height: 134px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    border: 1px solid rgba(251, 191, 36, 0.20);
    border-radius: var(--radius);
    padding: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(15, 23, 42, 0.92));
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong,
.category-card h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
}

.category-tile span,
.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.category-card span {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 900;
    letter-spacing: 0.08em;
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}

.ranking-box {
    position: sticky;
    top: 92px;
    border-radius: var(--radius);
    padding: 26px;
    color: #ffffff;
    background: linear-gradient(160deg, var(--slate-800), var(--slate-950));
    box-shadow: var(--shadow);
}

.ranking-box h2 {
    margin: 14px 0 20px;
    font-size: 30px;
    font-weight: 900;
}

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

.ranking-list a {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border-radius: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease;
}

.ranking-list a:hover {
    background: rgba(245, 158, 11, 0.18);
}

.ranking-list span {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--slate-900);
    background: var(--amber-400);
    font-weight: 900;
}

.ranking-list strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ranking-list em {
    color: var(--slate-300);
    font-size: 13px;
    font-style: normal;
}

.page-hero {
    position: relative;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.24), transparent 28%), linear-gradient(135deg, var(--slate-900), var(--slate-950));
}

.small-hero,
.search-hero,
.ranking-hero {
    padding: 86px 0;
}

.page-hero-inner {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.page-hero h1 {
    margin: 16px 0 12px;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.08;
    font-weight: 900;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--slate-300);
    font-size: 18px;
}

.filter-bar,
.hero-search {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 28px;
}

.hero-search {
    max-width: 720px;
    grid-template-columns: minmax(220px, 1fr) 120px;
    position: relative;
    margin-top: 30px;
}

.filter-bar input,
.filter-bar select,
.hero-search input {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(100, 116, 139, 0.18);
    border-radius: 14px;
    padding: 0 16px;
    color: var(--slate-800);
    background: #ffffff;
    outline: 0;
}

.hero-search button {
    position: static;
    min-height: 48px;
    border: 0;
    color: var(--slate-950);
}

.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 30px;
}

.pager:last-child {
    margin: 30px 0 0;
}

.pager a,
.pager span {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--slate-700);
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.pager a.active,
.pager a:hover {
    color: var(--slate-900);
    background: var(--amber-400);
    font-weight: 900;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: var(--slate-950);
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px) saturate(1.1);
    transform: scale(1.06);
    opacity: 0.42;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.84), rgba(2, 6, 23, 0.65));
}

.detail-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 54px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--slate-300);
    font-size: 14px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 38px;
    margin-top: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    background: var(--slate-800);
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    margin: 16px 0 16px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.05;
    font-weight: 950;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 24px;
    color: var(--slate-200);
    font-size: 19px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-tags span {
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--amber-100);
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(251, 191, 36, 0.22);
    font-size: 14px;
}

.player-section {
    padding: 0 0 70px;
    background: linear-gradient(180deg, var(--slate-950), var(--slate-900));
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

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

.player-overlay span {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--slate-900);
    background: var(--amber-400);
    font-size: 34px;
    box-shadow: 0 18px 35px rgba(245, 158, 11, 0.38);
}

.player-overlay strong {
    font-size: 20px;
}

.detail-text-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 34px;
    align-items: start;
}

.detail-article,
.detail-side {
    border-radius: var(--radius);
    padding: 30px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 14px;
    color: var(--slate-900);
    font-size: 26px;
    font-weight: 900;
}

.detail-article p {
    margin: 0 0 28px;
    color: var(--slate-600);
    font-size: 17px;
}

.detail-article p:last-child {
    margin-bottom: 0;
}

.detail-side dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.detail-side div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    border-bottom: 1px solid var(--slate-100);
    padding-bottom: 12px;
}

.detail-side dt {
    color: var(--slate-500);
}

.detail-side dd {
    margin: 0;
    color: var(--slate-800);
    font-weight: 700;
}

.search-result-title {
    margin-bottom: 22px;
    color: var(--slate-800);
    font-size: 26px;
    font-weight: 900;
}

.site-footer {
    color: var(--slate-300);
    background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.footer-shell {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 48px 0 34px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 34px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.footer-shell p {
    max-width: 520px;
    margin: 16px 0 0;
}

.footer-shell h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.footer-links {
    display: grid;
    gap: 8px;
}

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

.footer-links a:hover {
    color: var(--amber-400);
}

.footer-bottom {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    padding: 20px 0 28px;
    text-align: center;
    font-size: 14px;
}

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

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

    .three-cols,
    .four-cols,
    .category-grid,
    .category-page-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ranking-layout,
    .detail-text-grid,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .ranking-box {
        position: static;
    }
}

@media (max-width: 760px) {
    .nav-shell,
    .section-shell,
    .page-hero-inner,
    .detail-shell,
    .footer-shell,
    .footer-bottom {
        width: min(100% - 28px, 1280px);
        padding-left: 0;
        padding-right: 0;
    }

    .hero {
        height: 620px;
    }

    .hero-content {
        width: calc(100% - 32px);
        bottom: 82px;
    }

    .hero-arrow {
        display: none;
    }

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

    .section-heading {
        display: block;
    }

    .section-link {
        margin-top: 18px;
    }

    .three-cols,
    .four-cols,
    .two-feature-grid,
    .category-grid,
    .category-page-grid {
        grid-template-columns: 1fr;
    }

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

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

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }

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

    .detail-hero {
        min-height: auto;
    }
}
