:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.95);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --amber: #fbbf24;
    --shadow: 0 28px 80px rgba(2, 8, 23, 0.48);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.16), transparent 32rem),
        radial-gradient(circle at 85% 10%, rgba(37, 99, 235, 0.17), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.8rem;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.2);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

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

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

.top-search {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: min(24vw, 280px);
}

.top-search input,
.hero-search input,
.inline-search input,
.filter-row input,
.filter-row select {
    width: 100%;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
    padding: 0.72rem 1rem;
    outline: none;
}

.top-search input:focus,
.hero-search input:focus,
.inline-search input:focus,
.filter-row input:focus,
.filter-row select:focus {
    border-color: rgba(34, 211, 238, 0.66);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.top-search button,
.hero-search button,
.inline-search button,
.filter-row button {
    border: 0;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    border-radius: 999px;
    padding: 0.72rem 1.05rem;
    font-weight: 800;
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: rgba(15, 23, 42, 0.76);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 1.2rem;
    height: 2px;
    background: #e2e8f0;
    margin: 0.23rem auto;
}

.mobile-nav {
    display: none;
    padding: 0 1.25rem 1rem;
    border-top: 1px solid var(--line);
}

.mobile-nav.is-open {
    display: grid;
    gap: 0.8rem;
}

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #020617;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.62) 42%, rgba(2, 6, 23, 0.24) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.36) 38%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
    position: absolute;
    left: max(1.25rem, calc((100vw - 1280px) / 2 + 1.25rem));
    bottom: 7rem;
    width: min(720px, calc(100% - 2.5rem));
}

.hero-label,
.eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--cyan);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.hero-content h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.7rem, 7vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 1.4rem;
    color: #dbeafe;
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-tags,
.detail-meta,
.tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.68);
    border-radius: 999px;
    padding: 0.35rem 0.72rem;
    font-size: 0.82rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.6rem;
}

.primary-button,
.ghost-button,
.card-action,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    padding: 0.75rem 1.45rem;
    color: #fff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.22);
}

.ghost-button,
.card-action,
.section-link {
    padding: 0.72rem 1.2rem;
    color: #dbeafe;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.56);
}

.primary-button:hover,
.ghost-button:hover,
.card-action:hover,
.section-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(34, 211, 238, 0.18);
    border-color: rgba(34, 211, 238, 0.48);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 3rem;
    height: 3rem;
    transform: translateY(-50%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.74);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: 1.25rem;
}

.hero-next {
    right: 1.25rem;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transform: translateX(-50%);
}

.hero-dot {
    width: 0.55rem;
    height: 0.55rem;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.55);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 2.4rem;
    background: var(--cyan);
}

.hero-search {
    position: absolute;
    right: max(1.25rem, calc((100vw - 1280px) / 2 + 1.25rem));
    bottom: 6.6rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: min(470px, calc(100% - 2.5rem));
    padding: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(16px);
}

.quick-categories,
.content-section,
.page-main,
.site-footer {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.quick-categories {
    padding-top: 2rem;
    padding-bottom: 1rem;
}

.quick-inner,
.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.category-tile,
.category-overview-card,
.text-panel,
.search-panel,
.rank-panel,
.ranking-card {
    border: 1px solid var(--line);
    border-radius: 1.35rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.56));
    box-shadow: var(--shadow);
}

.category-tile {
    display: grid;
    gap: 0.55rem;
    padding: 1.1rem;
    min-height: 11rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover,
.ranking-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.38);
}

.category-tile span,
.category-overview-card h2,
.text-panel h2 {
    color: #fff;
    font-weight: 800;
}

.category-tile strong,
.category-overview-card p,
.text-panel p {
    color: var(--soft);
    font-weight: 500;
}

.category-tile em,
.overview-links a,
.card-meta-line {
    color: var(--muted);
    font-size: 0.88rem;
    font-style: normal;
}

.content-section {
    padding-top: 3.2rem;
    padding-bottom: 1rem;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 3.1rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: 0 22px 55px rgba(34, 211, 238, 0.12);
}

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

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

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

.card-badge {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    color: #0f172a;
    background: var(--amber);
    font-size: 0.78rem;
    font-weight: 900;
}

.movie-card-body {
    display: grid;
    gap: 0.55rem;
    padding: 0.95rem;
}

.movie-card h3 {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.25;
}

.movie-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.rank-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    padding: 1rem;
}

.rank-row {
    display: grid;
    grid-template-columns: auto 4.2rem 1fr;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 1rem;
    background: rgba(2, 6, 23, 0.32);
}

.rank-num {
    color: var(--cyan);
    font-weight: 900;
}

.rank-row img {
    width: 4.2rem;
    height: 5.6rem;
    object-fit: cover;
    border-radius: 0.8rem;
}

.rank-copy {
    display: grid;
    gap: 0.25rem;
}

.rank-copy strong {
    color: #fff;
}

.rank-copy em {
    color: var(--muted);
    font-size: 0.88rem;
    font-style: normal;
}

