:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.72);
    --line: rgba(96, 165, 250, 0.18);
    --line-strong: rgba(34, 211, 238, 0.42);
    --text: #e5e7eb;
    --muted: #9ca3af;
    --muted-dark: #64748b;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --amber: #f59e0b;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 16% 0%, rgba(59, 130, 246, 0.25), transparent 28rem),
        radial-gradient(circle at 84% 12%, rgba(34, 211, 238, 0.16), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #08111f 46%, #020617 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.92), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    max-width: 1320px;
    min-height: 70px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand {
    min-width: max-content;
    font-size: 20px;
    background: linear-gradient(90deg, #60a5fa, #67e8f9, #93c5fd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 26px rgba(34, 211, 238, 0.28);
    font-size: 14px;
}

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

.site-nav > a,
.nav-dropdown > a {
    color: #d1d5db;
    font-weight: 650;
    transition: color 0.2s ease;
}

.site-nav > a:hover,
.nav-dropdown > a:hover,
.site-nav .active {
    color: var(--cyan);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 34px;
    left: 0;
    min-width: 180px;
    padding: 10px;
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.dropdown-panel a {
    padding: 9px 12px;
    border-radius: 10px;
    color: #cbd5e1;
}

.dropdown-panel a:hover {
    color: var(--cyan);
    background: rgba(30, 58, 138, 0.5);
}

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

.nav-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.page-filter input,
.page-filter select {
    color: #e2e8f0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
    width: 250px;
    padding: 11px 14px;
}

.nav-search input:focus,
.page-filter input:focus,
.page-filter select:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.nav-search button,
.primary-btn,
.secondary-btn,
.section-link,
.search-submit {
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 750;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.primary-btn,
.search-submit {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.22);
}

.nav-search button {
    padding: 11px 16px;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
}

.secondary-btn,
.section-link {
    color: #dbeafe;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.62);
}

.nav-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.section-link:hover,
.search-submit:hover {
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
}

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

.hero-slider {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    border-bottom: 1px solid rgba(96, 165, 250, 0.14);
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.26) 100%),
        linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1320px;
    min-height: 640px;
    margin: 0 auto;
    padding: 96px 22px 76px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 390px;
    align-items: center;
    gap: 46px;
}

.hero-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.hero-kicker span,
.detail-chip,
.tag-row span,
.category-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 47, 73, 0.42);
    font-size: 12px;
    font-weight: 700;
}

.hero-title {
    max-width: 860px;
    margin: 0 0 18px;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-text {
    max-width: 720px;
    margin: 0 0 30px;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(16px);
}

.hero-panel img {
    height: 230px;
    object-fit: cover;
}

.hero-panel-body {
    padding: 22px;
}

.hero-panel-body h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.hero-panel-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

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

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

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

.main-wrap {
    max-width: 1320px;
    margin: 0 auto;
    padding: 54px 22px 80px;
}

.content-section {
    margin-bottom: 64px;
}

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

.section-heading h1,
.section-heading h2,
.page-heading h1,
.detail-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-heading p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    min-height: 40px;
    padding: 0 16px;
}

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

.movie-card {
    position: relative;
    min-width: 0;
    border: 1px solid rgba(96, 165, 250, 0.14);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.20);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

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

.poster-link img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

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

.duration,
.play-badge,
.rank-number {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.duration {
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
}

.play-badge {
    left: 10px;
    top: 10px;
    padding: 5px 10px;
    color: #082f49;
    background: rgba(103, 232, 249, 0.9);
}

.rank-number {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
    padding: 17px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    margin-bottom: 9px;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 800;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    margin: 0 0 13px;
    color: #aeb7c6;
    font-size: 14px;
    line-height: 1.58;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.meta-row,
.tag-row,
.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-row {
    margin-bottom: 12px;
    color: var(--muted-dark);
    font-size: 12px;
    font-weight: 700;
}

.tag-row span {
    min-height: 24px;
    color: #bae6fd;
    background: rgba(30, 58, 138, 0.38);
}

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

.category-card {
    min-height: 220px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.16), transparent 12rem),
        linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.5);
}

.category-card h2 {
    margin: 16px 0 10px;
    font-size: 24px;
}

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

