:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --shadow: rgba(34, 211, 238, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 34rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.section-inner,
.page-hero,
.content-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-icon {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
    transition: transform 0.28s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.05);
}

.brand-text,
.footer-brand {
    background: linear-gradient(90deg, #22d3ee, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 21px;
    letter-spacing: 0.02em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.desktop-nav a,
.mobile-nav a {
    color: #cbd5e1;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.mobile-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: #e2e8f0;
    font-size: 26px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 8px 0 18px;
    border-top: 1px solid var(--line);
}

.mobile-nav.open {
    display: grid;
    gap: 12px;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #0f172a;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617 2%, rgba(2, 6, 23, 0.76) 38%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    right: 24px;
    bottom: 76px;
    max-width: 740px;
}

.hero-eyebrow,
.section-eyebrow,
.detail-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--cyan);
    font-weight: 750;
}

.hero-title {
    margin: 0 0 14px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.hero-title.small {
    font-size: clamp(34px, 6vw, 62px);
}

.hero-subtitle {
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    padding: 13px 28px;
    color: #ffffff;
    background: linear-gradient(90deg, #06b6d4, #2563eb);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
}

.btn-secondary,
.btn-ghost {
    padding: 12px 24px;
    color: #e2e8f0;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 22px 44px var(--shadow);
    border-color: rgba(34, 211, 238, 0.42);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: white;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(30, 41, 59, 0.94);
    transform: translateY(-50%) scale(1.06);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 99px;
    background: #64748b;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
    padding: 58px 0;
}

.section.tight {
    padding-top: 34px;
}

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

.section-head h2,
.page-hero h1,
.detail-title {
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.03em;
}

.section-head h2,
.page-hero h1 {
    font-size: clamp(30px, 4vw, 44px);
}

.section-head p,
.page-hero p,
.detail-lead,
.detail-text p {
    color: #cbd5e1;
    line-height: 1.8;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.76);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
    transform: scale(1.018) translateY(-3px);
    border-color: rgba(34, 211, 238, 0.34);
    box-shadow: 0 28px 58px rgba(34, 211, 238, 0.14);
}

.movie-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

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

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

.movie-poster::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.06));
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.88);
    color: white;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
    backdrop-filter: blur(10px);
}

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

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

.movie-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 750;
}

.movie-card h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.4;
    transition: color 0.2s ease;
}

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

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

.movie-card-desc.compact {
    min-height: auto;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-tags span,
.meta-pill,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 10px;
    background: rgba(34, 211, 238, 0.08);
    color: #67e8f9;
    font-size: 12px;
    font-weight: 750;
}

.movie-tags span {
    padding: 5px 8px;
}

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

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
}

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

.category-card {
    min-height: 180px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 9rem),
        rgba(15, 23, 42, 0.78);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 24px 48px rgba(34, 211, 238, 0.12);
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    color: white;
    font-size: 21px;
}

.category-card span {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.75;
}

.ranking-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.ranking-item a {
    display: grid;
    grid-template-columns: 44px 92px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item a:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.4);
}

.ranking-number {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    color: white;
    font-weight: 900;
}

.ranking-item img {
    width: 92px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
}

.ranking-info strong,
.ranking-info em {
    display: block;
}

.ranking-info strong {
    margin-bottom: 8px;
    color: white;
}

.ranking-info em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.search-panel {
    display: grid;
    grid-template-columns: 1.8fr repeat(3, 1fr);
    gap: 14px;
    padding: 18px;
    margin-bottom: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.72);
    color: white;
    outline: none;
    padding: 0 14px;
    font: inherit;
}

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

.no-results {
    display: none;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: #cbd5e1;
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 42px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    filter: blur(18px);
    transform: scale(1.08);
}

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

.detail-hero::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0.64));
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 36px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a {
    color: #67e8f9;
}

.detail-title {
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.04;
}

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

.meta-pill {
    padding: 7px 10px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.detail-tags span {
    padding: 7px 10px;
}

.player-section {
    padding: 40px 0 54px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 28px;
    background: black;
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.34), 0 0 42px rgba(34, 211, 238, 0.12);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    color: white;
    text-align: center;
}

.player-cover::before {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.36));
}

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

.player-cover-content {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 14px;
    justify-items: center;
    padding: 22px;
}

.player-play-icon {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 24px 48px rgba(37, 99, 235, 0.34);
    font-size: 28px;
}

.player-cover strong {
    font-size: clamp(24px, 4vw, 44px);
}

.detail-text {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 24px;
}

.detail-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-panel h2 {
    margin: 0 0 12px;
    color: white;
}

.detail-panel p {
    margin: 0;
}

.site-footer {
    margin-top: 36px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.86);
}

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

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    align-content: center;
}

.footer-links a {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #cbd5e1;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-links a:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.4);
}

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

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

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

    .mobile-toggle {
        display: block;
    }

    .hero-carousel {
        height: 76vh;
        min-height: 560px;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        bottom: 78px;
    }

    .hero-control {
        top: auto;
        bottom: 22px;
        transform: none;
    }

    .hero-control:hover {
        transform: scale(1.06);
    }

    .hero-prev {
        left: 20px;
    }

    .hero-next {
        right: 20px;
    }

    .hero-dots {
        bottom: 38px;
    }

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

    .movie-grid,
    .movie-grid.wide,
    .category-cards,
    .ranking-list,
    .footer-inner,
    .detail-text,
    .detail-layout,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 460px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

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

    .hero-title,
    .hero-title.small,
    .detail-title {
        letter-spacing: -0.035em;
    }

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

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

    .ranking-item a {
        grid-template-columns: 36px 78px 1fr;
    }

    .ranking-item img {
        width: 78px;
        height: 50px;
    }

    .section {
        padding: 42px 0;
    }
}
