* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #020617;
    color: #e5e7eb;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 12% 6%, rgba(245, 158, 11, 0.18), transparent 28%),
        radial-gradient(circle at 82% 0%, rgba(30, 41, 59, 0.9), transparent 34%),
        linear-gradient(180deg, #0f172a 0%, #020617 42%, #020617 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.82);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    backdrop-filter: blur(18px);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.45);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    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;
    color: #ffffff;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #111827;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.brand-name {
    font-size: 20px;
}

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

.nav-link,
.mobile-nav-link {
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.92);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    background: #e5e7eb;
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

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

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.04);
    transform: scale(1.04);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.32) 72%, rgba(2, 6, 23, 0.86) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.14) 34%, rgba(2, 6, 23, 0.56) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    padding: 88px 0 104px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 370px;
    align-items: center;
    gap: 72px;
}

.hero-kicker,
.eyebrow {
    margin: 0 0 10px;
    color: #f59e0b;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.16em;
    font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.hero-desc {
    max-width: 720px;
    margin: 24px 0 0;
    color: #d1d5db;
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.genre-links a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #fef3c7;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    font-size: 12px;
}

.hero-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}

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

.btn:hover,
.search-form button:hover,
.quick-search button:hover {
    transform: translateY(-2px);
}

.btn.primary,
.search-form button,
.quick-search button {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 16px 32px rgba(245, 158, 11, 0.28);
}

.btn.ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.64);
    backdrop-filter: blur(12px);
}

.btn.subtle {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.18);
}

.hero-poster {
    display: block;
    border-radius: 30px;
    overflow: hidden;
    transform: rotate(2deg);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
}

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 5;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 26px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    transition: width 0.2s ease, background 0.2s ease;
}

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

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

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

.section-head h2,
.search-band h2,
.rank-panel-head h2,
.content-card h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.035em;
}

.section-action,
.text-link {
    color: #fbbf24;
    font-weight: 800;
}

.search-band {
    position: relative;
    margin-top: -1px;
    padding: 32px 0;
    background: rgba(15, 23, 42, 0.7);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.search-band-inner {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    align-items: center;
    gap: 24px;
}

.quick-search,
.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.quick-search input,
.search-form input,
.search-form select,
.filter-search input {
    width: 100%;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    outline: none;
    padding: 13px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-search input:focus,
.search-form input:focus,
.search-form select:focus,
.filter-search input:focus {
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.keyword-row {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keyword-row a {
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
}

.category-grid,
.movie-grid,
.overview-grid,
.podium-grid {
    display: grid;
    gap: 24px;
}

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

.category-tile,
.category-overview-card,
.movie-card,
.rank-panel,
.content-card,
.player-card,
.detail-info,
.podium-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.78));
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.28);
}

.category-tile,
.movie-card,
.podium-card {
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover,
.movie-card:hover,
.podium-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.48);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    height: 158px;
    background: #0f172a;
}

.category-covers img,
.category-cover-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-tile-body {
    padding: 18px;
}

.category-tile h3,
.movie-card h3,
.category-overview-card h2,
.podium-card h2 {
    margin: 0;
    color: #ffffff;
}

.category-tile p,
.movie-card p,
.category-overview-card p,
.podium-card p,
.content-card p,
.detail-one-line {
    color: #cbd5e1;
}

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

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

.movie-card {
    min-width: 0;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

.poster-year {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 5px 10px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.92);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

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

.movie-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    color: #94a3b8;
    font-size: 12px;
}

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

.movie-card h3 a:hover,
.rank-title:hover,
.rank-row:hover strong {
    color: #fbbf24;
}

.movie-card p {
    min-height: 48px;
    margin: 8px 0 0;
    font-size: 14px;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 4px 12px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.55);
}

.rank-num {
    grid-row: span 2;
    color: #f59e0b;
    font-size: 18px;
    font-weight: 900;
}

.rank-title {
    color: #ffffff;
    font-weight: 800;
}

.rank-info {
    color: #94a3b8;
    font-size: 12px;
}

.page-hero {
    position: relative;
    padding: 102px 0 72px;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 20%, rgba(245, 158, 11, 0.16), transparent 30%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.72));
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.page-hero p {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 18px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    padding: 18px;
    align-items: center;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 180px;
    overflow: hidden;
    border-radius: 18px;
    background: #0f172a;
}