.page-filter {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 14px;
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.54);
}

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

.search-hero {
    padding: 60px 22px 36px;
    background:
        radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.14), transparent 30rem),
        linear-gradient(180deg, rgba(30, 58, 138, 0.25), rgba(2, 6, 23, 0));
}

.search-box {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.search-box h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
}

.search-box p {
    margin: 0 0 22px;
    color: var(--muted);
}

.search-form-large {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.74);
}

.search-form-large input {
    flex: 1;
    min-width: 0;
    border: 0;
    color: var(--text);
    background: transparent;
    padding: 0 12px;
    outline: none;
}

.search-submit {
    min-width: 110px;
    min-height: 48px;
}

.empty-state {
    padding: 46px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.62);
}

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

.breadcrumb a {
    color: #bae6fd;
}

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

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

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.62)),
        rgba(0, 0, 0, 0.22);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    display: inline-grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 40px rgba(34, 211, 238, 0.34);
    font-size: 30px;
    transform: translateX(2px);
}

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

.detail-card,
.text-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.64);
    box-shadow: var(--shadow);
}

.detail-card {
    overflow: hidden;
}

.detail-card img {
    height: 330px;
    object-fit: cover;
}

.detail-card-body {
    padding: 22px;
}

.detail-title {
    margin-bottom: 14px;
}

.detail-meta {
    margin: 0 0 16px;
}

.detail-chip {
    color: #dbeafe;
}

.detail-score {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fde68a;
    font-size: 22px;
    font-weight: 900;
}

.text-panel {
    margin-top: 26px;
    padding: 28px;
}

.text-panel h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 24px;
}

.text-panel p {
    margin: 0;
    color: #d1d5db;
    line-height: 1.9;
    white-space: pre-line;
}

.related-section {
    margin-top: 40px;
}

.site-footer {
    border-top: 1px solid rgba(96, 165, 250, 0.16);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), #000000);
}

.footer-grid {
    max-width: 1320px;
    margin: 0 auto;
    padding: 44px 22px 26px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 30px;
}

.footer-brand {
    margin-bottom: 12px;
    color: var(--cyan);
    font-size: 20px;
}

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

.site-footer h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
}

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

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

.footer-bottom {
    max-width: 1320px;
    margin: 0 auto;
    padding: 20px 22px 32px;
    color: #64748b;
    border-top: 1px solid rgba(96, 165, 250, 0.12);
    font-size: 14px;
}

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

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

    .hero-panel {
        max-width: 520px;
    }

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

@media (max-width: 840px) {
    .nav-wrap {
        min-height: 64px;
        gap: 12px;
    }

    .brand {
        font-size: 17px;
    }

    .nav-toggle {
        display: block;
    }

    .site-nav,
    .nav-search {
        position: absolute;
        left: 16px;
        right: 16px;
        display: none;
        border: 1px solid var(--line);
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

    .site-nav {
        top: 72px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border-radius: 18px 18px 0 0;
    }

    .site-nav.open,
    .nav-search.open {
        display: flex;
    }

    .site-nav > a,
    .nav-dropdown > a,
    .dropdown-panel a {
        padding: 12px;
    }

    .nav-dropdown:hover .dropdown-panel {
        transform: none;
    }

    .dropdown-panel {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 8px;
        box-shadow: none;
        background: rgba(30, 41, 59, 0.62);
    }

    .nav-search {
        top: 390px;
        margin: 0;
        padding: 12px;
        border-radius: 0 0 18px 18px;
    }

    .nav-search input {
        width: 100%;
    }

    .hero-slider,
    .hero-inner {
        min-height: 720px;
    }

    .hero-inner {
        padding-top: 74px;
    }

    .hero-panel {
        display: none;
    }

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

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

    .page-filter {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .main-wrap {
        padding: 38px 14px 60px;
    }

    .hero-inner {
        padding-left: 14px;
        padding-right: 14px;
    }

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

    .hero-actions {
        flex-direction: column;
    }

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

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

    .search-form-large {
        flex-direction: column;
    }

    .search-form-large input {
        min-height: 48px;
    }

    .detail-card img {
        height: 260px;
    }

    .text-panel {
        padding: 20px;
    }
}
