:root {
    color-scheme: light;
    --ocean-50: #f0f9ff;
    --ocean-100: #e0f2fe;
    --ocean-400: #38bdf8;
    --ocean-600: #0284c7;
    --ocean-700: #0369a1;
    --island-600: #16a34a;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: 0 2px 15px rgba(0, 0, 0, 0.08);
    --hover: 0 8px 30px rgba(0, 0, 0, 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: var(--ink);
    background: #f9fafb;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: var(--soft);
}

.nav-shell {
    max-width: 80rem;
    height: 4rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--ocean-600), var(--island-600));
    box-shadow: var(--soft);
    font-size: 0.85rem;
}

.brand-text {
    font-size: 1.5rem;
    background: linear-gradient(90deg, var(--ocean-600), var(--island-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link,
.mobile-link {
    font-size: 0.95rem;
    font-weight: 700;
    color: #4b5563;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--ocean-600);
}

.menu-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 0.75rem;
    background: #f3f4f6;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 1.25rem;
    height: 2px;
    margin: 4px auto;
    background: #4b5563;
}

.mobile-panel {
    display: none;
    border-top: 1px solid #f3f4f6;
    padding: 0.75rem 1rem 1rem;
}

.mobile-panel.is-open {
    display: grid;
    gap: 0.5rem;
}

.mobile-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
}

.mobile-link:hover,
.mobile-link.is-active {
    background: var(--ocean-50);
}

.hero-section {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 0;
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    border-radius: 1.25rem;
    box-shadow: var(--soft);
    background: #000000;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    left: clamp(1.5rem, 5vw, 4rem);
    right: clamp(1.5rem, 5vw, 4rem);
    bottom: clamp(2rem, 6vw, 5rem);
    max-width: 48rem;
    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ocean-400);
}

.hero-content h2,
.page-hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.25rem, 5vw, 4.75rem);
    line-height: 1.05;
    font-weight: 900;
}

.hero-content p,
.page-hero p {
    max-width: 44rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.75rem 1.15rem;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--ocean-600), var(--island-600));
    box-shadow: var(--soft);
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.btn-primary:hover,
.btn-ghost:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover);
}

.hero-dots {
    position: absolute;
    left: clamp(1.5rem, 5vw, 4rem);
    bottom: 1.4rem;
    display: flex;
    gap: 0.5rem;
    z-index: 5;
}

.hero-dot {
    width: 0.7rem;
    height: 0.7rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 2rem;
    background: #ffffff;
}

.section-block,
.detail-layout {
    max-width: 80rem;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.alt-block {
    max-width: none;
    background: #ffffff;
    padding-left: max(1rem, calc((100vw - 80rem) / 2 + 1rem));
    padding-right: max(1rem, calc((100vw - 80rem) / 2 + 1rem));
}

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

.section-head h1,
.section-head h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.55rem);
    line-height: 1.15;
    font-weight: 900;
}

.section-head a {
    color: var(--ocean-600);
    font-weight: 800;
    white-space: nowrap;
}

.section-intro {
    max-width: 56rem;
    margin: -0.5rem 0 1.5rem;
    color: var(--muted);
    line-height: 1.8;
}

.search-panel {
    display: flex;
    gap: 0.75rem;
    margin: 1.25rem 0 1.75rem;
}

.site-search {
    width: min(100%, 42rem);
    min-height: 3rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.8rem 1.15rem;
    background: #ffffff;
    color: var(--ink);
    box-shadow: var(--soft);
    outline: none;
}

.site-search:focus {
    border-color: var(--ocean-400);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.search-clear {
    border: 0;
    border-radius: 999px;
    padding: 0 1.1rem;
    color: #ffffff;
    background: var(--ocean-600);
    font-weight: 800;
    cursor: pointer;
}

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

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

.horizontal-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(15rem, 18rem);
    gap: 1rem;
    overflow-x: auto;
    padding: 0.25rem 0 1rem;
    scroll-snap-type: x proximity;
}

.movie-card {
    overflow: hidden;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: var(--soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    scroll-snap-align: start;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

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

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

.card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.05));
}

.card-play {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    color: #ffffff;
    font-weight: 900;
}

.card-body {
    padding: 1rem;
}

.card-title,
.rank-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.35;
    color: var(--ink);
}

.card-title:hover,
.rank-title:hover {
    color: var(--ocean-600);
}

.card-desc {
    display: -webkit-box;
    min-height: 2.9rem;
    margin: 0.55rem 0;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.85rem;
}

.card-meta span,
.detail-meta span {
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #f3f4f6;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.tag-list span {
    display: inline-flex;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: var(--ocean-50);
    color: var(--ocean-700);
    font-size: 0.8rem;
    font-weight: 700;
}

