:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-strong: rgba(30, 41, 59, 0.92);
    --text: #f3f4f6;
    --muted: #9ca3af;
    --muted-strong: #cbd5e1;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --amber-soft: #fde68a;
    --red: #dc2626;
    --red-dark: #7f1d1d;
    --border: rgba(127, 29, 29, 0.38);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 4%, rgba(220, 38, 38, 0.18), transparent 32rem),
        radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(16px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber), var(--red));
    color: white;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.24);
}

.logo-text {
    background: linear-gradient(90deg, var(--amber-soft), #fca5a5, var(--amber-soft));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: #e5e7eb;
    font-weight: 600;
}

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

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

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.76);
    color: #f8fafc;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--border);
    padding: 12px 0 18px;
}

.mobile-nav a {
    display: block;
    padding: 12px 4px;
    color: #e5e7eb;
    font-weight: 600;
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    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;
    transform: scale(1.02);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.62) 44%, rgba(2, 6, 23, 0.26) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 42%, rgba(2, 6, 23, 0.3) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    right: 24px;
    bottom: 90px;
    z-index: 2;
    max-width: 760px;
}

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--amber-soft);
    background: rgba(120, 53, 15, 0.38);
    border: 1px solid rgba(245, 158, 11, 0.36);
    font-size: 0.92rem;
    font-weight: 700;
}

.hero-title {
    margin: 0 0 18px;
    font-size: clamp(2.4rem, 6vw, 5.8rem);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.46);
}

.hero-desc {
    max-width: 720px;
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: clamp(1rem, 2vw, 1.25rem);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    background: linear-gradient(90deg, var(--amber), var(--red));
    color: white;
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.22);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.74);
    color: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.22);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.46);
    color: white;
    font-size: 1.6rem;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-1px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.main-section {
    padding: 64px 0;
}

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

.section-title {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.2;
    font-weight: 900;
}

.section-subtitle {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

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

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

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

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

.card-link,
.movie-card-inner {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover,
.movie-card-inner:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 24px 46px rgba(127, 29, 29, 0.24);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 54%);
}

.badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(90deg, var(--amber), var(--red));
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.poster-year {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    color: #f8fafc;
    font-size: 0.78rem;
    font-weight: 700;
}

.card-body {
    padding: 18px;
}

.card-title {
    margin: 0 0 9px;
    color: #f8fafc;
    font-size: 1.08rem;
    line-height: 1.35;
    font-weight: 850;
}

.card-link:hover .card-title {
    color: var(--amber-light);
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted-strong);
    font-size: 0.92rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta,
.detail-meta,
.rank-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.86rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    font-size: 0.76rem;
}

.horizontal-card .card-link {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 0;
}

.horizontal-card .poster-wrap {
    aspect-ratio: 3 / 4;
}

.large-card .card-link {
    display: grid;
    grid-template-columns: minmax(220px, 42%) 1fr;
}

.large-card .poster-wrap {
    aspect-ratio: 16 / 11;
}

.category-card {
    position: relative;
    padding: 26px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(127, 29, 29, 0.32), rgba(120, 53, 15, 0.22)),
        rgba(15, 23, 42, 0.78);
    min-height: 210px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.42);
}

.category-card h3 {
    margin: 0 0 12px;
    font-size: 1.4rem;
}

.category-card p {
    margin: 0 0 22px;
    color: #cbd5e1;
}

.category-card .category-count {
    display: inline-flex;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.48);
    color: var(--amber-soft);
    font-weight: 800;
}

.feature-band {
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.26), rgba(120, 53, 15, 0.22));
}

.page-hero {
    padding: 70px 0 46px;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(circle at 80% 12%, rgba(245, 158, 11, 0.14), transparent 24rem),
        linear-gradient(90deg, rgba(127, 29, 29, 0.22), rgba(15, 23, 42, 0));
}

.page-title {
    margin: 0;
    font-size: clamp(2.1rem, 5vw, 4.2rem);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.page-desc {
    max-width: 820px;
    margin: 16px 0 0;
    color: #cbd5e1;
    font-size: 1.1rem;
}

.tools-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.search-box {
    flex: 1 1 320px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #f8fafc;
}

.search-box input::placeholder {
    color: #64748b;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.84);
    color: #cbd5e1;
    font-weight: 800;
    transition: background 0.2s ease, color 0.2s ease;
}

.filter-chip.is-active,
.filter-chip:hover {
    background: linear-gradient(90deg, var(--amber), var(--red));
    color: white;
}

.empty-state {
    display: none;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.76);
    color: #cbd5e1;
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 74px 110px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.44);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--amber), var(--red));
    color: white;
    font-size: 1.05rem;
    font-weight: 900;
}

.rank-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background: #0f172a;
}

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

.rank-title {
    margin: 0 0 7px;
    color: #f8fafc;
    font-size: 1.08rem;
    font-weight: 850;
}

.rank-desc {
    margin: 0 0 10px;
    color: #cbd5e1;
    font-size: 0.92rem;
}

.rank-action {
    white-space: nowrap;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 360px;
    gap: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.68));
    color: white;
    z-index: 3;
}

.player-overlay[hidden] {
    display: none;
}

.player-play {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 20px 52px rgba(245, 158, 11, 0.28);
    font-size: 2rem;
    transform: translateZ(0);
    transition: transform 0.2s ease;
}

.player-overlay:hover .player-play {
    transform: scale(1.08);
}

.detail-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.78);
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.12;
    font-weight: 900;
}

.detail-section {
    margin-top: 26px;
}

.detail-section h2 {
    margin: 0 0 12px;
    font-size: 1.4rem;
    color: #f8fafc;
}

.detail-section p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.8;
}

.side-poster {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.72);
}

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

.side-poster-body {
    padding: 18px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0;
    color: #94a3b8;
    font-size: 0.92rem;
}

.breadcrumbs a:hover {
    color: var(--amber-light);
}

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

.related-item {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(127, 29, 29, 0.28);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.32);
}

.related-item:hover {
    border-color: rgba(245, 158, 11, 0.4);
}

.related-item img {
    width: 78px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
}

.related-item h3 {
    margin: 0 0 6px;
    font-size: 0.96rem;
}

.related-item p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.82rem;
}

.site-footer {
    margin-top: 64px;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.74), rgba(2, 6, 23, 0.94));
}

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

.footer-title {
    margin: 0 0 12px;
    color: var(--amber-soft);
    font-size: 1.05rem;
    font-weight: 850;
}

.footer-text,
.footer-links a,
.copyright {
    color: #94a3b8;
    font-size: 0.92rem;
}

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

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

.copyright {
    padding: 18px 0 28px;
    border-top: 1px solid rgba(127, 29, 29, 0.24);
}

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

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

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

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

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

    .mobile-nav.is-open {
        display: block;
    }

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

    .hero-content {
        left: 20px;
        bottom: 82px;
    }

    .hero-arrow {
        display: none;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .large-card .card-link,
    .horizontal-card .card-link {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 52px 84px 1fr;
    }

    .rank-action {
        grid-column: 2 / -1;
    }

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1280px);
    }

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

    .hero-title {
        font-size: 2.35rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .main-section {
        padding: 42px 0;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5 {
        grid-template-columns: 1fr;
    }

    .tools-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .rank-item {
        grid-template-columns: 46px 72px 1fr;
        gap: 12px;
    }

    .rank-num {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 0.92rem;
    }

    .detail-card {
        padding: 20px;
    }
}
