:root {
    color-scheme: dark;
    --bg: #070a12;
    --bg-soft: #0d1320;
    --panel: rgba(16, 24, 39, 0.78);
    --panel-strong: rgba(18, 26, 43, 0.96);
    --line: rgba(255, 255, 255, 0.1);
    --text: #f8fafc;
    --muted: #a8b3c7;
    --soft: #64748b;
    --accent: #fb923c;
    --accent-2: #ef4444;
    --accent-3: #facc15;
    --radius-lg: 28px;
    --radius-md: 18px;
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 2%, rgba(251, 146, 60, 0.18), transparent 32rem),
        radial-gradient(circle at 88% 0%, rgba(239, 68, 68, 0.14), transparent 32rem),
        linear-gradient(180deg, #090d18 0%, #070a12 46%, #05070d 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 72%);
}

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

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

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 10, 18, 0.78);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 12px 34px rgba(251, 146, 60, 0.28);
}

.brand-text {
    font-size: 1.15rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.nav-link,
.mobile-nav-link {
    color: var(--muted);
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 15px;
    border-radius: 999px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: #fff;
    background: rgba(251, 146, 60, 0.16);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: #fff;
}

.mobile-menu {
    display: none;
    padding: 0 16px 16px;
}

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

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.hero-section {
    position: relative;
    min-height: 720px;
    padding: 46px 0 52px;
    overflow: hidden;
}

.hero-orbit {
    position: absolute;
    width: 520px;
    height: 520px;
    right: -140px;
    top: 30px;
    border-radius: 999px;
    background: conic-gradient(from 90deg, rgba(251, 146, 60, 0.24), rgba(239, 68, 68, 0.08), rgba(250, 204, 21, 0.22), rgba(251, 146, 60, 0.24));
    filter: blur(10px);
    opacity: 0.7;
}

.hero-slider {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 38px;
    overflow: hidden;
    background: var(--panel-strong);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.55fr);
    align-items: center;
    gap: 42px;
    padding: 64px;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    filter: saturate(1.2);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(7, 10, 18, 0.72));
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-3);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-hero h1 {
    margin: 14px 0 18px;
    font-size: clamp(2.45rem, 6vw, 5.2rem);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.07em;
}

.hero-copy p,
.page-hero p,
.detail-hero p {
    max-width: 700px;
    color: #d7deea;
    font-size: 1.08rem;
    line-height: 1.9;
}

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

.hero-tags span,
.tag-row span,
.inline-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #fee2c5;
    background: rgba(251, 146, 60, 0.12);
}

.hero-tags span,
.detail-tags span {
    padding: 8px 12px;
    font-size: 0.86rem;
}

.tag-row span,
.inline-tags span {
    padding: 5px 8px;
    font-size: 0.74rem;
}

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

.primary-btn,
.ghost-btn,
.text-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 18px 34px rgba(239, 68, 68, 0.24);
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
}

.text-btn {
    color: var(--accent-3);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-btn:hover,
.movie-card:hover,
.category-card:hover,
.compact-card:hover,
.rank-item:hover {
    transform: translateY(-3px);
}

.hero-poster {
    justify-self: end;
    width: min(340px, 100%);
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
}

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

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

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

.hero-dot.is-active {
    width: 34px;
    background: var(--accent);
}

.hero-search-panel {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: -54px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(12, 18, 30, 0.84);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-search-panel h2,
.section-heading h2,
.detail-copy h2 {
    margin: 8px 0 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: min(420px, 100%);
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.search-box span {
    color: var(--accent-3);
    font-weight: 900;
    font-size: 0.9rem;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    font: inherit;
}

.wide-search {
    max-width: 620px;
    margin-top: 28px;
}

.section-block {
    position: relative;
    padding: 56px 0;
}

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

.section-heading a {
    color: var(--accent-3);
    font-weight: 900;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    border: 1px solid var(--line);
    border-radius: 26px;
    overflow: hidden;
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: saturate(1.15);
}

.category-glow {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 15%, rgba(7, 10, 18, 0.94));
}

.category-copy {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
    bottom: 18px;
}

.category-copy strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 950;
}

.category-copy em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.7;
    font-size: 0.9rem;
}

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

