* {
    box-sizing: border-box;
}

:root {
    --fog-950: #070a10;
    --fog-900: #0d1117;
    --fog-850: #151b23;
    --fog-800: #212529;
    --fog-700: #343a40;
    --fog-600: #495057;
    --fog-400: #adb5bd;
    --fog-300: #ced4da;
    --fog-200: #dee2e6;
    --fog-50: #f8f9fa;
    --frost-600: #005ab3;
    --frost-500: #0073e6;
    --frost-400: #1a8cff;
    --frost-300: #4da6ff;
    --mist-800: #243b53;
    --mist-500: #627d98;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --soft-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 20% 0%, rgba(0, 115, 230, 0.22), transparent 28%), var(--fog-900);
    color: var(--fog-50);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

main {
    min-height: 60vh;
    padding-top: 76px;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(13, 17, 23, 0.94);
    border-bottom: 1px solid rgba(52, 58, 64, 0.9);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    max-width: 1280px;
    margin: 0 auto;
    height: 76px;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--fog-50);
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--frost-500), var(--frost-300));
    box-shadow: 0 0 28px rgba(26, 140, 255, 0.36);
    color: white;
    font-weight: 900;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.nav-link {
    color: var(--fog-200);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--frost-300);
}

.nav-dropdown {
    position: relative;
    padding: 27px 0;
}

.dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 190px;
    padding: 8px;
    border: 1px solid var(--fog-700);
    border-radius: 14px;
    background: rgba(33, 37, 41, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.2s ease;
}

.dropdown-panel a {
    display: block;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--fog-200);
    font-size: 14px;
}

.dropdown-panel a:hover {
    background: rgba(0, 115, 230, 0.2);
    color: var(--frost-300);
}

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

.top-search,
.mobile-search,
.wide-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.wide-search input,
.filter-panel input,
.filter-panel select {
    border: 1px solid var(--fog-700);
    border-radius: 12px;
    background: rgba(33, 37, 41, 0.84);
    color: var(--fog-50);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
    width: 245px;
    padding: 10px 14px;
}

.top-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--frost-500);
    box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.2);
}

.top-search button,
.mobile-search button,
.wide-search button,
.primary-btn,
.ghost-btn,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.top-search button,
.mobile-search button,
.wide-search button,
.primary-btn {
    background: var(--frost-500);
    color: white;
}

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

.primary-btn,
.ghost-btn {
    min-height: 46px;
    padding: 0 22px;
}

.ghost-btn {
    border: 1px solid rgba(248, 249, 250, 0.18);
    background: rgba(33, 37, 41, 0.5);
    color: var(--fog-50);
}

.top-search button:hover,
.mobile-search button:hover,
.wide-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--fog-50);
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 14px 24px 22px;
    border-top: 1px solid var(--fog-700);
    background: rgba(13, 17, 23, 0.98);
}

.mobile-panel a {
    display: block;
    padding: 11px 0;
    color: var(--fog-200);
}

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

.mobile-search button {
    padding: 10px 12px;
}

.hero-carousel,
.page-hero,
.content-section,
.filter-panel,
.rank-list,
.detail-hero,
.detail-content {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.hero-carousel {
    position: relative;
    margin-top: 28px;
    min-height: 560px;
    border: 1px solid rgba(52, 58, 64, 0.82);
    border-radius: 28px;
    overflow: hidden;
    background: var(--fog-800);
    box-shadow: var(--shadow);
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) brightness(0.58);
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(13, 17, 23, 0.95), rgba(13, 17, 23, 0.76), rgba(13, 17, 23, 0.28)), linear-gradient(0deg, rgba(13, 17, 23, 0.92), transparent 52%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 320px;
    gap: 44px;
    height: 100%;
    align-items: center;
    padding: 56px 72px;
}

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

.eyebrow {
    margin-bottom: 12px;
    color: var(--frost-300);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

.hero-copy h1 {
    max-width: 760px;
    font-size: clamp(38px, 6vw, 72px);
}

.hero-copy p,
.page-hero p,
.detail-info-card p {
    color: var(--fog-300);
    font-size: 17px;
}

.hero-copy p {
    max-width: 620px;
    margin: 18px 0 0;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border: 1px solid rgba(0, 115, 230, 0.28);
    border-radius: 999px;
    background: rgba(0, 115, 230, 0.14);
    color: var(--frost-200);
    font-size: 12px;
    font-weight: 700;
}

.hero-tags {
    margin-top: 20px;
}

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

.hero-poster {
    display: block;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
    transform: rotate(2deg);
    transition: transform 0.25s ease;
}

.hero-poster:hover {
    transform: rotate(0deg) scale(1.02);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(248, 249, 250, 0.18);
    border-radius: 999px;
    background: rgba(33, 37, 41, 0.68);
    color: var(--fog-50);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-control.prev {
    left: 18px;
}

.hero-control.next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 72px;
    bottom: 32px;
    z-index: 6;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 28px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(248, 249, 250, 0.28);
    cursor: pointer;
}

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

.home-search-panel,
.filter-panel {
    max-width: 1280px;
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 24px;
    align-items: center;
    padding: 28px;
    border: 1px solid rgba(52, 58, 64, 0.82);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(36, 59, 83, 0.52), rgba(33, 37, 41, 0.86));
}

