:root {
    --site-blue: #2563eb;
    --site-cyan: #06b6d4;
    --site-dark: #0f172a;
    --site-soft: #f8fafc;
    --site-muted: #64748b;
    --site-border: #e2e8f0;
    --site-card: #ffffff;
    --site-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1f2937;
    background: #f8fafc;
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--site-blue), var(--site-cyan));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
    transform: translateZ(0);
    transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.08) rotate(-3deg);
}

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

.desktop-nav a,
.mobile-nav a {
    color: #475569;
    font-weight: 700;
    border-radius: 12px;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a {
    padding: 10px 14px;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a.is-active {
    color: var(--site-blue);
    background: #eff6ff;
}

.menu-toggle {
    display: none;
    border: 0;
    color: #334155;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 9px 12px;
    font-size: 20px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
    grid-template-columns: 1fr;
    gap: 8px;
}

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

.mobile-nav a {
    padding: 10px 12px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
    pointer-events: none;
}

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

.hero-bg,
.hero-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-bg img {
    object-fit: cover;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(30, 64, 175, 0.66), rgba(15, 23, 42, 0.18));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    padding: 96px 24px 120px;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 22px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid rgba(125, 211, 252, 0.38);
    color: #bae6fd;
    font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.hero-copy p {
    margin: 0;
    max-width: 650px;
    color: rgba(241, 245, 249, 0.94);
    font-size: 19px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 0;
}

.hero-meta span,
.tag-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

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

.button-primary,
.button-secondary,
.button-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.button-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--site-blue), var(--site-cyan));
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.35);
}

.button-primary:hover,
.button-secondary:hover,
.button-soft:hover {
    transform: translateY(-2px);
}

.button-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(12px);
}

.button-soft {
    color: var(--site-blue);
    background: #eff6ff;
}

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

.hero-dot {
    width: 13px;
    height: 13px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.22s ease, background-color 0.22s ease;
}

.hero-dot.is-active {
    width: 34px;
    border-radius: 999px;
    background: #ffffff;
}

.main-content {
    overflow: hidden;
}

.section {
    padding: 74px 24px;
}

.section.is-white {
    background: #ffffff;
}

.section.is-soft {
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.section-shell {
    max-width: 1280px;
    margin: 0 auto;
}

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

.section-title {
    margin: 0 0 8px;
    color: #111827;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-subtitle,
.page-lead {
    margin: 0;
    color: var(--site-muted);
    font-size: 16px;
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card,
.category-card,
.rank-card,
.info-panel {
    background: var(--site-card);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--site-shadow);
    border-color: rgba(37, 99, 235, 0.32);
}

.card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

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

.card-media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 52%;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
}

.card-badges {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.card-badges span,
.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 800;
}

.card-badges span:last-child {
    background: rgba(15, 23, 42, 0.78);
}

.card-body {
    padding: 18px;
}

.card-body h3,
.rank-card h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
}

.card-body p,
.rank-card p {
    margin: 0;
    color: var(--site-muted);
    font-size: 14px;
}

.card-line {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    color: #64748b;
    font-size: 13px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.card-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    color: #2563eb;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 800;
}

.category-card {
    padding: 24px;
    min-height: 180px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
}

.category-card h3 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 20px;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--site-muted);
    font-size: 14px;
}

.category-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 18px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--site-blue), var(--site-cyan));
    font-weight: 900;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    padding: 18px;
    margin-bottom: 28px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--site-border);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    color: #1f2937;
    padding: 0 14px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--site-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.page-hero {
    padding: 88px 24px;
    color: #ffffff;
    background: radial-gradient(circle at 10% 20%, rgba(6, 182, 212, 0.3), transparent 32%), linear-gradient(135deg, #0f172a, #1d4ed8 52%, #0891b2);
}

.page-hero-shell {
    max-width: 1280px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.breadcrumb a {
    color: #dbeafe;
    font-weight: 800;
}

.page-hero h1 {
    margin: 0 0 16px;
    max-width: 900px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.page-hero p {
    margin: 0;
    max-width: 760px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.rank-list {
    display: grid;
    gap: 16px;
}

.rank-card {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 12px;
}

.rank-card .card-media {
    border-radius: 18px;
}

.rank-number {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    width: 42px;
    height: 42px;
    padding: 0;
    font-size: 16px;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.detail-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px 82px;
}

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

.player-box {
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    background: #020617;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.28);
}

.player-box video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
    outline: none;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.62));
    cursor: pointer;
}

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

.play-button-core {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    background: linear-gradient(135deg, var(--site-blue), var(--site-cyan));
    box-shadow: 0 22px 45px rgba(37, 99, 235, 0.45);
    font-size: 34px;
    transition: transform 0.25s ease;
}

.play-overlay:hover .play-button-core {
    transform: scale(1.08);
}

.detail-card {
    padding: 24px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 4 / 5;
    margin-bottom: 22px;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

.detail-meta {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
    color: #475569;
    font-size: 14px;
}

.detail-meta strong {
    color: #111827;
}

.detail-text {
    margin-top: 28px;
    padding: 28px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--site-border);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.detail-text h2 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 26px;
}

.detail-text p {
    margin: 0 0 18px;
    color: #475569;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.no-results {
    display: none;
    padding: 28px;
    text-align: center;
    color: #64748b;
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid var(--site-border);
}

.no-results.is-visible {
    display: block;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px 36px;
    display: grid;
    gap: 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 32px;
}

.footer-grid h2,
.footer-grid h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-grid p,
.footer-grid a {
    color: #94a3b8;
    font-size: 14px;
}

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

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    color: #94a3b8;
    font-size: 14px;
}

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

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

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

    .detail-card {
        display: grid;
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 24px;
    }

    .detail-poster {
        margin-bottom: 0;
    }
}

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

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

    .hero-carousel,
    .hero-content {
        min-height: 560px;
    }

    .hero-content {
        padding-top: 72px;
        padding-bottom: 104px;
    }

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

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

    .search-panel {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 118px minmax(0, 1fr);
    }

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

@media (max-width: 560px) {
    .nav-shell {
        padding: 0 16px;
    }

    .brand {
        font-size: 19px;
    }

    .brand-icon {
        width: 36px;
        height: 36px;
    }

    .section,
    .detail-shell,
    .page-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .grid.movies,
    .grid.categories,
    .grid.related {
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 38px;
    }

    .hero-copy p,
    .page-hero p {
        font-size: 16px;
    }

    .detail-card {
        display: block;
    }

    .detail-poster {
        margin-bottom: 20px;
    }

    .rank-card {
        grid-template-columns: 1fr;
    }

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