* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --primary: #0891b2;
    --primary-dark: #0e7490;
    --primary-soft: #ecfeff;
    --teal: #0d9488;
    --emerald: #059669;
    --ink: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --surface: #ffffff;
    --soft: #f8fafc;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

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(--ink);
    background: #ffffff;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.nav-shell {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-dark);
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--emerald));
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.28);
}

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

.nav-link,
.mobile-link {
    color: #374151;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 12px;
    transition: 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
    color: #ffffff;
    background: var(--primary);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: #ffffff;
    background: linear-gradient(135deg, #0891b2, #0d9488 50%, #059669);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.58fr);
    gap: 52px;
    align-items: center;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 92px 0 86px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100vw;
    margin-left: calc((min(1180px, calc(100vw - 32px)) - 100vw) / 2);
    opacity: 0.28;
    filter: blur(3px) saturate(1.15);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 145, 178, 0.95), rgba(13, 148, 136, 0.78), rgba(5, 150, 105, 0.7));
}

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

.hero-content {
    max-width: 720px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    color: #cffafe;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    margin: 0 0 22px;
    max-width: 660px;
    color: #ecfeff;
    font-size: 20px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    color: var(--primary-dark);
    border-radius: 999px;
    background: #ecfeff;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.hero-search-form button,
.watch-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-btn {
    min-height: 50px;
    padding: 0 24px;
    color: var(--primary-dark);
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.primary-btn:hover {
    transform: translateY(-2px);
    background: #ecfeff;
}

.ghost-btn {
    min-height: 50px;
    padding: 0 22px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.08);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 12px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.36);
}

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

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

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

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

.search-hero {
    margin-top: -42px;
    position: relative;
    z-index: 3;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
    align-items: center;
    gap: 28px;
    padding: 26px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    line-height: 1.2;
}

.search-panel p,
.section-heading p,
.page-hero p {
    margin: 8px 0 0;
    color: var(--muted);
}

.hero-search-form {
    display: flex;
    gap: 12px;
}

.hero-search-form input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #111827;
    background: #ffffff;
    outline: none;
    transition: 0.2s ease;
}

.hero-search-form input {
    min-height: 52px;
    padding: 0 18px;
}

.hero-search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.hero-search-form button {
    min-width: 110px;
    border: 0;
    color: #ffffff;
    background: var(--primary);
    cursor: pointer;
}

.hero-search-form button:hover {
    background: var(--primary-dark);
}

.content-section {
    padding: 72px 0;
}

.gray-section {
    background: var(--soft);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: 34px;
}

.section-heading h2 {
    font-size: clamp(28px, 3vw, 38px);
}

.section-more {
    color: var(--primary-dark);
    font-weight: 800;
}

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

.category-tile {
    display: block;
    min-height: 190px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
    transition: 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.mini-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

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

.category-tile h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
}

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

.all-movie-grid {
    align-items: start;
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
    transition: 0.2s ease;
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 11;
    background: #e2e8f0;
}

.poster-wrap img,
.mini-card img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    background: var(--primary);
}

.year-badge {
    right: 12px;
}

.rank-badge {
    left: 12px;
    background: #f97316;
}

.movie-body {
    padding: 18px;
}

.movie-meta {
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 800;
}

.movie-body h2 {
    display: -webkit-box;
    min-height: 54px;
    margin: 7px 0 8px;
    overflow: hidden;
    color: #1f2937;
    font-size: 19px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.watch-link {
    margin-top: 14px;
    color: var(--primary-dark);
}

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

.mini-card {
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: 0.2s ease;
}

.mini-card a {
    display: block;
}

.mini-card img {
    aspect-ratio: 16 / 11;
    background: #e2e8f0;
}

.mini-card span {
    display: -webkit-box;
    min-height: 46px;
    padding: 10px 12px;
    overflow: hidden;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.feature-strip {
    padding: 70px 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--teal) 52%, var(--emerald));
}

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

.feature-grid div {
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.feature-grid h2 {
    margin: 0 0 10px;
}

.feature-grid p {
    margin: 0;
    color: #cffafe;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #0891b2, #0d9488 50%, #059669);
}

.compact-hero {
    padding: 66px 0;
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 54px);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #e0f2fe;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.filter-bar label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.filter-bar input,
.filter-bar select {
    min-height: 44px;
    padding: 0 12px;
}

.movie-card.is-hidden {
    display: none;
}

.detail-shell {
    padding: 36px 0 72px;
    background: var(--soft);
}

.detail-shell .breadcrumb {
    color: var(--primary-dark);
}

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

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    padding-left: 6px;
    border-radius: 50%;
    font-size: 34px;
    background: var(--primary);
    box-shadow: 0 20px 45px rgba(8, 145, 178, 0.32);
}

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

.detail-poster {
    overflow: hidden;
    align-self: start;
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    background: #e2e8f0;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.detail-info h1 {
    font-size: clamp(30px, 4vw, 44px);
}

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

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #334155;
    background: #f1f5f9;
    font-size: 14px;
    font-weight: 800;
}

.detail-tags {
    margin-bottom: 24px;
}

.detail-info h2 {
    margin: 26px 0 10px;
    font-size: 22px;
}

.detail-info p {
    margin: 0 0 14px;
    color: #475569;
    font-size: 16px;
}

.lead-text {
    color: var(--primary-dark) !important;
    font-weight: 800;
}

.related-section {
    margin-top: 46px;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 28px;
    padding: 48px 0;
}

.footer-brand {
    color: #ffffff;
    margin-bottom: 14px;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

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

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

.site-footer a:hover {
    color: #67e8f9;
}

.footer-bottom {
    padding: 18px 0;
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.back-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: var(--primary);
    box-shadow: var(--shadow);
    cursor: pointer;
    z-index: 60;
}

.back-top.is-visible {
    display: block;
}

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

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

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

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav.open {
        display: flex;
    }

    .hero-carousel {
        min-height: auto;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 62px 0 88px;
    }

    .hero-poster {
        max-width: 320px;
        margin: 0 auto;
    }

    .search-panel,
    .feature-grid,
    .footer-grid,
    .detail-content,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .hero-search-form {
        flex-direction: column;
    }

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

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

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

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

    .brand-name {
        font-size: 18px;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

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

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

    .content-section {
        padding: 52px 0;
    }

    .compact-hero {
        padding: 46px 0;
    }

    .detail-content {
        padding: 18px;
    }
}