.home-search-panel h2 {
    margin: 0 0 6px;
    font-size: 28px;
}

.home-search-panel p {
    margin: 0;
    color: var(--fog-300);
}

.wide-search input {
    flex: 1;
    padding: 14px 16px;
}

.wide-search button {
    padding: 14px 20px;
}

.content-section {
    padding: 44px 0 0;
}

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

.section-heading h2 {
    margin: 0;
    color: var(--fog-50);
    font-size: 30px;
    line-height: 1.2;
}

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

.section-link {
    border: 1px solid rgba(0, 115, 230, 0.34);
    padding: 10px 14px;
    background: rgba(0, 115, 230, 0.16);
    color: var(--frost-300);
    white-space: nowrap;
}

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

.movie-card {
    position: relative;
    min-width: 0;
    border: 1px solid rgba(52, 58, 64, 0.86);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(33, 37, 41, 0.86);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    border-color: rgba(0, 115, 230, 0.72);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
    transform: translateY(-4px);
}

.movie-card-link {
    display: block;
    height: 100%;
}

.movie-thumb {
    position: relative;
    background: var(--fog-700);
    overflow: hidden;
}

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

.movie-card:hover .movie-thumb img {
    transform: scale(1.06);
    filter: brightness(0.72);
}

.movie-thumb-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(13, 17, 23, 0.82), rgba(13, 17, 23, 0.1));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .movie-thumb-layer {
    opacity: 1;
}

.play-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 54px;
    border-radius: 999px;
    background: var(--frost-500);
    color: white;
    font-weight: 800;
    box-shadow: 0 0 32px rgba(26, 140, 255, 0.42);
}

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

.movie-card h3 {
    margin: 0;
    color: var(--fog-50);
    font-size: 16px;
    line-height: 1.35;
}

.movie-card p {
    min-height: 42px;
    margin: 8px 0 12px;
    color: var(--fog-400);
    font-size: 13px;
    line-height: 1.5;
}

.category-grid,
.category-overview-grid {
    display: grid;
    gap: 18px;
}

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

.category-tile {
    display: flex;
    min-height: 132px;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    border: 1px solid rgba(52, 58, 64, 0.9);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(36, 59, 83, 0.64), rgba(33, 37, 41, 0.72));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 115, 230, 0.62);
}

.category-tile span {
    color: var(--fog-50);
    font-size: 19px;
    font-weight: 800;
}

.category-tile small {
    color: var(--fog-400);
    font-size: 13px;
}

.page-hero {
    margin-top: 28px;
    padding: 44px;
    border: 1px solid rgba(52, 58, 64, 0.86);
    border-radius: 28px;
    background: radial-gradient(circle at 80% 20%, rgba(0, 115, 230, 0.22), transparent 34%), linear-gradient(135deg, rgba(36, 59, 83, 0.78), rgba(13, 17, 23, 0.92));
    box-shadow: var(--soft-shadow);
}

.compact-hero h1 {
    font-size: clamp(32px, 5vw, 54px);
}

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

.category-card {
    border: 1px solid rgba(52, 58, 64, 0.86);
    border-radius: 24px;
    background: rgba(33, 37, 41, 0.86);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 115, 230, 0.62);
}

.category-card a {
    display: grid;
    grid-template-columns: 190px 1fr;
    min-height: 160px;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 10px;
    background: var(--fog-900);
}

.category-cover-stack img {
    width: 100%;
    height: 68px;
    border-radius: 10px;
    object-fit: cover;
}

.category-card-body {
    padding: 24px;
}

.category-card-body h2 {
    margin: 0;
    font-size: 25px;
}

.category-card-body p {
    margin: 10px 0 18px;
    color: var(--fog-400);
}

.category-card-body span {
    color: var(--frost-300);
    font-weight: 800;
}

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

.filter-panel input,
.filter-panel select {
    width: 100%;
    padding: 13px 14px;
}

.catalog-section {
    padding-top: 28px;
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 30px;
    border: 1px dashed var(--fog-600);
    border-radius: 18px;
    color: var(--fog-300);
    text-align: center;
}

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

