:root {
    color-scheme: dark;
    --bg: #0b1020;
    --bg-2: #111827;
    --panel: rgba(31, 41, 55, 0.72);
    --panel-strong: rgba(17, 24, 39, 0.92);
    --border: rgba(148, 163, 184, 0.18);
    --border-hot: rgba(249, 115, 22, 0.45);
    --orange: #fb923c;
    --orange-2: #f97316;
    --cyan: #22d3ee;
    --cyan-2: #06b6d4;
    --text: #f8fafc;
    --muted: #9ca3af;
    --soft: #d1d5db;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 18px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    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(249, 115, 22, 0.18), transparent 30rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 28rem),
        linear-gradient(135deg, #0b1020 0%, #111827 48%, #0b1020 100%);
}

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

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

main {
    min-height: 60vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background: rgba(9, 13, 25, 0.9);
    backdrop-filter: blur(18px);
}

.nav-wrap,
.mobile-panel,
.hero-inner,
.section-inner,
.footer-grid,
.footer-bottom,
.detail-shell,
.breadcrumb,
.page-hero,
.search-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

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

.brand span:last-child,
.footer-brand span:last-child {
    font-size: 21px;
    background: linear-gradient(90deg, var(--orange), #ffffff, var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--orange-2), var(--cyan-2));
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.16);
}

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

.nav-links a,
.mobile-panel a {
    color: var(--soft);
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.mobile-panel a:hover,
.mobile-panel a.is-active {
    color: var(--orange);
}

.menu-toggle {
    display: none;
    border: 0;
    color: var(--text);
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 0 0 18px;
    border-top: 1px solid var(--border);
}

.mobile-panel.is-open {
    display: grid;
    gap: 14px;
}

.hero {
    position: relative;
    min-height: 660px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.18), transparent 44%, rgba(34, 211, 238, 0.18)),
        radial-gradient(circle at 18% 20%, rgba(249, 115, 22, 0.24), transparent 22rem),
        radial-gradient(circle at 80% 42%, rgba(34, 211, 238, 0.20), transparent 24rem);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.28;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 44px;
    align-items: center;
    padding: 72px 0;
}

.hero-copy h1 {
    margin: 0 0 22px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.05;
    font-weight: 900;
    background: linear-gradient(90deg, var(--orange), #ffffff 48%, var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy p {
    max-width: 700px;
    color: var(--soft);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
    margin: 0 0 24px;
}

.hero-actions,
.card-actions,
.player-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn,
.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 13px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn {
    color: white;
    background: linear-gradient(90deg, var(--orange-2), var(--cyan-2));
    box-shadow: 0 16px 36px rgba(249, 115, 22, 0.22);
}

.btn-soft {
    color: var(--text);
    border: 1px solid var(--border);
    background: rgba(31, 41, 55, 0.62);
}

.btn:hover,
.btn-soft:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 45px rgba(34, 211, 238, 0.16);
    border-color: rgba(34, 211, 238, 0.48);
}

.hero-search {
    margin-top: 28px;
    padding: 10px;
    display: flex;
    gap: 10px;
    max-width: 660px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.66);
    backdrop-filter: blur(16px);
}

.hero-search input,
.toolbar input,
.toolbar select {
    width: 100%;
    min-height: 46px;
    color: var(--text);
    border: 1px solid transparent;
    border-radius: 12px;
    background: rgba(9, 13, 25, 0.65);
    padding: 0 14px;
    outline: none;
}

.hero-search input:focus,
.toolbar input:focus,
.toolbar select:focus {
    border-color: rgba(34, 211, 238, 0.55);
}

.hero-stage {
    position: relative;
    min-height: 510px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.focus-card {
    height: 100%;
    min-height: 510px;
    display: grid;
    grid-template-rows: 1fr auto;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(17, 24, 39, 0.72);
    box-shadow: var(--shadow);
}

.focus-card .focus-img {
    position: relative;
    min-height: 350px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(34, 211, 238, 0.16));
}

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

.focus-card:hover img,
.movie-card:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.focus-img::after,
.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 32%, rgba(0, 0, 0, 0.78));
}

.focus-body {
    padding: 24px;
}

.focus-body h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.focus-body p {
    margin: 0 0 18px;
    color: var(--soft);
    line-height: 1.7;
}

.meta-line,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.meta-line span,
.tag-list span,
.info-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border: 1px solid rgba(249, 115, 22, 0.28);
    border-radius: 999px;
    color: var(--orange);
    background: rgba(249, 115, 22, 0.1);
    font-size: 13px;
}

.hero-dots {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    justify-content: center;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.34);
}

.hero-dots button.is-active {
    width: 28px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--orange), var(--cyan));
}

.section {
    padding: 72px 0;
}

