:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.78);
    --card: rgba(30, 41, 59, 0.58);
    --line: rgba(51, 65, 85, 0.78);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --muted-dark: #64748b;
    --cyan: #22d3ee;
    --cyan-deep: #06b6d4;
    --blue: #2563eb;
    --yellow: #facc15;
    --orange: #fb923c;
    --green: #4ade80;
    --red: #f87171;
    --radius: 18px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 32rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 36rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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(15, 23, 42, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--cyan), #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bg);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.32);
}

.logo-mark svg {
    width: 19px;
    height: 19px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 15px;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.18s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--cyan);
}

.header-search {
    position: relative;
    width: 240px;
    flex: 0 1 240px;
}

.header-search input,
.filter-input {
    width: 100%;
    color: var(--text);
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    padding: 11px 42px 11px 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.header-search input:focus,
.filter-input:focus {
    border-color: rgba(34, 211, 238, 0.9);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.13);
}

.search-submit {
    position: absolute;
    right: 7px;
    top: 50%;
    width: 32px;
    height: 32px;
    transform: translateY(-50%);
    border: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: rgba(30, 41, 59, 0.72);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav {
    display: grid;
    gap: 12px;
    padding: 16px 0 20px;
}

.mobile-search {
    width: 100%;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    background: #020617;
}

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

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

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

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 48%, rgba(2, 6, 23, 0.38) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 70vh;
    padding: 96px 0 84px;
}

.hero-copy {
    width: min(660px, 100%);
}

.hero-badges,
.card-meta,
.movie-meta,
.tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(34, 211, 238, 0.5);
    color: var(--cyan);
    background: rgba(6, 182, 212, 0.14);
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.badge-muted {
    border-color: rgba(148, 163, 184, 0.24);
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.58);
}

.hero-title {
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.hero-desc {
    max-width: 640px;
    margin: 0 0 28px;
    color: #cbd5e1;
    font-size: 18px;
}

.hero-actions,
.section-head,
.detail-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 20px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: white;
    background: linear-gradient(90deg, var(--cyan-deep), var(--blue));
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.22);
}

.btn-primary:hover {
    box-shadow: 0 16px 38px rgba(6, 182, 212, 0.34);
}

.btn-ghost {
    color: var(--text);
    border-color: rgba(148, 163, 184, 0.26);
    background: rgba(15, 23, 42, 0.58);
}

.btn-ghost:hover {
    border-color: rgba(34, 211, 238, 0.55);
    color: var(--cyan);
}

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

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

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

main {
    padding-bottom: 64px;
}

.page-hero {
    padding: 56px 0 30px;
}

.page-title {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.page-desc {
    max-width: 820px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.section {
    margin-top: 58px;
}

.section-title {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--muted);
    margin: 8px 0 0;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.17);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.52);
    box-shadow: 0 22px 46px rgba(6, 182, 212, 0.14);
}

.card-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #0f172a;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.08);
}

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

.card-play {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
}

.play-circle {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #020617;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.card-duration {
    position: absolute;
    z-index: 3;
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    color: white;
    background: rgba(0, 0, 0, 0.75);
    font-size: 12px;
    font-weight: 700;
}

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0 0 8px;
    color: #f8fafc;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 800;
    transition: color 0.18s ease;
}

.movie-card:hover .card-title {
    color: var(--cyan);
}

.card-desc {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    color: var(--muted-dark);
    font-size: 13px;
}

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

.horizontal-list {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
    padding: 12px;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: var(--radius);
    background: var(--card);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.horizontal-card:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.52);
}

.horizontal-cover {
    overflow: hidden;
    height: 132px;
    border-radius: 14px;
    background: #0f172a;
}

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

.horizontal-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 900;
}

.horizontal-card:hover .horizontal-title {
    color: var(--cyan);
}

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

.category-tile {
    min-height: 178px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    position: relative;
    padding: 22px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(37, 99, 235, 0.12)),
        rgba(30, 41, 59, 0.58);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.16);
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.62);
}

.category-tile h2,
.category-tile h3 {
    position: relative;
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    position: relative;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.rank-panel {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.rank-item {
    display: grid;
    grid-template-columns: 52px 92px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.52);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.52);
}

.rank-no {
    color: var(--yellow);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-thumb {
    overflow: hidden;
    width: 92px;
    height: 58px;
    border-radius: 12px;
    background: #0f172a;
}

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

.rank-title {
    margin: 0 0 4px;
    font-weight: 900;
}

.rank-desc {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-bar {
    display: grid;
    grid-template-columns: minmax(220px, 420px) minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 18px;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

.filter-chips {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.filter-chip {
    flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(30, 41, 59, 0.62);
    padding: 8px 13px;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.filter-chip.is-active,
.filter-chip:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.56);
    background: rgba(6, 182, 212, 0.14);
}

.no-results {
    display: none;
    margin-top: 28px;
    color: var(--muted);
    text-align: center;
}

.no-results.is-visible {
    display: block;
}

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

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

.detail-hero {
    padding: 44px 0 24px;
}

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

.player-box {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-box video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #fff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.34));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button-large {
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--bg);
    background: white;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

.detail-card {
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
    padding: 22px;
    box-shadow: var(--shadow);
}

.poster {
    overflow: hidden;
    border-radius: 18px;
    margin-bottom: 18px;
    aspect-ratio: 16 / 10;
    background: #0f172a;
}

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

.detail-title {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    font-weight: 900;
}

.detail-summary {
    color: #cbd5e1;
    font-size: 17px;
}

.content-panel {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.66);
}

.content-panel h2 {
    margin: 0 0 12px;
    color: #f8fafc;
    font-size: 24px;
}

.content-panel p {
    color: #cbd5e1;
    margin: 0;
}

.content-panel p + p {
    margin-top: 14px;
}

.meta-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.meta-list div {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
    color: var(--muted);
}

.meta-list dt {
    color: #f8fafc;
    font-weight: 800;
}

.meta-list dd {
    margin: 0;
}

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

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.82);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 28px;
    padding: 40px 0;
}

.footer-title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

.footer-text,
.footer-links a {
    color: var(--muted);
    font-size: 14px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--cyan);
}

.copyright {
    padding: 18px 0;
    border-top: 1px solid var(--line);
    color: var(--muted-dark);
    font-size: 13px;
}

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

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

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

    .menu-toggle {
        display: inline-flex;
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 96px;
    }

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

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

    .tool-bar {
        grid-template-columns: 1fr;
    }

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

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

    .logo {
        font-size: 20px;
    }

    .hero-carousel,
    .hero-content {
        min-height: 74vh;
    }

    .hero-desc {
        font-size: 16px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

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

    .horizontal-cover {
        height: 190px;
    }

    .rank-item {
        grid-template-columns: 38px 76px minmax(0, 1fr);
    }

    .rank-item .btn {
        grid-column: 1 / -1;
    }
}