.movie-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card.is-hidden,
.rank-item.is-hidden,
.compact-card.is-hidden {
    display: none;
}

.movie-card:hover,
.category-card:hover,
.compact-card:hover,
.rank-item:hover {
    border-color: rgba(251, 146, 60, 0.42);
}

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

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

.movie-card:hover .poster-frame img {
    transform: scale(1.06);
    filter: saturate(1.16);
}

.movie-badge,
.play-chip {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 900;
}

.movie-badge {
    left: 10px;
    top: 10px;
    padding: 5px 8px;
    color: #fff;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px);
}

.play-chip {
    right: 10px;
    bottom: 10px;
    padding: 7px 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    min-height: 2.8em;
    margin: 0 0 8px;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 950;
}

.card-meta,
.card-desc {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.65;
}

.card-desc {
    min-height: 4.9em;
    margin-top: 8px;
}

.tag-row {
    margin-top: 12px;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 28px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.compact-card img {
    width: 74px;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
}

.compact-info strong,
.compact-info em {
    display: block;
}

.compact-info strong {
    margin-top: 4px;
    font-weight: 950;
}

.compact-info em,
.rank-main em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.84rem;
}

.ranking-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-item {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-link {
    display: grid;
    grid-template-columns: 50px 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
}

.rank-num {
    color: var(--accent-3);
    font-size: 1.2rem;
    font-weight: 950;
}

.rank-link img {
    width: 64px;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
}

.rank-main strong,
.rank-main em {
    display: block;
}

.rank-main strong {
    margin-bottom: 6px;
    font-weight: 950;
}

.heat-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(251, 146, 60, 0.18);
    font-weight: 900;
    white-space: nowrap;
}

.full-ranking .rank-link {
    grid-template-columns: 58px 76px minmax(0, 1fr) auto;
}

.page-hero {
    padding: 78px 0 26px;
}

.page-hero h1 {
    margin-bottom: 12px;
}

.breadcrumb-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.breadcrumb-line a {
    color: #fff;
}

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

.large-category-grid .category-card {
    min-height: 280px;
}

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

.detail-hero {
    position: relative;
    padding: 86px 0 92px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--line);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(7, 10, 18, 0.92));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    color: #fff;
    border: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.42));
    cursor: pointer;
    font: inherit;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.is-playing .play-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 82px;
    height: 82px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 20px 54px rgba(239, 68, 68, 0.34);
    font-size: 1.8rem;
}

.play-overlay strong {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(10px);
}

.detail-copy {
    margin-top: 28px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.045);
}

.detail-copy h2 + p {
    margin-top: 12px;
}

.detail-copy p {
    color: #d7deea;
    line-height: 2;
    font-size: 1rem;
}

.detail-side {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 18px;
}

.detail-poster {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    object-fit: cover;
}

.info-list {
    margin: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
}

.info-list div {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.info-list div:last-child {
    border-bottom: 0;
}

.info-list dt {
    color: var(--soft);
    font-weight: 900;
}

.info-list dd {
    margin: 0;
    color: #e5e7eb;
}

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

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.24);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
    gap: 28px;
    padding: 38px 0;
}

.footer-grid p {
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.footer-links a {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
}

.footer-links a:hover {
    color: #fff;
    border-color: rgba(251, 146, 60, 0.42);
}

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

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

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

    .nav-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 38px 24px;
    }

    .hero-poster {
        display: none;
    }

    .hero-search-panel,
    .section-heading,
    .footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-search-panel,
    .section-heading {
        display: grid;
    }

    .search-box {
        min-width: 100%;
    }

    .two-column-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .hero-section {
        min-height: 650px;
        padding-top: 22px;
    }

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

    .hero-copy h1,
    .page-hero h1,
    .detail-hero h1 {
        letter-spacing: -0.05em;
    }

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

    .rank-link,
    .full-ranking .rank-link {
        grid-template-columns: 42px 58px minmax(0, 1fr);
    }

    .heat-pill {
        grid-column: 3;
        justify-self: start;
        margin-top: 6px;
    }

    .content-wrap {
        width: min(100% - 24px, 1180px);
    }

    .section-block {
        padding: 38px 0;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .related-grid,
    .category-movie-grid,
    .category-grid,
    .large-category-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        display: grid;
    }

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