:root {
    --fog-950: #070b10;
    --fog-900: #0d1117;
    --fog-850: #141a22;
    --fog-800: #212529;
    --fog-700: #343a40;
    --fog-600: #495057;
    --fog-400: #adb5bd;
    --fog-300: #ced4da;
    --fog-100: #f1f3f5;
    --frost-600: #005ab3;
    --frost-500: #0073e6;
    --frost-400: #1a8cff;
    --frost-300: #4da6ff;
    --mist-800: #243b53;
    --gold: #facc15;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --shadow-xl: 0 24px 80px rgba(0, 0, 0, 0.42);
    --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.26);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--fog-100);
    background:
        radial-gradient(circle at 18% 0%, rgba(0, 115, 230, 0.22), transparent 30%),
        radial-gradient(circle at 86% 12%, rgba(36, 59, 83, 0.62), transparent 28%),
        linear-gradient(180deg, #0d1117 0%, #070b10 45%, #0d1117 100%);
    min-height: 100vh;
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(36, 59, 83, 0.85), rgba(0, 115, 230, 0.16));
}

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 17, 23, 0.94);
    border-bottom: 1px solid rgba(173, 181, 189, 0.12);
    backdrop-filter: blur(14px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--frost-500), var(--mist-800));
    box-shadow: 0 10px 30px rgba(0, 115, 230, 0.36);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--fog-300);
    font-size: 14px;
}

.main-nav a,
.nav-dropdown button {
    color: var(--fog-300);
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 8px 0;
}

.main-nav a:hover,
.nav-dropdown button:hover,
.main-nav .is-active {
    color: var(--frost-300);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 190px;
    padding: 10px;
    border: 1px solid rgba(173, 181, 189, 0.14);
    border-radius: 14px;
    background: rgba(33, 37, 41, 0.98);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

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

.nav-dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
}

.nav-dropdown-panel a:hover {
    background: rgba(0, 115, 230, 0.16);
}

.mobile-menu-button {
    display: none;
    border: 1px solid rgba(173, 181, 189, 0.18);
    color: var(--fog-100);
    background: rgba(52, 58, 64, 0.6);
    border-radius: 12px;
    padding: 8px 11px;
}

.hero {
    min-height: 70vh;
    display: grid;
    align-items: stretch;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(173, 181, 189, 0.12);
}

.hero-slide {
    display: none;
    min-height: 70vh;
    position: relative;
}

.hero-slide.is-active {
    display: block;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    opacity: 0.6;
    filter: saturate(1.1) contrast(1.05);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(13, 17, 23, 0.98) 0%, rgba(13, 17, 23, 0.74) 45%, rgba(13, 17, 23, 0.28) 100%),
        linear-gradient(0deg, #0d1117 0%, transparent 46%, rgba(0, 0, 0, 0.35) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 70vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 42px;
    padding: 68px 0;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(77, 166, 255, 0.4);
    border-radius: 999px;
    color: var(--frost-300);
    background: rgba(0, 115, 230, 0.14);
    backdrop-filter: blur(8px);
    font-size: 13px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -0.055em;
}

.hero-copy p {
    margin: 22px 0 0;
    max-width: 660px;
    color: var(--fog-300);
    font-size: 18px;
    line-height: 1.8;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid rgba(173, 181, 189, 0.16);
    color: #fff;
    background: rgba(52, 58, 64, 0.74);
    transition: 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
    border-color: rgba(77, 166, 255, 0.48);
    background: rgba(73, 80, 87, 0.92);
}

.button-primary {
    border-color: rgba(26, 140, 255, 0.45);
    background: linear-gradient(135deg, var(--frost-500), var(--frost-600));
    box-shadow: 0 16px 38px rgba(0, 115, 230, 0.28);
}

.hero-poster {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(173, 181, 189, 0.16);
    box-shadow: var(--shadow-xl);
}

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

.hero-poster-info {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 1;
}

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

.hero-dots button {
    width: 32px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(206, 212, 218, 0.36);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: var(--frost-400);
}

.page-main {
    padding: 44px 0 70px;
}

.section-block {
    margin-top: 50px;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3.4vw, 40px);
    line-height: 1.1;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--fog-400);
}