.section.alt {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(31, 41, 55, 0.38));
}

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

.section-title h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.15;
    background: linear-gradient(90deg, var(--orange), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

.category-card {
    position: relative;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 10px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(31, 41, 55, 0.46);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px) scale(1.015);
    border-color: var(--border-hot);
    background: rgba(31, 41, 55, 0.72);
}

.category-icon {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--orange-2), var(--cyan-2));
}

.category-covers {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    opacity: 0.18;
}

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

.category-card strong,
.category-card em {
    position: relative;
    z-index: 2;
}

.category-card strong {
    font-size: 21px;
}

.category-card em {
    color: var(--muted);
    font-style: normal;
    font-size: 14px;
    line-height: 1.55;
}

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

.movie-card,
.related-card {
    display: block;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(31, 41, 55, 0.78), rgba(17, 24, 39, 0.88));
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover,
.related-card:hover {
    transform: translateY(-4px) scale(1.025);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(34, 211, 238, 0.14));
}

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

.type-badge,
.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    backdrop-filter: blur(12px);
}

.type-badge {
    top: 9px;
    right: 9px;
    background: rgba(249, 115, 22, 0.9);
}

.year-badge {
    left: 9px;
    bottom: 9px;
    background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
    top: 9px;
    left: 9px;
    background: rgba(6, 182, 212, 0.9);
}

.movie-info {
    display: block;
    padding: 13px;
}

.movie-info strong,
.related-card strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
    font-size: 15px;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.movie-card:hover strong,
.related-card:hover strong {
    color: var(--orange);
}

.movie-info em,
.related-card em {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
    line-height: 1.55;
    margin-top: 7px;
}

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

.toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 150px 150px;
    gap: 12px;
    padding: 14px;
    margin: 0 0 28px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(31, 41, 55, 0.46);
    backdrop-filter: blur(16px);
}

.empty-message {
    display: none;
    padding: 48px 20px;
    text-align: center;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(31, 41, 55, 0.36);
}

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

.breadcrumb {
    padding: 22px 0 0;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-shell {
    padding: 28px 0 72px;
}

.detail-top {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.58fr);
    gap: 32px;
    align-items: start;
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 24px;
    overflow: hidden;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72)),
        radial-gradient(circle at center, rgba(249, 115, 22, 0.16), transparent 18rem);
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.player-button {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    color: white;
    background: transparent;
}

.player-button span {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--orange-2), var(--cyan-2));
    box-shadow: 0 16px 45px rgba(6, 182, 212, 0.28);
    transition: transform 0.2s ease;
}

.player-button:hover span {
    transform: scale(1.08);
}

.player-box.is-playing .player-cover,
.player-box.is-playing .player-button {
    opacity: 0;
    pointer-events: none;
}

.detail-title {
    padding: 4px 0 18px;
}

.info-panel,
.text-panel {
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(31, 41, 55, 0.52);
    backdrop-filter: blur(16px);
    padding: 22px;
}

.info-panel dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.info-panel dt {
    color: var(--muted);
}

.info-panel dd {
    margin: 0;
    color: var(--text);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    margin-top: 28px;
}

.text-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.text-panel p {
    color: var(--soft);
    line-height: 1.9;
    font-size: 16px;
    margin: 0;
}

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

.related-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(34, 211, 238, 0.14));
}

.related-card span {
    display: block;
    padding: 12px;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.88);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.9fr 1fr;
    gap: 28px;
    padding: 44px 0 28px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: var(--muted);
    line-height: 1.75;
    font-size: 14px;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.footer-grid a:hover {
    color: var(--orange);
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 18px 0 28px;
    text-align: center;
}

[data-card].is-hidden {
    display: none;
}

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

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

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

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

    .hero-inner,
    .detail-top,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .hero-stage {
        min-height: 520px;
    }

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

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

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

@media (max-width: 560px) {
    .hero-inner,
    .section-inner,
    .detail-shell,
    .breadcrumb,
    .page-hero,
    .search-shell,
    .footer-grid,
    .footer-bottom,
    .nav-wrap,
    .mobile-panel {
        width: min(100% - 22px, 1180px);
    }

    .hero-copy h1 {
        font-size: 40px;
    }

    .hero-search,
    .section-title,
    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-search {
        display: grid;
    }

    .focus-card {
        min-height: 470px;
        border-radius: 22px;
    }

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

    .toolbar input {
        grid-column: 1 / -1;
    }

    .movie-info {
        padding: 10px;
    }

    .movie-info strong,
    .related-card strong {
        min-height: 38px;
        font-size: 13px;
    }

    .detail-shell {
        padding-top: 18px;
    }

    .player-button span {
        width: 68px;
        height: 68px;
    }
}
