:root {
    --fog-950: #070b12;
    --fog-900: #0d1117;
    --fog-850: #151a22;
    --fog-800: #212529;
    --fog-700: #343a40;
    --fog-600: #495057;
    --fog-500: #6c757d;
    --fog-400: #adb5bd;
    --fog-300: #ced4da;
    --fog-200: #e9ecef;
    --fog-50: #f8f9fa;
    --frost-600: #005ab3;
    --frost-500: #0073e6;
    --frost-400: #1a8cff;
    --frost-300: #4da6ff;
    --frost-200: #80bfff;
    --mist-800: #243b53;
    --panel: rgba(33, 37, 41, 0.78);
    --panel-solid: #212529;
    --line: rgba(173, 181, 189, 0.16);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 10% -10%, rgba(0, 115, 230, 0.22), transparent 34rem),
        linear-gradient(180deg, var(--fog-950), var(--fog-900) 18rem, var(--fog-900));
    color: var(--fog-100, #f8f9fa);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

.header-inner {
    width: min(1240px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--fog-50);
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--frost-500), var(--frost-300));
    box-shadow: 0 12px 36px rgba(0, 115, 230, 0.36);
    font-size: 14px;
}

.brand-text {
    font-size: 21px;
    white-space: nowrap;
}

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

.nav-link,
.nav-drop-button {
    border: 0;
    background: transparent;
    color: var(--fog-200);
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-drop-button:hover {
    color: var(--frost-300);
    background: rgba(255, 255, 255, 0.06);
}

.nav-dropdown {
    position: relative;
}

.nav-drop-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 180px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(33, 37, 41, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-drop-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-drop-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--fog-200);
}

.nav-drop-menu a:hover {
    background: rgba(0, 115, 230, 0.16);
    color: var(--frost-200);
}

.header-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(33, 37, 41, 0.88);
}

.header-search input,
.mobile-search input,
.wide-search input,
.local-filter input {
    border: 0;
    outline: 0;
    color: var(--fog-50);
    background: transparent;
}

.header-search input {
    width: 190px;
    padding: 10px 12px;
}

.header-search button,
.mobile-search button,
.wide-search button,
.local-filter button {
    border: 0;
    color: #fff;
    background: var(--frost-500);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

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

.header-search button:hover,
.mobile-search button:hover,
.wide-search button:hover,
.local-filter button:hover {
    background: var(--frost-600);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(33, 37, 41, 0.88);
    color: var(--fog-50);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--fog-50);
    border-radius: 999px;
}

.mobile-panel {
    border-top: 1px solid var(--line);
    padding: 16px;
    background: rgba(13, 17, 23, 0.98);
}

.mobile-search {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--panel-solid);
}

.mobile-search input {
    flex: 1;
    padding: 12px;
}

.mobile-search button {
    padding: 0 16px;
}

.mobile-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.mobile-nav a {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--fog-200);
}

.hero-section,
.page-main,
.detail-main,
.content-section,
.content-grid {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-section {
    padding: 28px 0 20px;
}

.hero-frame {
    position: relative;
    min-height: 72vh;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--fog-800);
    box-shadow: var(--shadow);
}

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

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

.hero-image,
.hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
    background:
        linear-gradient(90deg, rgba(13, 17, 23, 0.98) 0%, rgba(13, 17, 23, 0.78) 42%, rgba(13, 17, 23, 0.2) 100%),
        linear-gradient(0deg, rgba(13, 17, 23, 0.88), transparent 46%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(680px, calc(100% - 88px));
    min-height: 72vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: clamp(28px, 6vw, 86px);
}

.eyebrow {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin-bottom: 16px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 115, 230, 0.9);
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 12px 34px rgba(0, 115, 230, 0.28);
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: var(--fog-50);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content h1,
.hero-content h2 {
    font-size: clamp(42px, 7vw, 78px);
}

.hero-content p,
.page-hero p,
.hero-panel p,
.detail-info .lead {
    color: var(--fog-200);
    line-height: 1.8;
}

