* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #07111f;
    --bg-soft: rgba(15, 23, 42, 0.72);
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --border: rgba(34, 211, 238, 0.22);
    --text: #e5f3ff;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.16);
    --blue: #2563eb;
    --gold: #fbbf24;
    --shadow: 0 24px 60px rgba(8, 145, 178, 0.18);
}

html {
    min-height: 100%;
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.24), transparent 30rem),
        linear-gradient(135deg, #0f172a 0%, #0b1d3a 48%, #020617 100%);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.9), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(34, 211, 238, 0.18);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(18px);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--cyan);
}

.site-logo {
    font-size: 24px;
    white-space: nowrap;
}

.logo-orb {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.48);
    font-size: 14px;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    flex: 1;
}

.nav-links a,
.mobile-menu a {
    color: #cbd5e1;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-links a:hover {
    transform: translateY(-1px);
}

.nav-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-open,
.menu-toggle,
.hero-arrow,
.search-close {
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.72);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.search-open {
    min-height: 38px;
    padding: 0 18px;
    border-radius: 999px;
}

.search-open:hover,
.menu-toggle:hover,
.hero-arrow:hover,
.search-close:hover {
    border-color: rgba(34, 211, 238, 0.55);
    background: rgba(34, 211, 238, 0.16);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.mobile-menu {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 20px;
    border-top: 1px solid rgba(34, 211, 238, 0.16);
}

.mobile-menu.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.search-layer {
    position: fixed;
    inset: 0;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 88px 16px 24px;
    background: rgba(2, 6, 23, 0.76);
    backdrop-filter: blur(14px);
}

.search-layer.is-open {
    display: flex;
}

.search-dialog {
    width: min(720px, 100%);
    position: relative;
    background: var(--panel-strong);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.search-dialog h2 {
    margin: 0 0 18px;
    font-size: 28px;
}

.search-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    font-size: 24px;
    line-height: 1;
}

.search-dialog input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 14px;
    outline: none;
    padding: 0 16px;
}

.search-dialog input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.search-results {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    max-height: 58vh;
    overflow: auto;
}

.search-item {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.58);
}

.search-item strong {
    color: #f8fafc;
}

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

.hero-wrap {
    padding: 32px 0 24px;
}

.hero-slider {
    position: relative;
    height: clamp(520px, 62vw, 640px);
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.58) 48%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, transparent 58%);
}

.hero-content {
    position: absolute;
    left: clamp(24px, 5vw, 72px);
    bottom: clamp(60px, 8vw, 96px);
    width: min(680px, calc(100% - 48px));
}

.hero-tags,
.detail-meta,
.tag-list,
.hero-actions,
.hero-channel-bar,
.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    background: rgba(34, 211, 238, 0.12);
    color: var(--cyan);
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span:nth-child(2) {
    border-color: rgba(251, 191, 36, 0.32);
    background: rgba(251, 191, 36, 0.13);
    color: var(--gold);
}

.hero-content h1,
.hero-content h2 {
    margin: 18px 0 14px;
    max-width: 12em;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 18px;
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.7;
}

.hero-meta {
    margin-bottom: 24px;
    color: #cbd5e1;
}

.primary-btn,
.ghost-btn,
.section-link,
.category-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: white;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 16px 34px rgba(34, 211, 238, 0.28);
}

