:root {
    --cyan: #06b6d4;
    --blue: #2563eb;
    --blue-dark: #1e3a8a;
    --purple: #7c3aed;
    --text: #111827;
    --muted: #6b7280;
    --soft: #f4f8fb;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: #ffffff;
    line-height: 1.6;
}

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

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

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: #ffffff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 35px rgba(37, 99, 235, 0.25);
}

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

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

.brand-icon {
    font-size: 32px;
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.2));
    transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.12) rotate(-4deg);
}

.brand-text {
    font-size: 20px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-weight: 600;
}

.site-nav a,
.nav-dropdown button {
    color: #ffffff;
    border: 0;
    background: transparent;
    font: inherit;
    padding: 8px 0;
    cursor: pointer;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.site-nav a:hover,
.nav-dropdown button:hover {
    color: #cffafe;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 190px;
    padding: 10px;
    background: #ffffff;
    color: #1f2937;
    border-radius: 16px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    color: #1f2937;
    padding: 9px 12px;
    border-radius: 10px;
}

.nav-dropdown-menu a:hover {
    color: var(--blue);
    background: #ecfeff;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 10px;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 2px;
}

.hero-slider {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #22d3ee 0%, #2563eb 52%, #1d4ed8 100%);
}

.hero-background-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    right: 10%;
    top: 8%;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 68%);
    filter: blur(6px);
    pointer-events: none;
}

.hero-slides {
    position: relative;
    min-height: 600px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
    background-image: linear-gradient(90deg, rgba(8, 47, 73, 0.88), rgba(37, 99, 235, 0.7), rgba(37, 99, 235, 0.25)), var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-slide-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 680px;
    padding: 96px 0 110px;
    animation: riseIn 0.75s ease both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: #0891b2;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-slide .eyebrow,
.page-hero .eyebrow,
.detail-hero .eyebrow {
    color: #cffafe;
}

.hero-slide h1 {
    margin: 0 0 12px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-slide h2 {
    margin: 0 0 18px;
    font-size: clamp(26px, 4vw, 42px);
}

.hero-slide p {
    max-width: 680px;
    margin: 0 0 30px;
    color: #e0f2fe;
    font-size: clamp(17px, 2.2vw, 21px);
}

.hero-actions,
.detail-tags,
.card-tags,
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 26px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn-light {
    color: var(--blue);
    background: #ffffff;
    box-shadow: 0 18px 30px rgba(255, 255, 255, 0.22);
}

.btn-outline {
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.hero-orb {
    position: absolute;
    right: 7%;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.2);
    font-size: clamp(170px, 23vw, 320px);
    line-height: 1;
    pointer-events: none;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.16));
}

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

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

.hero-dot.is-active {
    width: 36px;
    background: #ffffff;
}

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

.feature-box {
    padding: 28px 24px;
    text-align: center;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ecfeff, #eff6ff);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-box:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.feature-box span {
    font-size: 42px;
}

.feature-box h3 {
    margin: 14px 0 8px;
    font-size: 19px;
}

.feature-box p {
    margin: 0;
    color: var(--muted);
}

.section-block {
    padding: 76px 0;
}

.bg-soft {
    background: var(--soft);
}

.section-title {
    max-width: 760px;
    margin: 0 auto 34px;
    text-align: center;
}

.section-title.align-left {
    margin-left: 0;
    text-align: left;
}

.section-title h2,
.filter-panel h2,
.prose-card h2 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.section-title p {
    margin: 0;
    color: var(--muted);
}

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

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

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

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

.card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.card-link:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.18);
}

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe 45%, #e0e7ff);
}

.poster-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.8), transparent 34%), linear-gradient(135deg, transparent, rgba(37, 99, 235, 0.14));
}

.poster-frame img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    z-index: 1;
}

.poster-frame img.is-hidden {
    display: none;
}

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

.play-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(37, 99, 235, 0.86);
    backdrop-filter: blur(8px);
}

.play-pill {
    right: 10px;
    bottom: 10px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 8px;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
}

.card-tags span,
.detail-tags a,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: #075985;
    font-size: 12px;
    font-weight: 700;
    background: #ecfeff;
}

.card-desc {
    display: -webkit-box;
    margin: 12px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 36px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 90px;
    padding: 24px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.rank-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px 14px;
    padding: 13px 0;
    border-bottom: 1px solid #e5e7eb;
}

.rank-item span {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 999px;
    background: var(--blue);
    font-weight: 800;
}

