:root {
    color-scheme: dark;
    --dark-950: #030407;
    --dark-900: #07090c;
    --dark-850: #0d1118;
    --dark-800: #12171e;
    --dark-700: #1d2530;
    --dark-600: #283342;
    --primary-600: #0043ad;
    --primary-500: #0056e0;
    --primary-400: #1a75ff;
    --accent-500: #e6a800;
    --accent-400: #ffc61a;
    --text-main: #ffffff;
    --text-soft: #d1d5db;
    --text-muted: #9ca3af;
    --line: rgba(255, 255, 255, 0.08);
    --card: rgba(18, 23, 30, 0.78);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(0, 86, 224, 0.18), transparent 32rem),
        radial-gradient(circle at 80% 0%, rgba(230, 168, 0, 0.15), transparent 26rem),
        linear-gradient(180deg, var(--dark-900), var(--dark-800) 48%, var(--dark-900));
    color: var(--text-main);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 9, 12, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.header-inner {
    max-width: 1180px;
    height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
    box-shadow: 0 12px 30px rgba(230, 168, 0, 0.28);
}

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

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    color: var(--text-soft);
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active,
.footer-links a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: currentColor;
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 22px 18px;
    border-top: 1px solid var(--line);
}

.mobile-nav.open {
    display: flex;
}

.page-shell,
.home-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 22px 72px;
}

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: var(--dark-900);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transform: scale(1.02);
}

.hero-slide::before,
.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-slide::before {
    background: linear-gradient(90deg, rgba(7, 9, 12, 0.96), rgba(7, 9, 12, 0.68) 42%, rgba(7, 9, 12, 0.2));
}

.hero-slide::after {
    background: linear-gradient(0deg, var(--dark-900), rgba(7, 9, 12, 0) 45%);
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1180px;
    min-height: 650px;
    margin: 0 auto;
    padding: 120px 22px 82px;
    display: grid;
    align-content: center;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    color: var(--accent-400);
    font-weight: 700;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 720px;
    margin: 16px 0 18px;
    font-size: clamp(2.5rem, 7vw, 5.6rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 660px;
    color: var(--text-soft);
    font-size: clamp(1rem, 2vw, 1.24rem);
    line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-tags,
.breadcrumbs,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-meta span,
.detail-meta span,
.movie-meta span,
.breadcrumbs a,
.breadcrumbs span {
    color: var(--text-soft);
    background: rgba(18, 23, 30, 0.72);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.84rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-400));
    color: var(--text-main);
    box-shadow: 0 18px 34px rgba(0, 86, 224, 0.32);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--line);
    color: var(--text-main);
}

.hero-panel {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 28px;
    width: min(1136px, calc(100% - 44px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(18, 23, 30, 0.68);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

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

.hero-dot {
    width: 42px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    padding: 0;
}

.hero-dot.active {
    background: var(--accent-400);
}

.hero-search {
    flex: 1;
    display: flex;
    min-width: 280px;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(7, 9, 12, 0.72);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    color: var(--text-main);
    background: transparent;
    border: 0;
    outline: 0;
    padding: 0 18px;
}

.hero-search button {
    color: #111827;
    border: 0;
    background: var(--accent-400);
    padding: 0 18px;
    font-weight: 800;
}

.section {
    margin-top: 56px;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
    margin: 6px 0 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-title p,
.detail-title p,
.detail-copy p {
    color: var(--text-soft);
    line-height: 1.8;
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 198, 26, 0.34);
    background: rgba(29, 37, 48, 0.86);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark-700), var(--dark-900));
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent 48%);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    color: #111827;
    background: var(--accent-400);
    padding: 7px 10px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    color: var(--text-main);
    background: rgba(0, 86, 224, 0.82);
    padding: 7px 9px;
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    line-height: 1.35;
}

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

.movie-line {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.movie-meta {
    gap: 6px;
}

.movie-meta span {
    padding: 4px 8px;
    font-size: 0.74rem;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(0, 86, 224, 0.24), rgba(230, 168, 0, 0.08)),
        rgba(18, 23, 30, 0.78);
    box-shadow: var(--shadow);
}

.category-tile h3 {
    margin: 0 0 10px;
    font-size: 1.42rem;
}

.category-tile p {
    margin: 0 0 22px;
    color: var(--text-soft);
    line-height: 1.75;
}

.category-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 18px;
}

.category-strip img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    opacity: 0.78;
}

.page-title {
    margin: 32px 0 28px;
    display: grid;
    gap: 12px;
}

.breadcrumbs {
    margin-bottom: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 160px 140px;
    gap: 12px;
    padding: 16px;
    margin: 0 0 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(18, 23, 30, 0.72);
    backdrop-filter: blur(12px);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    color: var(--text-main);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(7, 9, 12, 0.72);
    outline: 0;
    padding: 0 14px;
}

.empty-state {
    display: none;
    margin: 22px 0 0;
    padding: 22px;
    text-align: center;
    color: var(--text-soft);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(18, 23, 30, 0.72);
}

.empty-state.show {
    display: block;
}

.ranking-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 58px 96px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(18, 23, 30, 0.78);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.ranking-row:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 198, 26, 0.34);
}

.ranking-index {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
}

.ranking-row img {
    width: 96px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-row h3 {
    margin: 0 0 8px;
}

.ranking-row p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

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

.player-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--text-main);
    background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.72));
    transition: opacity 0.24s ease;
}

.play-overlay span {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #111827;
    font-size: 1.9rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
    box-shadow: 0 24px 48px rgba(230, 168, 0, 0.28);
}

.player-panel.is-playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.detail-title {
    margin: 24px 0 18px;
}

.detail-title h1 {
    font-size: clamp(2rem, 5vw, 4.2rem);
}

.detail-copy,
.detail-side-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(18, 23, 30, 0.78);
    padding: 24px;
}

.detail-copy h2,
.detail-side-card h2 {
    margin: 0 0 14px;
    font-size: 1.34rem;
}

.detail-copy p + h2 {
    margin-top: 28px;
}

.detail-side-card {
    position: sticky;
    top: 92px;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 18px;
}

.card-tags {
    margin-top: 16px;
}

.tag {
    display: inline-flex;
    color: var(--text-soft);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    padding: 7px 10px;
    font-size: 0.82rem;
}

.tag:hover {
    color: var(--accent-400);
    border-color: rgba(255, 198, 26, 0.32);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(3, 4, 7, 0.76);
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px 22px;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 28px;
}

.footer-inner p {
    max-width: 520px;
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-links {
    flex-wrap: wrap;
    justify-content: flex-end;
}

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

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

    .detail-side-card {
        position: static;
    }

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

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

    .menu-toggle {
        display: block;
    }

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

    .hero-content {
        padding-top: 92px;
    }

    .hero-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-search {
        min-width: 0;
        width: 100%;
    }

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

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

    .ranking-row {
        grid-template-columns: 42px 82px 1fr;
    }

    .ranking-row img {
        width: 82px;
    }

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

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

@media (max-width: 540px) {
    .header-inner,
    .page-shell,
    .home-main,
    .hero-content,
    .footer-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .movie-grid,
    .category-grid,
    .ranking-list,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        width: calc(100% - 32px);
    }
}
