:root {
    color-scheme: dark;
    --bg-950: #020617;
    --bg-900: #0f172a;
    --bg-850: #111c33;
    --bg-800: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #f8fafc;
    --text-soft: #cbd5e1;
    --sky: #38bdf8;
    --sky-strong: #0ea5e9;
    --green: #22c55e;
    --shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.15), transparent 32rem), linear-gradient(135deg, var(--bg-950), var(--bg-900) 45%, var(--bg-950));
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    min-height: 70px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--sky), var(--sky-strong));
    display: grid;
    place-items: center;
    color: white;
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.35);
    font-size: 13px;
}

.logo-text {
    font-size: 19px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    color: var(--text-soft);
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.footer-links a:hover {
    color: var(--sky);
}

.header-search {
    display: flex;
    align-items: center;
    min-width: 280px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
    overflow: hidden;
}

.header-search input,
.hero-search input,
.inline-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search input {
    padding: 10px 14px;
}

.header-search button,
.hero-search button {
    border: 0;
    background: var(--sky-strong);
    color: white;
    padding: 10px 16px;
    cursor: pointer;
    white-space: nowrap;
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.82);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 12px 20px 18px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.94);
}

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

.hero {
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 20px 56px;
}

.hero-slider {
    position: relative;
    min-height: 560px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-800);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.55) 50%, rgba(2, 6, 23, 0.22)), linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.02) 58%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: 54px;
}

.hero-content h1 {
    margin: 14px 0 16px;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-content p {
    margin: 0 0 22px;
    color: var(--text-soft);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 99px;
    background: rgba(148, 163, 184, 0.45);
    cursor: pointer;
}

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

.hero-search {
    max-width: 740px;
    margin: 24px auto 0;
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.84);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.28);
}

.hero-search input {
    padding: 16px 22px;
}

.hero-search button {
    padding: 16px 24px;
}

.page-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 20px 72px;
}

.content-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 54px 20px;
}

.page-main .content-section {
    padding-left: 0;
    padding-right: 0;
}

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

.eyebrow {
    display: inline-flex;
    color: var(--sky);
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.section-heading h1,
.section-heading h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
    max-width: 760px;
}

.section-link {
    color: var(--sky);
    font-weight: 700;
    white-space: nowrap;
}

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

.scroll-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 14px;
    scrollbar-width: thin;
}

.scroll-row .movie-card {
    width: 196px;
    flex: 0 0 196px;
}

.movie-card {
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    background: rgba(30, 41, 59, 0.88);
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.36);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--bg-850);
}

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

.movie-card:hover .poster img,
.category-tile:hover img,
.category-panel:hover img,
.feature-card:hover img,
.rank-item:hover img,
.ranking-card:hover img {
    transform: scale(1.08);
}

.poster-badge,
.poster-year {
    position: absolute;
    top: 10px;
    z-index: 2;
    border-radius: 10px;
    padding: 5px 8px;
    font-size: 12px;
    color: white;
    backdrop-filter: blur(12px);
}

.poster-badge {
    left: 10px;
    background: rgba(14, 165, 233, 0.82);
}

.poster-year {
    right: 10px;
    background: rgba(2, 6, 23, 0.72);
}

.movie-info {
    padding: 14px;
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-info h3 a:hover,
.ranking-content h2 a:hover,
.feature-content h2 a:hover {
    color: var(--sky);
}

.movie-info p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
}

.badge-row,
.tag-row,
.action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.badge,
.tag-row span {
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(51, 65, 85, 0.78);
    color: var(--text-soft);
    font-size: 13px;
}

.badge-primary {
    background: rgba(14, 165, 233, 0.92);
    color: white;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 800;
    transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--sky), var(--sky-strong));
    color: white;
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.32);
}

.btn-ghost {
    background: rgba(15, 23, 42, 0.72);
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

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

.category-tile,
.category-panel {
    position: relative;
    display: grid;
    min-height: 210px;
    border-radius: 22px;
    overflow: hidden;
    background: var(--bg-800);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.24);
}

.category-tile::after,
.category-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.15));
}

.category-tile img,
.category-panel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.category-tile span,
.category-tile p,
.category-panel div {
    position: relative;
    z-index: 2;
    align-self: end;
    padding: 20px;
}

.category-tile span {
    padding-bottom: 4px;
    font-size: 22px;
    font-weight: 850;
}

.category-tile p {
    padding-top: 0;
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.7;
}

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

.category-panel {
    min-height: 260px;
}

.category-panel h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.category-panel p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
}

.page-hero {
    margin-bottom: 34px;
    padding: 44px;
    border-radius: 28px;
    background: radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.18), transparent 26rem), rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow);
}

.compact-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.inline-search {
    min-width: min(420px, 100%);
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(2, 6, 23, 0.5);
    border-radius: 999px;
    padding: 13px 18px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
}