.rank-list {
    display: grid;
    gap: 14px;
    padding-top: 32px;
}

.rank-row {
    border-radius: 18px;
}

.rank-row a {
    display: grid;
    grid-template-columns: 58px 82px 1fr;
    gap: 18px;
    align-items: center;
    padding: 12px 18px 12px 12px;
}

.rank-num {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(0, 115, 230, 0.2);
    color: var(--frost-300);
    font-weight: 900;
}

.rank-row img {
    width: 82px;
    height: 112px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-row h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-row p {
    margin: 0 0 10px;
    color: var(--fog-400);
}

.detail-hero {
    padding-top: 26px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) 380px;
    gap: 24px;
    margin-top: 18px;
}

.player-card,
.detail-info-card,
.story-card {
    border: 1px solid rgba(52, 58, 64, 0.86);
    border-radius: 24px;
    background: rgba(33, 37, 41, 0.86);
    box-shadow: var(--soft-shadow);
    overflow: hidden;
}

.video-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: black;
}

.movie-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: black;
}

.video-mask {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(0, 115, 230, 0.18), rgba(0, 0, 0, 0.62));
    cursor: pointer;
}

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

.big-play {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    background: var(--frost-500);
    color: white;
    font-size: 34px;
    box-shadow: 0 0 46px rgba(26, 140, 255, 0.5);
}

.detail-info-card {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 18px;
    padding: 18px;
}

.detail-info-card img {
    width: 130px;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    object-fit: cover;
}

.detail-info-card h1 {
    font-size: 30px;
}

.detail-info-card p {
    margin: 12px 0;
    font-size: 15px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
    padding-top: 24px;
}

.story-card {
    padding: 24px;
}

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

.story-card p {
    margin: 0;
    color: var(--fog-300);
}

.accent-card {
    border-color: rgba(0, 115, 230, 0.34);
    background: linear-gradient(135deg, rgba(0, 115, 230, 0.18), rgba(33, 37, 41, 0.88));
}

.meta-card {
    grid-column: 1 / -1;
}

.meta-card dl {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 0;
}

.meta-card div {
    padding: 14px;
    border-radius: 14px;
    background: rgba(13, 17, 23, 0.42);
}

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

.meta-card dd {
    margin: 4px 0 0;
    color: var(--fog-50);
    font-weight: 800;
}

.site-footer {
    margin-top: 62px;
    border-top: 1px solid var(--fog-800);
    background: rgba(7, 10, 16, 0.72);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 0.9fr;
    gap: 36px;
    padding: 42px 24px;
}

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

.site-footer p,
.site-footer a {
    color: var(--fog-400);
    font-size: 14px;
}

.site-footer a {
    display: block;
    margin-top: 8px;
}

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

.site-footer h3 {
    margin: 0 0 12px;
    color: var(--fog-50);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px;
    border-top: 1px solid var(--fog-800);
    color: var(--fog-500);
    font-size: 14px;
    text-align: center;
}

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

    .menu-toggle {
        display: block;
    }

    .mobile-panel.is-open {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 44px;
    }

    .hero-poster {
        display: none;
    }

    .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: 760px) {
    main {
        padding-top: 68px;
    }

    .nav-wrap {
        height: 68px;
        padding: 0 16px;
    }

    .brand {
        font-size: 18px;
    }

    .hero-carousel,
    .page-hero,
    .content-section,
    .filter-panel,
    .rank-list,
    .detail-hero,
    .detail-content {
        width: calc(100% - 28px);
    }

    .hero-carousel {
        min-height: 560px;
        margin-top: 18px;
        border-radius: 22px;
    }

    .hero-content {
        padding: 32px 24px 68px;
        align-items: end;
    }

    .hero-copy h1 {
        font-size: 40px;
    }

    .hero-dots {
        left: 24px;
        bottom: 28px;
    }

    .hero-control {
        display: none;
    }

    .home-search-panel,
    .filter-panel {
        width: calc(100% - 28px);
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .wide-search {
        flex-direction: column;
        align-items: stretch;
    }

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

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

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

    .category-cover-stack {
        grid-template-columns: repeat(4, 1fr);
    }

    .category-cover-stack img {
        height: 92px;
    }

    .rank-row a {
        grid-template-columns: 42px 68px 1fr;
        gap: 12px;
    }

    .rank-row img {
        width: 68px;
        height: 92px;
    }

    .detail-info-card {
        grid-template-columns: 96px 1fr;
    }

    .detail-info-card img {
        width: 96px;
    }

    .detail-info-card h1 {
        font-size: 24px;
    }

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

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

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

@media (max-width: 480px) {
    .movie-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .category-cover-stack {
        grid-template-columns: repeat(2, 1fr);
    }
}