.section-link {
    color: var(--frost-300);
    white-space: nowrap;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(173, 181, 189, 0.12);
    border-radius: var(--radius-lg);
    background: rgba(33, 37, 41, 0.74);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(77, 166, 255, 0.42);
    background: rgba(33, 37, 41, 0.96);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.poster-wrap img {
    transition: transform 0.32s ease, opacity 0.32s ease;
}

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

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    background: rgba(13, 17, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    font-size: 12px;
}

.poster-badge {
    top: 10px;
    left: 10px;
    padding: 5px 9px;
}

.poster-play {
    left: 50%;
    top: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    padding: 8px 13px;
    transition: 0.22s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--fog-400);
    font-size: 12px;
}

.movie-card h3 {
    min-height: 44px;
    margin: 8px 0 6px;
    color: #fff;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--frost-300);
}

.movie-card p {
    margin: 0;
    color: var(--fog-400);
    font-size: 13px;
    line-height: 1.6;
}

.line-clamp {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

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

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

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 164px;
    padding: 22px;
    border: 1px solid rgba(173, 181, 189, 0.13);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(36, 59, 83, 0.88), rgba(13, 17, 23, 0.86));
    box-shadow: var(--shadow-card);
}

.category-card::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    right: -42px;
    bottom: -42px;
    border-radius: 50%;
    background: rgba(0, 115, 230, 0.28);
}

.category-card strong {
    display: block;
    font-size: 24px;
}

.category-card span,
.category-card p {
    color: var(--fog-300);
}

.category-card p {
    margin: 12px 0 0;
    line-height: 1.7;
}

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

.hot-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(173, 181, 189, 0.12);
    border-radius: 16px;
    background: rgba(33, 37, 41, 0.72);
}

.hot-rank {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--frost-500), var(--mist-800));
    font-weight: 800;
}

.hot-item h3 {
    margin: 0;
    font-size: 16px;
}

.hot-item p {
    margin: 4px 0 0;
    color: var(--fog-400);
    font-size: 13px;
}

.hot-score {
    color: var(--gold);
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 160px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid rgba(173, 181, 189, 0.12);
    border-radius: var(--radius-lg);
    background: rgba(33, 37, 41, 0.72);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(173, 181, 189, 0.14);
    border-radius: 12px;
    color: var(--fog-100);
    background: rgba(13, 17, 23, 0.86);
    padding: 0 14px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(77, 166, 255, 0.6);
}

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

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

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

.detail-card,
.side-card {
    border: 1px solid rgba(173, 181, 189, 0.12);
    border-radius: var(--radius-xl);
    background: rgba(33, 37, 41, 0.76);
    box-shadow: var(--shadow-card);
}

.detail-card {
    overflow: hidden;
}

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

.player-shell video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent 62%);
}

.play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 115, 230, 0.86);
    box-shadow: 0 18px 48px rgba(0, 115, 230, 0.34);
    font-size: 25px;
}

.player-shell.is-playing .player-cover,
.player-shell.is-playing .play-button {
    display: none;
}

.detail-content {
    padding: 28px;
}

.detail-title {
    margin: 0;
    font-size: clamp(28px, 5vw, 48px);
    line-height: 1.08;
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.prose h2 {
    margin: 30px 0 12px;
    font-size: 22px;
}

.prose p {
    color: var(--fog-300);
    line-height: 1.9;
    white-space: pre-wrap;
}

.side-card {
    padding: 18px;
}

.side-card h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-item img {
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.related-item strong {
    display: block;
    line-height: 1.35;
}

.related-item span {
    display: block;
    margin-top: 4px;
    color: var(--fog-400);
    font-size: 12px;
}

.empty-result {
    display: none;
    padding: 18px;
    border: 1px dashed rgba(173, 181, 189, 0.22);
    border-radius: 16px;
    color: var(--fog-300);
    text-align: center;
}

.site-footer {
    padding: 46px 0;
    border-top: 1px solid rgba(173, 181, 189, 0.12);
    background: rgba(7, 11, 16, 0.76);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 26px;
    color: var(--fog-400);
}

.footer-grid h3 {
    margin: 0 0 12px;
    color: #fff;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: var(--fog-300);
}

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

.footer-brand {
    margin-bottom: 12px;
}

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

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

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

@media (max-width: 820px) {
    .mobile-menu-button {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 16px;
        border: 1px solid rgba(173, 181, 189, 0.14);
        border-radius: 18px;
        background: rgba(13, 17, 23, 0.98);
        box-shadow: var(--shadow-xl);
    }

    .main-nav.is-open {
        display: flex;
    }

    .nav-dropdown-panel {
        position: static;
        width: 100%;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 8px;
    }

    .nav-dropdown:hover .nav-dropdown-panel {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 54px 0 78px;
    }

    .hero-poster {
        max-width: 280px;
    }

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

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

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

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

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

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