.hero-content p {
    max-width: 640px;
    margin: 20px 0 0;
    font-size: 18px;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-meta span,
.detail-meta span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 11px;
    color: var(--fog-200);
    background: rgba(255, 255, 255, 0.06);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    padding: 14px 24px;
    color: #fff;
    background: var(--frost-500);
    box-shadow: 0 16px 36px rgba(0, 115, 230, 0.34);
}

.ghost-button {
    padding: 13px 23px;
    color: var(--fog-50);
    border: 1px solid var(--line);
    background: rgba(33, 37, 41, 0.7);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
}

.primary-button:hover {
    background: var(--frost-600);
}

.ghost-button:hover {
    border-color: rgba(77, 166, 255, 0.7);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--fog-50);
    background: rgba(33, 37, 41, 0.78);
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 28px;
    background: var(--frost-400);
}

.hero-panel {
    margin-top: 22px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(36, 59, 83, 0.6), rgba(33, 37, 41, 0.72));
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.hero-panel h2 {
    margin: 0;
    color: var(--fog-50);
    font-size: clamp(24px, 4vw, 36px);
}

.wide-search,
.local-filter {
    display: flex;
    max-width: 760px;
    margin-top: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(13, 17, 23, 0.62);
}

.wide-search input,
.local-filter input {
    flex: 1;
    min-width: 0;
    padding: 15px 16px;
}

.wide-search button,
.local-filter button {
    padding: 0 22px;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.category-pills a {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--fog-200);
    background: rgba(255, 255, 255, 0.05);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-pills a:hover {
    color: var(--frost-200);
    border-color: rgba(77, 166, 255, 0.7);
    background: rgba(0, 115, 230, 0.14);
}

.content-section,
.content-grid {
    padding: 34px 0;
}

.content-grid.with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
}

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

.section-heading h2 {
    margin: 0;
    color: var(--fog-50);
    font-size: clamp(24px, 4vw, 34px);
    letter-spacing: -0.03em;
}

.section-heading a,
.text-link {
    color: var(--frost-300);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(33, 37, 41, 0.76);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(77, 166, 255, 0.54);
    background: rgba(36, 59, 83, 0.58);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, var(--fog-800), var(--mist-800));
    overflow: hidden;
}

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

.movie-card:hover .poster-wrap img {
    transform: scale(1.05);
    filter: saturate(1.08);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.play-chip {
    right: 10px;
    bottom: 10px;
    padding: 7px 10px;
    background: rgba(0, 115, 230, 0.88);
    font-size: 13px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 34px;
    padding: 7px 9px;
    background: rgba(13, 17, 23, 0.78);
    text-align: center;
}

.card-content {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    min-height: 46px;
    overflow: hidden;
    color: var(--fog-50);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-title:hover {
    color: var(--frost-300);
}

.card-meta {
    margin: 8px 0 0;
    color: var(--fog-400);
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    min-height: 42px;
    margin: 10px 0 0;
    overflow: hidden;
    color: var(--fog-300);
    line-height: 1.55;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span {
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--frost-200);
    background: rgba(0, 115, 230, 0.14);
    font-size: 12px;
}

.rank-panel {
    position: sticky;
    top: 88px;
    align-self: start;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(33, 37, 41, 0.76);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.compact-heading h2 {
    font-size: 25px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 11px;
    border-radius: 13px;
    color: var(--fog-200);
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease, color 0.2s ease;
}

.rank-item:hover {
    color: var(--frost-200);
    background: rgba(0, 115, 230, 0.13);
}

.rank-number {
    color: var(--frost-300);
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-type {
    color: var(--fog-400);
    font-size: 12px;
}

.page-main,
.detail-main {
    padding: 28px 0 46px;
}

.page-hero {
    padding: clamp(34px, 6vw, 72px);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(36, 59, 83, 0.78), rgba(13, 17, 23, 0.84)),
        radial-gradient(circle at 80% 0%, rgba(0, 115, 230, 0.25), transparent 28rem);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 800px;
    font-size: clamp(34px, 7vw, 64px);
}

.page-hero p {
    max-width: 780px;
    margin: 18px 0 0;
    font-size: 18px;
}

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

.category-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(33, 37, 41, 0.72);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: 160px;
    overflow: hidden;
    background: var(--fog-800);
}

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

.category-body {
    padding: 18px;
}

.category-body h2 {
    margin: 0;
    color: var(--fog-50);
}

.category-body p {
    color: var(--fog-300);
    line-height: 1.7;
}

.detail-main {
    width: min(1180px, calc(100% - 32px));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 6px 0 18px;
    color: var(--fog-400);
    font-size: 14px;
}

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

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

.player-card,
.detail-aside,
.text-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(33, 37, 41, 0.74);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.player-card {
    overflow: hidden;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    text-align: center;
}

.video-overlay.is-hidden {
    display: none;
}

.overlay-play {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--frost-500);
    box-shadow: 0 18px 50px rgba(0, 115, 230, 0.38);
    font-size: 30px;
}

.overlay-title {
    max-width: min(680px, 88%);
    color: var(--fog-50);
    font-size: clamp(24px, 5vw, 44px);
    font-weight: 900;
    line-height: 1.2;
}

.overlay-subtitle {
    color: var(--fog-200);
    font-weight: 800;
}

.detail-aside {
    padding: 14px;
}

.detail-aside img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--fog-800), var(--mist-800));
}