.page-main {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
}

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

.compact-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1.6rem;
    margin-bottom: 2rem;
    padding: clamp(2rem, 5vw, 4rem);
    background:
        radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.18), transparent 22rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.72));
    box-shadow: var(--shadow);
}

.compact-hero p {
    max-width: 780px;
    color: var(--soft);
    font-size: 1.08rem;
}

.inline-search {
    display: flex;
    gap: 0.65rem;
    max-width: 540px;
    margin-top: 1.2rem;
}

.category-overview-card {
    padding: 1.25rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-overview-card h2 {
    margin: 0 0 0.65rem;
    font-size: 1.3rem;
}

.overview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 1rem 0;
}

.overview-links a {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    background: rgba(2, 6, 23, 0.3);
}

.search-panel {
    padding: 1rem;
}

.filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 0.75rem;
    margin-bottom: 1.2rem;
}

.filter-row select {
    appearance: none;
}

.search-empty {
    padding: 1rem;
    color: var(--soft);
    text-align: center;
}

.ranking-list-page {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.ranking-card {
    display: grid;
    grid-template-columns: 7.2rem 1fr;
    gap: 1rem;
    padding: 1rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    aspect-ratio: 2 / 3;
}

.ranking-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-poster span {
    position: absolute;
    left: 0.6rem;
    top: 0.6rem;
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
}

.ranking-card h2 {
    margin: 0 0 0.45rem;
    color: #fff;
    font-size: 1.2rem;
}

.ranking-card p {
    color: var(--muted);
    margin: 0 0 0.65rem;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 360px) 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 1.6rem;
    padding: clamp(1rem, 3vw, 2rem);
    background:
        radial-gradient(circle at 85% 10%, rgba(34, 211, 238, 0.16), transparent 22rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.7));
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 1.4rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 25px 60px rgba(2, 6, 23, 0.45);
}

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

.detail-copy {
    display: grid;
    gap: 1rem;
}

.detail-one-line {
    max-width: 840px;
    margin: 0;
    color: #dbeafe;
    font-size: 1.18rem;
}

.detail-tags {
    margin-bottom: 0.4rem;
}

.player-section {
    margin-top: 2rem;
}

.simple-heading {
    align-items: flex-start;
}

.movie-player-wrap {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 1.35rem;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.7rem;
    border: 0;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.78)),
        rgba(2, 6, 23, 0.28);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 5rem;
    height: 5rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 50px rgba(34, 211, 238, 0.28);
    font-size: 2rem;
    padding-left: 0.2rem;
}

.player-cover strong {
    font-size: clamp(1.2rem, 3vw, 2.2rem);
}

.player-cover em {
    font-style: normal;
    color: #dbeafe;
    font-weight: 800;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.text-panel {
    padding: 1.4rem;
}

.text-panel h2 {
    margin: 0 0 0.7rem;
    font-size: 1.35rem;
}

.text-panel p {
    margin: 0;
    white-space: pre-line;
}

.related-section {
    padding-left: 0;
    padding-right: 0;
}

.site-footer {
    margin-top: 3rem;
    padding-top: 3rem;
    padding-bottom: 2rem;
    border-top: 1px solid var(--line);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
}

.footer-inner p,
.footer-inner a,
.footer-bottom {
    color: var(--muted);
}

.footer-inner h2 {
    margin: 0 0 0.9rem;
    color: #fff;
    font-size: 1rem;
}

.footer-inner ul {
    display: grid;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

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

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}

@media (max-width: 1100px) {
    .desktop-nav,
    .top-search {
        display: none;
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-search {
        left: 1.25rem;
        right: 1.25rem;
        bottom: 2.2rem;
        width: auto;
    }

    .hero-content {
        bottom: 8.2rem;
    }

    .quick-inner,
    .category-overview-grid,
    .movie-grid,
    .feature-grid,
    .home-grid,
    .category-grid,
    .search-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 780px) {
    .site-header-inner {
        padding: 0.8rem 1rem;
    }

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

    .hero-content {
        left: 1rem;
        bottom: 9rem;
        width: calc(100% - 2rem);
    }

    .hero-arrow {
        display: none;
    }

    .hero-search,
    .inline-search {
        flex-direction: column;
        align-items: stretch;
        border-radius: 1.2rem;
    }

    .quick-inner,
    .category-overview-grid,
    .movie-grid,
    .feature-grid,
    .home-grid,
    .category-grid,
    .search-grid,
    .rank-panel,
    .ranking-list-page,
    .detail-content-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .ranking-card {
        grid-template-columns: 5.6rem 1fr;
    }
}

@media (max-width: 520px) {
    .hero-content h1 {
        font-size: 2.35rem;
    }

    .hero-tags span,
    .detail-meta span,
    .tag-row span {
        font-size: 0.76rem;
    }

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

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

    .rank-row {
        grid-template-columns: auto 3.2rem 1fr;
    }

    .rank-row img {
        width: 3.2rem;
        height: 4.4rem;
    }
}