.rank-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.rank-more {
    display: block;
    margin-top: 18px;
    padding: 12px 16px;
    text-align: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    font-weight: 800;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 26px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.filter-controls {
    margin-top: 18px;
    align-items: flex-end;
}

.filter-controls label {
    flex: 1 1 180px;
    display: grid;
    gap: 8px;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fafc;
    color: #111827;
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-controls input:focus,
.filter-controls select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.filter-status {
    margin-top: 16px;
    color: var(--muted);
}

.no-results {
    margin-top: 30px;
    padding: 48px;
    text-align: center;
    color: var(--muted);
    border-radius: var(--radius);
    background: #ffffff;
}

.page-main {
    background: #ffffff;
}

.page-hero,
.detail-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb 60%, #1d4ed8);
}

.page-hero .container {
    padding: 70px 0;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #e0f2fe;
    font-size: 18px;
}

.category-overview {
    padding: 58px 0 80px;
}

.category-section + .category-section {
    margin-top: 48px;
}

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

.category-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-chip:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.16);
}

.category-chip strong {
    min-width: 34px;
    padding: 2px 8px;
    color: #ffffff;
    text-align: center;
    border-radius: 999px;
    background: var(--blue);
}

.back-link {
    display: inline-flex;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(90deg, rgba(8, 47, 73, 0.94), rgba(37, 99, 235, 0.84), rgba(37, 99, 235, 0.42)), var(--detail-image);
    background-size: cover;
    background-position: center;
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 34px;
    align-items: center;
    padding: 58px 0;
}

.detail-poster {
    border-radius: 20px;
    box-shadow: 0 28px 55px rgba(0, 0, 0, 0.28);
}

.detail-info h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.05;
}

.detail-one-line {
    max-width: 850px;
    margin: 0 0 22px;
    color: #e0f2fe;
    font-size: 19px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    font-weight: 700;
}

.detail-tags a,
.detail-tags span {
    min-height: 32px;
    background: rgba(255, 255, 255, 0.92);
}

.player-card {
    overflow: hidden;
    border-radius: 24px;
    background: #050505;
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    min-height: 260px;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.28), transparent 48%), #050505;
}

.video-element {
    width: 100%;
    height: 100%;
    background: #050505;
}

.player-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: background 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.player-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%) scale(1.06);
}

.player-shell.is-playing .player-button {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    display: block;
    width: 0;
    height: 0;
    margin-left: 32px;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 28px solid #ffffff;
}

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

.prose-card {
    padding: 30px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.prose-card p {
    margin: 0 0 16px;
    color: #374151;
    font-size: 17px;
}

.prose-card p:last-child {
    margin-bottom: 0;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 36px;
    padding: 54px 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 22px;
}

.footer-brand span {
    font-size: 32px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer p,
.site-footer ul {
    margin: 0;
}

.site-footer ul {
    list-style: none;
    padding: 0;
}

.site-footer li {
    margin: 8px 0;
}

.site-footer a {
    color: #d1d5db;
}

.site-footer a:hover {
    color: #22d3ee;
}

.site-footer li span {
    color: #67e8f9;
    font-size: 12px;
}

.footer-small {
    margin-top: 14px !important;
    color: #9ca3af;
    font-size: 14px;
}

.footer-bottom {
    padding: 18px 0;
    color: #9ca3af;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

    .rank-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .mobile-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 24px 20px;
        background: #2563eb;
    }

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

    .site-nav a,
    .nav-dropdown button {
        padding: 12px 0;
    }

    .nav-dropdown-menu {
        position: static;
        width: 100%;
        margin: 4px 0 12px;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

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

    .hero-slide-content {
        padding: 78px 0 110px;
    }

    .hero-orb {
        right: -16%;
        top: 65%;
        font-size: 190px;
    }

    .movie-grid,
    .library-grid,
    .mini-grid,
    .ranking-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .feature-grid,
    .category-chip-grid,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

    .section-block {
        padding: 48px 0;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
        gap: 22px;
    }

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

    .detail-meta span {
        font-size: 13px;
    }

    .filter-panel,
    .prose-card {
        padding: 20px;
    }

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

    .play-icon {
        margin-left: 25px;
        border-top-width: 14px;
        border-bottom-width: 14px;
        border-left-width: 22px;
    }
}

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

    .movie-grid,
    .library-grid,
    .mini-grid,
    .ranking-grid {
        grid-template-columns: 1fr 1fr;
    }

    .card-body {
        padding: 11px;
    }

    .card-body h3 {
        font-size: 14px;
    }
}