.full-button {
    width: 100%;
    margin-top: 14px;
}

.detail-info {
    padding: 28px 0 0;
}

.detail-info h1 {
    font-size: clamp(32px, 6vw, 58px);
}

.detail-info .lead {
    max-width: 900px;
    font-size: 18px;
}

.detail-tags {
    margin: 20px 0;
}

.text-panel {
    padding: clamp(22px, 4vw, 36px);
}

.text-panel h2 {
    color: var(--fog-50);
    margin: 0 0 12px;
}

.text-panel h2:not(:first-child) {
    margin-top: 28px;
}

.text-panel p {
    color: var(--fog-200);
    line-height: 1.9;
    margin: 0;
    font-size: 16px;
}

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

.compact-card .card-title {
    min-height: 44px;
    font-size: 15px;
}

.compact-card .card-desc {
    display: none;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(7, 11, 18, 0.82);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    color: var(--fog-300);
}

.footer-inner p {
    max-width: 760px;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 16px;
    margin: 16px 0;
    color: var(--frost-300);
}

.copyright {
    color: var(--fog-500);
    font-size: 14px;
}

.search-empty {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    color: var(--fog-200);
    background: rgba(33, 37, 41, 0.74);
}

@media (max-width: 1100px) {
    .content-grid.with-sidebar,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }

    .movie-grid,
    .featured-grid,
    .all-grid,
    .related-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-aside {
        display: none;
    }
}

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

    .mobile-menu-button {
        display: block;
        margin-left: auto;
    }

    .header-inner {
        gap: 12px;
    }

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

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

    .hero-content {
        width: calc(100% - 32px);
        padding: 32px 20px;
        justify-content: end;
    }

    .hero-shade {
        background: linear-gradient(0deg, rgba(13, 17, 23, 0.98) 0%, rgba(13, 17, 23, 0.72) 55%, rgba(13, 17, 23, 0.18) 100%);
    }

    .hero-arrow {
        top: auto;
        bottom: 18px;
        transform: none;
    }

    .hero-dots {
        bottom: 30px;
    }

    .wide-search,
    .local-filter {
        flex-direction: column;
    }

    .wide-search button,
    .local-filter button {
        padding: 13px;
    }

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

    .page-hero {
        padding: 28px;
    }
}

@media (max-width: 520px) {
    .hero-section,
    .page-main,
    .detail-main,
    .content-section,
    .content-grid,
    .footer-inner {
        width: min(100% - 20px, 1240px);
    }

    .movie-grid,
    .featured-grid,
    .all-grid,
    .related-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .mobile-nav {
        grid-template-columns: 1fr;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }
}