.filter-toolbar {
    margin-bottom: 28px;
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) 1.2fr;
    gap: 18px;
    align-items: center;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.filter-chip {
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: 8px 12px;
}

.filter-chip.active,
.filter-chip:hover {
    color: #111827;
    background: #f59e0b;
    border-color: #f59e0b;
}

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

.podium-card {
    min-height: 420px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.podium-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.podium-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.18));
    z-index: 1;
}

.podium-card > *:not(img) {
    position: relative;
    z-index: 2;
}

.podium-rank {
    width: fit-content;
    padding: 6px 10px;
    color: #111827;
    background: #f59e0b;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
}

.rank-table {
    display: grid;
    gap: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 64px 62px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-row:hover {
    border-color: rgba(245, 158, 11, 0.36);
}

.rank-order {
    color: #f59e0b;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

.rank-row img {
    width: 62px;
    height: 86px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-row-main {
    display: grid;
    gap: 4px;
}

.rank-row-main strong {
    color: #ffffff;
}

.rank-row-main em,
.rank-row-meta {
    color: #94a3b8;
    font-style: normal;
    font-size: 13px;
}

.search-form {
    grid-template-columns: minmax(220px, 1fr) 180px 160px auto;
    margin-bottom: 20px;
}

.search-status {
    min-height: 26px;
    margin-bottom: 18px;
    color: #cbd5e1;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 34px 0 64px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(18px) saturate(1.05);
    transform: scale(1.08);
    opacity: 0.32;
}

.detail-backdrop-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.72), #020617 94%),
        radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.18), transparent 30%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 28px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fbbf24;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
    gap: 26px;
    align-items: stretch;
}

.player-card {
    min-height: 520px;
    background: #000000;
}

.movie-player {
    width: 100%;
    height: 100%;
    min-height: 520px;
    display: block;
    background: #000000;
    object-fit: contain;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.78));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    font-size: 30px;
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.36);
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 4;
    color: #fecaca;
    pointer-events: none;
}

.detail-info {
    padding: 18px;
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    align-content: start;
}

.detail-poster {
    width: 150px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
}

.detail-copy h1 {
    font-size: clamp(30px, 3.2vw, 48px);
}

.detail-meta {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-meta span {
    color: #d1d5db;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.content-card {
    padding: 28px;
}

.content-card.small-card {
    grid-column: 1 / -1;
}

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

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

.site-footer {
    padding: 42px 0;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.9);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

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

.footer-links a:hover {
    color: #fbbf24;
}

[hidden],
.is-filter-hidden {
    display: none !important;
}

@media (max-width: 1100px) {
    .category-grid,
    .movie-grid,
    .home-grid,
    .related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .split-layout,
    .detail-grid,
    .search-band-inner {
        grid-template-columns: 1fr;
    }

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

    .hero-content {
        grid-template-columns: 1fr 300px;
        gap: 36px;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-carousel,
    .hero-content {
        min-height: 760px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding-top: 68px;
        padding-bottom: 120px;
    }

    .hero-poster {
        width: min(260px, 70vw);
        margin: 0 auto;
    }

    .category-grid,
    .movie-grid,
    .home-grid,
    .related-grid,
    .overview-grid,
    .podium-grid,
    .detail-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-overview-card,
    .detail-info,
    .filter-toolbar,
    .rank-row {
        grid-template-columns: 1fr;
    }

    .rank-row-meta {
        justify-self: start;
    }

    .filter-chips {
        justify-content: flex-start;
    }

    .search-form,
    .quick-search {
        grid-template-columns: 1fr;
    }

    .detail-info {
        display: block;
    }

    .detail-poster {
        width: 180px;
        margin-bottom: 18px;
    }
}

@media (max-width: 560px) {
    .header-inner {
        height: 64px;
    }

    .brand-name {
        font-size: 17px;
    }

    .hero-copy h1,
    .page-hero h1 {
        font-size: 38px;
    }

    .hero-actions,
    .inline-actions,
    .footer-inner,
    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-grid,
    .movie-grid,
    .home-grid,
    .related-grid,
    .overview-grid,
    .podium-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .category-covers {
        height: 210px;
    }

    .player-card,
    .movie-player {
        min-height: 300px;
    }
}
