:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #f8fafc;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --yellow: #facc15;
    --danger: #fb7185;
    --shadow: 0 24px 90px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.22), transparent 28rem),
        radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.24), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

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

.header-inner {
    width: min(1240px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 32px rgba(34, 211, 238, 0.24);
    color: #ffffff;
    font-size: 15px;
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-4deg);
}

.brand-name {
    font-size: clamp(20px, 2vw, 27px);
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-link {
    color: #cbd5e1;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.12);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.94);
}

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

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.active {
    background: rgba(34, 211, 238, 0.12);
    color: #ffffff;
}

main {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: calc(100vh - 76px);
    padding: clamp(34px, 6vw, 78px) 0 44px;
    display: grid;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 26px;
    align-items: stretch;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #020617;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.02);
}

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

.hero-slide img.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.02);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 35%, rgba(34, 211, 238, 0.18), transparent 20rem),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.18)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: clamp(32px, 6vw, 72px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 8px 13px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(38px, 8vw, 78px);
    line-height: 0.96;
    letter-spacing: -0.07em;
}

.hero h1 span,
.page-hero h1 span {
    color: #67e8f9;
}

.hero-description {
    max-width: 680px;
    margin: 24px 0 0;
    color: #cbd5e1;
    font-size: clamp(16px, 1.8vw, 20px);
}

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

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

.primary-button {
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(34, 211, 238, 0.22);
}

.ghost-button {
    padding: 12px 19px;
    border: 1px solid rgba(226, 232, 240, 0.24);
    background: rgba(15, 23, 42, 0.52);
    color: #e2e8f0;
}

.text-button {
    padding: 10px 15px;
    color: #67e8f9;
    background: rgba(34, 211, 238, 0.11);
}

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

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

.meta-pills {
    margin-top: 24px;
}

.meta-pills span,
.tag-row span {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: #cbd5e1;
    font-weight: 700;
}

.meta-pills span {
    padding: 8px 12px;
    border: 1px solid var(--line);
}

.tag-row span {
    padding: 5px 9px;
    color: #67e8f9;
    background: rgba(34, 211, 238, 0.1);
    font-size: 12px;
}

.hero-controls {
    position: absolute;
    z-index: 3;
    right: 24px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-controls button {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(226, 232, 240, 0.26);
    border-radius: 50%;
    background: rgba(2, 6, 23, 0.62);
    color: #ffffff;
    cursor: pointer;
}

.hero-side {
    display: grid;
    gap: 18px;
}

.hero-panel,
.side-card,
.search-panel,
.category-tile,
.movie-card,
.info-box,
.detail-section,
.player-card,
.rank-row {
    border: 1px solid var(--line);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-panel,
.side-card,
.search-panel,
.info-box,
.detail-section,
.player-card {
    border-radius: 28px;
}

.hero-panel {
    padding: 22px;
}

.hero-panel h2,
.side-card h2,
.search-panel label,
.section-title h2,
.footer-links h2,
.info-box h2,
.detail-section h2 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
}

.mini-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.mini-item {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 13px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.42);
    transition: transform 0.2s ease, background 0.2s ease;
}

.mini-item:hover {
    transform: translateX(3px);
    background: rgba(34, 211, 238, 0.08);
}

.mini-item img {
    width: 74px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.mini-item h3,
.mini-item p {
    margin: 0;
}

.mini-item h3 {
    font-size: 15px;
    line-height: 1.35;
}

.mini-item p {
    color: var(--muted);
    font-size: 13px;
}

.side-card {
    padding: 26px;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 18rem),
        var(--bg-card);
}

.side-card p {
    margin: 10px 0 0;
    color: #cbd5e1;
}

.section {
    padding: 42px 0;
}

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

.section-title h2 {
    font-size: clamp(25px, 4vw, 36px);
    letter-spacing: -0.04em;
}

.section-title p {
    max-width: 650px;
    margin: 8px 0 0;
    color: var(--muted);
}

.search-panel {
    padding: 22px;
    margin: 28px 0;
}

.search-panel label {
    display: block;
    margin-bottom: 12px;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.search-box input {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    outline: none;
    background: rgba(2, 6, 23, 0.62);
    color: #ffffff;
}

.search-box input:focus {
    border-color: rgba(34, 211, 238, 0.75);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.search-box button {
    min-height: 52px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
    font-weight: 900;
    cursor: pointer;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.34);
    box-shadow: 0 22px 60px rgba(2, 6, 23, 0.58);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.movie-card.compact .poster-link {
    aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.8), transparent 48%);
}

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    color: #ffffff;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-dot {
    opacity: 1;
    transform: scale(1);
}

