:root {
    color-scheme: dark;
    --bg-main: #0f172a;
    --bg-soft: #111827;
    --bg-panel: rgba(15, 23, 42, 0.82);
    --bg-card: rgba(30, 41, 59, 0.72);
    --border-soft: rgba(148, 163, 184, 0.18);
    --text-main: #f8fafc;
    --text-soft: #cbd5e1;
    --text-muted: #94a3b8;
    --accent: #f59e0b;
    --accent-strong: #fbbf24;
    --accent-dark: #b45309;
    --shadow-strong: 0 24px 80px rgba(0, 0, 0, 0.38);
    --shadow-card: 0 16px 36px rgba(0, 0, 0, 0.28);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    background:
        radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.16), transparent 28%),
        radial-gradient(circle at 82% 12%, rgba(56, 189, 248, 0.12), transparent 32%),
        linear-gradient(180deg, #0f172a 0%, #111827 42%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

body.menu-open {
    overflow: hidden;
}

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

img {
    max-width: 100%;
}

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

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.logo-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #1f2937;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.28);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.logo-title {
    font-size: 1.18rem;
}

.logo-subtitle {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

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

.primary-nav a,
.mobile-nav a {
    color: var(--text-soft);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.primary-nav a:hover,
.primary-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--accent-strong);
    background: rgba(245, 158, 11, 0.1);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    color: var(--text-main);
    background: rgba(15, 23, 42, 0.84);
}

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.96);
}

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

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

.hero-slider {
    position: relative;
    min-height: clamp(620px, 72vh, 780px);
    margin: 24px auto 34px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow-strong);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 28px;
    align-items: end;
    padding: clamp(28px, 5vw, 60px);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.2) 100%),
        radial-gradient(circle at 15% 24%, rgba(245, 158, 11, 0.18), transparent 34%);
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transform: scale(1.08);
}

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-copy {
    max-width: 720px;
}

.hero-eyebrow,
.section-eyebrow,
.detail-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--accent-strong);
    font-size: 0.84rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-title {
    margin: 0 0 14px;
    font-size: clamp(2.4rem, 6vw, 5.4rem);
    line-height: 0.96;
    font-weight: 950;
    letter-spacing: -0.07em;
}

.hero-movie-title {
    margin: 0 0 18px;
    font-size: clamp(1.3rem, 3vw, 2.35rem);
    line-height: 1.1;
    color: var(--accent-strong);
}

.hero-desc {
    max-width: 650px;
    margin: 0 0 24px;
    color: var(--text-soft);
    font-size: clamp(1rem, 2vw, 1.16rem);
    line-height: 1.8;
}

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

.hero-tags {
    margin-bottom: 28px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.1);
    font-size: 0.78rem;
    font-weight: 800;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    color: #fffbeb;
    background: rgba(245, 158, 11, 0.12);
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.7);
    background: rgba(245, 158, 11, 0.18);
}

.btn-primary {
    color: #1f2937;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    box-shadow: 0 18px 34px rgba(245, 158, 11, 0.26);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #fde68a, var(--accent));
}

.hero-poster {
    align-self: center;
    justify-self: end;
    width: min(360px, 100%);
    transform: rotate(2deg);
}

.hero-poster img {
    aspect-ratio: 2 / 3;
    width: 100%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.56);
}

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: var(--text-main);
    background: rgba(2, 6, 23, 0.58);
    transform: translateY(-50%);
    transition: background 0.2s ease, color 0.2s ease;
}

.hero-control:hover {
    color: var(--accent-strong);
    background: rgba(2, 6, 23, 0.86);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.36);
}

.hero-dot.is-active {
    width: 32px;
    border-radius: 999px;
    background: var(--accent-strong);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin: 0 auto 28px;
    padding: 16px;
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: var(--shadow-card);
}

.search-input {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    color: var(--text-main);
    background: rgba(2, 6, 23, 0.6);
    outline: none;
}

.search-input:focus {
    border-color: rgba(245, 158, 11, 0.72);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

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

.filter-chip {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: var(--text-soft);
    background: rgba(30, 41, 59, 0.54);
    font-weight: 800;
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #1f2937;
    border-color: transparent;
    background: var(--accent-strong);
}

.section-block {
    margin: 40px 0;
}

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

.section-heading h2,
.page-heading h1,
.detail-title {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 3rem);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.section-heading p,
.page-heading p,
.detail-intro {
    margin: 10px 0 0;
    color: var(--text-muted);
    line-height: 1.8;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.52);
    box-shadow: var(--shadow-card);
}

