
:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(59, 130, 246, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --blue: #2563eb;
    --cyan: #22d3ee;
    --glow: rgba(34, 211, 238, 0.36);
}

html {
    scroll-behavior: smooth;
}

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

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

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

main {
    min-height: 70vh;
}

.site-header {
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.32);
}

.nav-shell {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-text,
.footer-brand {
    font-size: 26px;
    background: linear-gradient(90deg, #60a5fa, #67e8f9, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: white;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.38);
}

.nav-search {
    flex: 1;
    max-width: 560px;
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    padding: 5px;
}

.nav-search input,
.home-search-panel input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    color: var(--text);
    background: transparent;
    outline: none;
}

.nav-search input {
    border: 0;
    padding: 0 16px;
}

.nav-search button,
.home-search-panel button {
    border: 0;
    white-space: nowrap;
    border-radius: 999px;
    padding: 10px 20px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(90deg, var(--blue), #06b6d4);
}

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

.nav-links a {
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--soft);
    transition: 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #67e8f9;
    background: rgba(37, 99, 235, 0.18);
}

.menu-toggle {
    display: none;
    border: 0;
    color: white;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    padding: 10px 13px;
    cursor: pointer;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.06);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.08)), linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.78));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 84px 24px;
}

.hero-content > * {
    max-width: 680px;
}

.hero-label,
.movie-type,
.card-tags span,
.detail-tags span,
.hero-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #dffaff;
    background: rgba(37, 99, 235, 0.72);
    border: 1px solid rgba(103, 232, 249, 0.24);
}

.hero-label {
    width: fit-content;
    padding: 8px 16px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.04;
    font-weight: 900;
    text-shadow: 0 12px 44px rgba(2, 6, 23, 0.8);
}

.hero-content p {
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 20px;
    line-height: 1.8;
    text-shadow: 0 10px 30px rgba(2, 6, 23, 0.88);
}

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

.hero-tags span,
.detail-tags span,
.card-tags span {
    padding: 5px 10px;
    font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.category-card strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.25s ease;
}

.primary-btn {
    min-width: 130px;
    padding: 14px 28px;
    color: white;
    background: linear-gradient(90deg, var(--blue), #06b6d4);
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.34);
}

.ghost-btn,
.section-more {
    padding: 12px 22px;
    color: #bae6fd;
    border: 1px solid rgba(103, 232, 249, 0.32);
    background: rgba(15, 23, 42, 0.58);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.category-card a:hover strong {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(34, 211, 238, 0.26);
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: white;
}

.home-search-panel,
.content-section,
.detail-content,
.player-section,
.detail-hero,
.page-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px;
}

.home-search-panel {
    margin-top: -56px;
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: center;
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--line);
    box-shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(16px);
}

.home-search-panel h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-content h2 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.home-search-panel h2,
.section-head h2,
.page-hero h1,
.detail-info h1 {
    font-size: clamp(30px, 4vw, 48px);
}

.home-search-panel p,
.section-head p,
.page-hero p,
.detail-one-line,
.detail-content p {
    color: var(--soft);
    line-height: 1.82;
}

.home-search-panel form {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.48);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.home-search-panel input {
    border: 0;
    padding: 0 16px;
}

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

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

.category-tile,
.category-card a {
    display: flex;
    flex-direction: column;
    min-height: 134px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.68));
    border: 1px solid rgba(59, 130, 246, 0.22);
    transition: 0.25s ease;
    overflow: hidden;
}

.category-tile:hover,
.category-card a:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.35);
}

.category-tile strong,
.category-card h2 {
    font-size: 22px;
    color: white;
    margin: 0 0 10px;
}

.category-tile span,
.category-card p,
.category-samples span {
    color: var(--muted);
    line-height: 1.65;
}

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

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.category-samples span {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

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

.movie-card {
    min-width: 0;
}

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 16px 50px rgba(2, 6, 23, 0.28);
    transition: 0.25s ease;
}

.movie-card-link:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.48);
}

.movie-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.8);
}

.movie-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 26%, rgba(2, 6, 23, 0.62));
}

.movie-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 650ms ease;
}

.movie-card-link:hover .movie-thumb img,
.horizontal-card a:hover img {
    transform: scale(1.09);
}