.ghost-btn,
.section-link {
    color: var(--text);
    border: 1px solid rgba(34, 211, 238, 0.28);
    background: rgba(15, 23, 42, 0.62);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.category-card a:hover span {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(34, 211, 238, 0.22);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    font-size: 36px;
    transform: translateY(-50%);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 22px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

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

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

.hero-channel-bar {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.58);
}

.hero-channel-bar span {
    color: #f8fafc;
    font-weight: 800;
}

.hero-channel-bar a,
.footer-links a,
.category-samples a {
    color: #cbd5e1;
    transition: color 0.2s ease;
}

.hero-channel-bar a:hover,
.footer-links a:hover,
.category-samples a:hover {
    color: var(--cyan);
}

.content-section,
.page-shell,
.detail-shell {
    padding: 46px 0;
}

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

.page-title {
    display: block;
    max-width: 820px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-heading h2,
.page-title h1,
.related-box h2 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
}

.page-title p:not(.eyebrow) {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

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

.compact-grid,
.ranking-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

.movie-card a,
.category-card a,
.detail-content,
.related-box,
.side-poster,
.filter-panel,
.player-card {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(16px);
}

.movie-card a {
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #020617;
}

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

.movie-card a:hover .poster-frame img {
    transform: scale(1.08);
    filter: saturate(1.12) contrast(1.06);
}

.year-badge,
.rank-badge,
.play-chip {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.year-badge {
    top: 10px;
    right: 10px;
    color: #3b2600;
    background: rgba(251, 191, 36, 0.9);
}

.rank-badge {
    top: 10px;
    left: 10px;
    min-width: 30px;
    color: white;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.play-chip {
    left: 10px;
    bottom: 10px;
    color: white;
    background: rgba(8, 145, 178, 0.86);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card a:hover .play-chip {
    opacity: 1;
    transform: translateY(0);
}

.movie-info {
    padding: 14px;
}

.movie-info h2,
.movie-info h3 {
    margin: 0 0 8px;
    color: #f8fafc;
    font-size: 16px;
    line-height: 1.35;
}

.movie-meta,
.movie-desc {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.movie-desc {
    display: -webkit-box;
    min-height: 40px;
    margin-top: 8px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ranking-panel {
    padding-top: 24px;
}

.category-card a {
    padding: 24px;
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.category-card a:hover {
    border-color: rgba(34, 211, 238, 0.56);
    background: rgba(14, 116, 144, 0.16);
    transform: translateY(-5px);
}

.category-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.category-card p {
    color: var(--muted);
    line-height: 1.7;
}

.category-samples {
    display: grid;
    gap: 8px;
    min-height: 112px;
    margin: 18px 0;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
}

.empty-state {
    margin: 26px 0 0;
    padding: 26px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.62);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 6px 0 24px;
    color: var(--muted);
}

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

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

.player-card {
    background: #000;
}

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

.player-box video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border: 0;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.28), rgba(2, 6, 23, 0.52));
    color: white;
    cursor: pointer;
}

.player-start span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 0 50px rgba(34, 211, 238, 0.42);
    font-size: 34px;
    text-indent: 4px;
}

.player-start.is-hidden {
    display: none;
}

.player-message {
    position: absolute;
    left: 50%;
    bottom: 22px;
    padding: 10px 14px;
    border-radius: 999px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.82);
    transform: translateX(-50%);
}

.detail-content {
    margin-top: 22px;
    padding: 28px;
}

.detail-content h1 {
    margin: 0 0 16px;
    color: #f8fafc;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.15;
}

.detail-meta span {
    padding: 7px 10px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.12);
}

.lead-text {
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.detail-content section {
    margin-top: 28px;
}

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

.detail-content p {
    color: #cbd5e1;
    line-height: 1.9;
}

.detail-side {
    display: grid;
    gap: 22px;
}

.side-poster {
    padding: 12px;
}

.side-poster img {
    width: 100%;
    border-radius: 14px;
}

.related-box {
    padding: 20px;
}

.related-box h2 {
    margin-bottom: 18px;
    font-size: 24px;
}

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

.related-list .movie-card a {
    display: grid;
    grid-template-columns: 92px 1fr;
}

.related-list .poster-frame {
    aspect-ratio: 2 / 3;
}

.site-footer {
    margin-top: 36px;
    border-top: 1px solid rgba(34, 211, 238, 0.16);
    background: rgba(2, 6, 23, 0.42);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
    padding: 42px 0;
}

.footer-logo {
    margin-bottom: 14px;
    font-size: 24px;
}

.site-footer p,
.site-footer h2 {
    margin: 0;
}

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

.site-footer h2 {
    margin-bottom: 14px;
    font-size: 18px;
}

.footer-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
}

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid rgba(34, 211, 238, 0.12);
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .movie-grid,
    .ranking-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .detail-side {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1220px);
    }

    .site-logo {
        font-size: 20px;
    }

    .search-open {
        display: none;
    }

    .hero-slider {
        height: 560px;
        border-radius: 22px;
    }

    .hero-shade {
        background: linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.48) 100%);
    }

    .hero-content {
        left: 20px;
        bottom: 68px;
        width: calc(100% - 40px);
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 38px;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

    .movie-info {
        padding: 12px;
    }

    .detail-content {
        padding: 20px;
    }

    .related-list .movie-card a {
        grid-template-columns: 84px 1fr;
    }
}

@media (max-width: 460px) {
    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

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

    .movie-grid,
    .compact-grid,
    .ranking-grid,
    .ranking-list {
        grid-template-columns: 1fr 1fr;
    }

    .movie-info h2,
    .movie-info h3 {
        font-size: 15px;
    }
}