.filter-bar button {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(30, 41, 59, 0.58);
    color: var(--text-soft);
    border-radius: 999px;
    padding: 9px 14px;
    cursor: pointer;
}

.filter-bar button:hover,
.filter-bar button.active {
    color: white;
    background: var(--sky-strong);
    border-color: var(--sky-strong);
}

.empty-state {
    display: none;
    text-align: center;
    color: var(--muted);
    background: rgba(30, 41, 59, 0.55);
    border-radius: 18px;
    padding: 26px;
}

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

.feature-card {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 0;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: var(--shadow);
}

.feature-image {
    display: block;
    min-height: 360px;
    overflow: hidden;
    background: var(--bg-850);
}

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

.feature-content {
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-content h2 {
    margin: 16px 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.feature-content p {
    margin: 0 0 22px;
    color: var(--text-soft);
    line-height: 1.8;
}

.ranking-section {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(2, 6, 23, 0.3));
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ranking-list li {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.52);
    color: var(--text-soft);
}

.rank-number,
.ranking-index {
    font-weight: 900;
    color: var(--sky);
}

.ranking-list a {
    color: white;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 54px 120px 1fr;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.ranking-poster {
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-850);
}

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

.ranking-content h2 {
    margin: 12px 0 8px;
    font-size: 22px;
}

.ranking-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    margin-bottom: 22px;
    font-size: 14px;
    flex-wrap: wrap;
}

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

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

.player-shell,
.detail-card,
.side-panel {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.player-shell {
    padding: 12px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: black;
    aspect-ratio: 16 / 9;
}

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

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.18));
    cursor: pointer;
}

.player-start.hidden {
    display: none;
}

.player-start span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.92);
    box-shadow: 0 0 36px rgba(14, 165, 233, 0.38);
    font-size: 32px;
    padding-left: 5px;
}

.detail-card {
    margin-top: 24px;
    padding: 30px;
}

.detail-card h1 {
    margin: 16px 0 12px;
    font-size: clamp(30px, 5vw, 48px);
    letter-spacing: -0.04em;
}

.detail-card h2 {
    margin: 28px 0 12px;
    font-size: 24px;
}

.detail-card p {
    color: var(--text-soft);
    line-height: 1.9;
}

.lead-text {
    font-size: 18px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.detail-meta-grid div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.65);
}

.detail-meta-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px;
}

.detail-meta-grid strong {
    display: block;
    font-size: 14px;
    color: white;
}

.detail-cover {
    width: 100%;
    border-radius: 24px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: var(--bg-850);
    box-shadow: var(--shadow);
}

.side-panel {
    margin-top: 22px;
    padding: 20px;
}

.side-panel h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.rank-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.rank-item:last-child {
    border-bottom: 0;
}

.rank-item img {
    grid-row: span 2;
    width: 70px;
    height: 94px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--bg-850);
    transition: transform 0.45s ease;
}

.rank-title {
    color: white;
    font-weight: 750;
    line-height: 1.45;
}

.rank-meta {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.9);
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 42px 20px 28px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.footer-logo {
    margin-bottom: 14px;
}

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

.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-content: flex-start;
}

.copyright {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px 30px;
    color: #64748b;
    font-size: 13px;
}

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

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

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

    .detail-sidebar {
        display: grid;
        grid-template-columns: 240px 1fr;
        gap: 22px;
    }

    .side-panel {
        margin-top: 0;
    }
}

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

    .mobile-menu-button {
        display: grid;
        place-items: center;
    }

    .header-inner {
        min-height: 64px;
    }

    .hero {
        padding-top: 18px;
    }

    .hero-slider {
        min-height: 500px;
        border-radius: 22px;
    }

    .hero-content {
        padding: 30px;
    }

    .hero-search,
    .compact-hero {
        flex-direction: column;
        align-items: stretch;
        border-radius: 24px;
    }

    .hero-search button {
        width: 100%;
    }

    .feature-card {
        grid-template-columns: 1fr;
    }

    .feature-image {
        min-height: 260px;
    }

    .feature-content {
        padding: 28px;
    }

    .ranking-list {
        grid-template-columns: 1fr;
    }

    .ranking-card {
        grid-template-columns: 44px 86px 1fr;
    }

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

@media (max-width: 620px) {
    .content-section,
    .page-main,
    .hero {
        padding-left: 14px;
        padding-right: 14px;
    }

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

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

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

    .page-hero {
        padding: 28px;
        border-radius: 22px;
    }

    .detail-sidebar {
        display: block;
    }

    .side-panel {
        margin-top: 18px;
    }

    .detail-card {
        padding: 22px;
    }

    .ranking-card {
        grid-template-columns: 1fr;
    }

    .ranking-index {
        font-size: 28px;
    }
}