.card-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.movie-card h3,
.rank-main h2 {
    margin: 0;
    color: #ffffff;
    line-height: 1.3;
}

.movie-card h3 {
    font-size: 18px;
}

.movie-card h3 a:hover,
.rank-main h2 a:hover {
    color: #67e8f9;
}

.movie-card p,
.rank-main p,
.info-box p,
.detail-section p {
    color: #cbd5e1;
}

.movie-card p {
    min-height: 52px;
    margin: 9px 0 12px;
    font-size: 14px;
}

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

.category-tile {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border-radius: 28px;
    padding: 22px;
    display: flex;
    align-items: flex-end;
}

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

.category-tile:hover img {
    transform: scale(1.06);
    opacity: 0.58;
}

.category-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.94));
}

.category-tile div {
    position: relative;
    z-index: 2;
}

.category-tile h3,
.category-tile p,
.category-tile strong {
    margin: 0;
}

.category-tile h3 {
    font-size: 22px;
}

.category-tile p {
    margin-top: 8px;
    color: #cbd5e1;
    font-size: 14px;
}

.category-tile strong {
    display: inline-flex;
    margin-top: 14px;
    color: #67e8f9;
    font-size: 13px;
}

.page-hero {
    padding: 58px 0 22px;
}

.page-hero h1 {
    font-size: clamp(34px, 6vw, 62px);
}

.page-hero p {
    max-width: 780px;
    color: #cbd5e1;
    font-size: 18px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: #67e8f9;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 96px 64px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 12px;
    border-radius: 24px;
}

.rank-poster img {
    width: 96px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 16px;
    background: #0f172a;
}

.rank-number {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 18px;
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
    font-size: 20px;
    font-weight: 900;
}

.rank-main h2 {
    font-size: 20px;
}

.rank-main p {
    margin: 8px 0 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    padding-bottom: 48px;
}

.player-card {
    overflow: hidden;
    background: #020617;
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
    isolation: isolate;
}

.player-frame video {
    width: 100%;
    height: 100%;
    background: #000000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    background:
        radial-gradient(circle at center, rgba(34, 211, 238, 0.18), transparent 18rem),
        linear-gradient(0deg, rgba(2, 6, 23, 0.6), rgba(2, 6, 23, 0.3));
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 54px rgba(34, 211, 238, 0.28);
    font-size: 30px;
}

.player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.player-frame:hover .player-controls,
.player-frame.playing .player-controls {
    opacity: 1;
}

.player-controls button {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    padding: 8px 14px;
    cursor: pointer;
}

.player-message {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(2, 6, 23, 0.88);
    color: #fecdd3;
    text-align: center;
}

.player-message[hidden] {
    display: none;
}

.detail-content {
    padding: 24px 0 0;
}

.detail-content h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-meta span {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.56);
    color: #cbd5e1;
    font-weight: 800;
}

.detail-section {
    padding: 24px;
    margin-top: 20px;
}

.detail-section p {
    margin: 12px 0 0;
}

.aside-stack {
    display: grid;
    gap: 18px;
    align-content: start;
}

.info-box {
    padding: 22px;
}

.info-box p {
    margin: 10px 0 0;
}

.hidden-by-search {
    display: none !important;
}

.no-results {
    display: none;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    color: #cbd5e1;
    text-align: center;
}

.no-results.show {
    display: block;
}

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

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 0.5fr 0.7fr;
    gap: 30px;
}

.footer-brand p {
    max-width: 560px;
    color: var(--muted);
}

.footer-links {
    display: grid;
    gap: 9px;
    align-content: start;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: #67e8f9;
}

@media (max-width: 1120px) {
    .hero-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        min-height: 560px;
    }

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

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

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

    .menu-toggle {
        display: block;
    }

    .header-inner {
        height: 66px;
    }

    .hero {
        min-height: auto;
        padding-top: 28px;
    }

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

    .hero-content {
        padding: 30px;
    }

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

    .section-title,
    .rank-row,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .section-title {
        display: grid;
    }

    .rank-row {
        align-items: start;
    }

    .rank-poster img {
        width: 100%;
    }

    .footer-inner {
        display: grid;
    }
}

@media (max-width: 560px) {
    main,
    .header-inner,
    .mobile-nav,
    .footer-inner {
        width: min(100% - 22px, 1240px);
    }

    .brand-name {
        font-size: 20px;
    }

    .hero-slider {
        min-height: 560px;
    }

    .hero-content {
        padding: 24px;
    }

    .hero-actions,
    .section-actions,
    .search-box {
        grid-template-columns: 1fr;
        display: grid;
    }

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

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

    .detail-section,
    .info-box,
    .hero-panel,
    .search-panel {
        padding: 18px;
        border-radius: 22px;
    }
}