.rank-list {
    display: grid;
    gap: 1rem;
}

.rank-item {
    display: grid;
    grid-template-columns: 4rem 8rem 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: var(--soft);
}

.rank-num {
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--ocean-600);
}

.rank-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #111827;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.rank-copy p {
    margin: 0.4rem 0 0.65rem;
    color: var(--muted);
    line-height: 1.6;
}

.page-hero {
    max-width: 80rem;
    margin: 1.5rem auto 0;
    padding: clamp(2rem, 5vw, 4rem) 1rem;
    border-radius: 1.25rem;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.55), transparent 34%), linear-gradient(135deg, #0f172a, #075985 48%, #064e3b);
    box-shadow: var(--soft);
}

.small-hero {
    padding-left: clamp(1.25rem, 5vw, 4rem);
    padding-right: clamp(1.25rem, 5vw, 4rem);
}

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

.category-card {
    overflow: hidden;
    border-radius: 1.25rem;
    background: #ffffff;
    box-shadow: var(--soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover);
}

.category-link {
    display: grid;
    grid-template-columns: 44% 1fr;
    min-height: 13rem;
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: #111827;
}

.category-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-copy {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-copy h2 {
    margin: 0 0 0.75rem;
    font-size: 1.45rem;
    font-weight: 900;
}

.category-copy p {
    margin: 0 0 1rem;
    color: var(--muted);
    line-height: 1.7;
}

.category-copy span {
    color: var(--ocean-600);
    font-weight: 900;
}

.player-wrap {
    background: #000000;
    color: #ffffff;
}

.player-topbar {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.78);
}

.player-topbar a:hover {
    color: #ffffff;
}

.video-stage {
    position: relative;
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.video-stage video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border: 0;
    color: #ffffff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.2));
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 900;
}

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

.play-circle {
    width: 5rem;
    height: 5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 0.3rem;
    color: #ffffff;
    background: linear-gradient(135deg, var(--ocean-600), var(--island-600));
    box-shadow: var(--hover);
    font-size: 2rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 2rem;
}

.detail-main h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    font-weight: 900;
}

.detail-tags {
    margin: 1rem 0 1.5rem;
}

.content-card {
    margin-bottom: 1rem;
    padding: 1.5rem;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: var(--soft);
}

.content-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 900;
}

.content-card p {
    margin: 0;
    color: #374151;
    line-height: 1.85;
}

.sticky-card {
    position: sticky;
    top: 5.5rem;
}

.side-related {
    display: grid;
    gap: 1rem;
}

.compact-card {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
}

.compact-card .card-poster {
    aspect-ratio: 3 / 4;
}

.compact-card .card-body {
    padding: 0.8rem;
}

.compact-card .card-desc,
.compact-card .tag-list {
    display: none;
}

.site-footer {
    background: #111827;
    color: #d1d5db;
}

.footer-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 3rem 1rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

.footer-logo .brand-text {
    color: #ffffff;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.footer-brand p {
    max-width: 34rem;
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 1rem;
    color: #ffffff;
    font-size: 1rem;
}

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

.site-footer a:hover {
    color: var(--ocean-400);
}

.empty-state {
    display: none;
    margin-top: 1rem;
    padding: 1.25rem;
    border-radius: 1rem;
    background: #ffffff;
    color: var(--muted);
    box-shadow: var(--soft);
}

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

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

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

    .detail-side {
        order: 2;
    }

    .sticky-card {
        position: static;
    }
}

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

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

    .brand-text {
        font-size: 1.25rem;
    }

    .hero-section {
        padding-top: 1rem;
    }

    .hero-slider {
        min-height: 430px;
        height: 62vh;
        border-radius: 1rem;
    }

    .hero-shade {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.18));
    }

    .hero-content {
        left: 1.25rem;
        right: 1.25rem;
        bottom: 3.5rem;
    }

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

    .search-panel {
        flex-direction: column;
    }

    .search-clear {
        min-height: 2.7rem;
    }

    .movie-grid,
    .compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.9rem;
    }

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

    .category-link {
        grid-template-columns: 1fr;
    }

    .category-thumbs {
        aspect-ratio: 16 / 9;
    }

    .rank-item {
        grid-template-columns: 3rem 6rem 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
    }

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

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

    .compact-card {
        grid-template-columns: 5.5rem 1fr;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-list {
        grid-auto-columns: minmax(14rem, 16rem);
    }

    .rank-item {
        grid-template-columns: 2.5rem 1fr;
    }

    .rank-thumb {
        display: none;
    }
}