.movie-cover {
    position: relative;
    overflow: hidden;
    background: #020617;
}

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

.movie-card:hover .movie-cover img {
    opacity: 0.84;
    transform: scale(1.06);
}

.movie-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #1f2937;
    background: var(--accent-strong);
    font-size: 0.75rem;
    font-weight: 900;
}

.movie-body {
    padding: 14px;
}

.movie-title {
    margin: 0 0 8px;
    font-size: 1.02rem;
    line-height: 1.35;
    font-weight: 900;
}

.movie-title a:hover {
    color: var(--accent-strong);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.movie-desc {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.9rem;
    line-height: 1.65;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    padding: 24px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.68));
    box-shadow: var(--shadow-card);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: auto -40px -80px auto;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.14);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 2;
    margin: 0 0 10px;
    font-size: 1.38rem;
    font-weight: 950;
}

.category-card p {
    position: relative;
    z-index: 2;
    margin: 0 0 18px;
    color: var(--text-soft);
    line-height: 1.75;
}

.category-card .btn {
    position: relative;
    z-index: 2;
}

.page-heading {
    margin: 36px 0 24px;
    padding: 32px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.12), transparent 36%),
        rgba(15, 23, 42, 0.66);
    box-shadow: var(--shadow-card);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breadcrumb a:hover {
    color: var(--accent-strong);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 76px 96px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: var(--bg-card);
}

.rank-number {
    font-size: 2rem;
    font-weight: 950;
    color: var(--accent-strong);
}

.rank-thumb img {
    width: 96px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.rank-info h2,
.rank-info h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
    font-weight: 900;
}

.rank-info p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.65;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(280px, 0.35fr) minmax(0, 0.65fr);
    gap: 28px;
    align-items: center;
    margin: 32px 0;
    padding: 28px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 8% 10%, rgba(245, 158, 11, 0.16), transparent 32%),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow-strong);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    box-shadow: var(--shadow-card);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 20px;
}

.detail-meta span {
    padding: 7px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    color: var(--text-soft);
    background: rgba(30, 41, 59, 0.58);
    font-weight: 800;
}

.player-panel,
.content-panel {
    margin: 32px 0;
    padding: 22px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow-card);
}

.player-panel h2,
.content-panel h2 {
    margin: 0 0 16px;
    font-size: 1.52rem;
    font-weight: 950;
}

.player-frame {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #020617;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    color: var(--text-main);
    background: #020617;
    cursor: pointer;
}

.player-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.22), rgba(2, 6, 23, 0.55));
}

.player-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    color: #1f2937;
    background: linear-gradient(135deg, #fde68a, var(--accent));
    font-size: 2rem;
    font-weight: 900;
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 46px rgba(245, 158, 11, 0.35);
}

.content-panel p {
    margin: 0 0 16px;
    color: var(--text-soft);
    font-size: 1.02rem;
    line-height: 1.9;
}

.site-footer {
    margin-top: 60px;
    border-top: 1px solid var(--border-soft);
    background: rgba(2, 6, 23, 0.62);
}

.footer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--text-muted);
}

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

.footer-links a:hover {
    color: var(--accent-strong);
}

.is-empty {
    display: none;
    padding: 24px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.62);
}

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

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

    .hero-slide,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .nav-shell {
        min-height: 68px;
    }

    .hero-slider {
        min-height: 660px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 26px;
        align-items: center;
    }

    .hero-control {
        display: none;
    }

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

    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .rank-list {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 58px 82px minmax(0, 1fr);
    }

    .rank-thumb img {
        width: 82px;
    }

    .detail-hero,
    .page-heading,
    .player-panel,
    .content-panel {
        padding: 18px;
        border-radius: 22px;
    }

    .footer-shell {
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .page-shell,
    .nav-shell,
    .mobile-nav,
    .footer-shell {
        width: min(100% - 22px, 1180px);
    }

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

    .btn {
        width: 100%;
    }
}