.movie-year,
.rank-num,
.play-badge,
.list-rank {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.movie-year {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    background: rgba(2, 6, 23, 0.82);
}

.rank-num {
    left: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f97316, #facc15);
    color: #1f2937;
}

.play-badge {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    opacity: 0;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 46px rgba(34, 211, 238, 0.34);
    transition: 0.25s ease;
}

.movie-card-link:hover .play-badge {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
    padding: 18px;
}

.movie-card h3 {
    margin: 12px 0 10px;
    min-height: 3.1em;
    font-size: 18px;
    line-height: 1.45;
    color: white;
}

.movie-card p {
    margin: 0 0 14px;
    min-height: 3.4em;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    color: #93c5fd;
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.horizontal-card a {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    min-height: 118px;
    padding: 12px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: 0.25s ease;
}

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

.horizontal-cover {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.horizontal-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 550ms ease;
}

.list-rank {
    left: 9px;
    top: 9px;
    padding: 5px 9px;
    color: #111827;
    background: linear-gradient(135deg, #f97316, #facc15);
}

.horizontal-info h3 {
    margin: 4px 0 8px;
    font-size: 20px;
}

.horizontal-info p {
    color: var(--muted);
    line-height: 1.65;
    margin: 0 0 12px;
}

.horizontal-info div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #93c5fd;
    font-size: 13px;
}

.page-hero {
    padding-top: 72px;
    padding-bottom: 28px;
}

.page-hero > div,
.detail-hero,
.player-section,
.detail-content,
.content-section {
    position: relative;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #67e8f9;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 170px 170px;
    gap: 12px;
    margin-bottom: 26px;
}

.filter-bar input,
.filter-bar select {
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    padding: 0 16px;
    background: rgba(15, 23, 42, 0.72);
}

.empty-state {
    display: none;
    padding: 38px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 24px;
}

.empty-state.is-visible {
    display: block;
}

.is-hidden {
    display: none !important;
}

.detail-hero {
    padding-top: 58px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 42px;
    align-items: center;
    padding: 30px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.54));
    border: 1px solid var(--line);
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.42);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.detail-one-line {
    font-size: 19px;
    max-width: 800px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.detail-meta span {
    padding: 9px 13px;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(59, 130, 246, 0.18);
}

.detail-tags {
    margin-bottom: 28px;
}

.player-section {
    padding-top: 20px;
}

.player-section h2 {
    font-size: clamp(26px, 4vw, 38px);
    margin-bottom: 22px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    border: 1px solid rgba(34, 211, 238, 0.22);
    box-shadow: 0 28px 90px rgba(2, 6, 23, 0.5);
}

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

.play-mask {
    position: absolute;
    inset: 0;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

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

.play-mask strong {
    font-size: 22px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.detail-content article,
.next-prev {
    padding: 26px;
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-content h2 {
    font-size: 26px;
    margin-bottom: 12px;
}

.detail-content p {
    margin: 0;
    font-size: 16px;
}

.next-prev {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.next-prev a {
    color: #7dd3fc;
    line-height: 1.6;
}

.site-footer {
    margin-top: 56px;
    padding: 42px 24px 26px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.68), rgba(2, 6, 23, 0.98));
    border-top: 1px solid rgba(59, 130, 246, 0.18);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: start;
}

.footer-inner p {
    max-width: 680px;
    color: var(--muted);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    padding: 9px 13px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(37, 99, 235, 0.14);
}

.footer-bottom {
    max-width: 1280px;
    margin: 24px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--muted);
}

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

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

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

@media (max-width: 860px) {
    .nav-shell {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 18px;
    }

    .nav-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .nav-links {
        display: none;
        order: 4;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 8px;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        background: rgba(15, 23, 42, 0.72);
    }

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

    .hero-content {
        padding-top: 60px;
    }

    .hero-content p {
        font-size: 17px;
    }

    .home-search-panel {
        grid-template-columns: 1fr;
        margin-left: 16px;
        margin-right: 16px;
    }

    .movie-grid,
    .category-grid,
    .category-card-grid,
    .horizontal-list,
    .detail-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .detail-poster {
        max-width: 330px;
    }

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

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

@media (max-width: 560px) {
    .brand-text {
        font-size: 22px;
    }

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

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

    .home-search-panel,
    .content-section,
    .detail-content,
    .player-section,
    .detail-hero,
    .page-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .home-search-panel form {
        border-radius: 22px;
        flex-direction: column;
    }

    .movie-grid,
    .category-grid,
    .category-card-grid,
    .horizontal-list,
    .detail-content {
        grid-template-columns: 1fr;
    }

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

    .section-head,
    .next-prev {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-layout {
        padding: 18px;
    }

    .play-circle {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}
