:root {
    --color-primary: #0891b2;
    --color-primary-dark: #0e7490;
    --color-teal: #0d9488;
    --color-emerald: #059669;
    --color-bg: #f8fafc;
    --color-card: #ffffff;
    --color-text: #1f2937;
    --color-muted: #64748b;
    --color-border: #e5e7eb;
    --shadow-card: 0 10px 25px rgba(15, 23, 42, 0.08);
    --shadow-strong: 0 18px 50px rgba(15, 23, 42, 0.16);
    --radius-large: 24px;
    --radius-card: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--color-primary-dark);
    letter-spacing: -0.02em;
}

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

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #475569;
    font-size: 15px;
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    background: #ecfeff;
    color: var(--color-primary-dark);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--color-text);
    cursor: pointer;
}

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

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.24), transparent 28%),
        radial-gradient(circle at 80% 30%, rgba(103, 232, 249, 0.26), transparent 30%),
        linear-gradient(90deg, rgba(6, 78, 59, 0.48), rgba(8, 145, 178, 0.14));
    pointer-events: none;
}

.hero-slider {
    position: relative;
    z-index: 1;
    min-height: 620px;
}

.hero-slide {
    display: none;
    min-height: 620px;
    align-items: center;
    padding: 80px 0;
}

.hero-slide.is-active {
    display: flex;
    animation: fadeIn 0.45s ease both;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 470px);
    gap: 56px;
    align-items: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #cffafe;
    font-size: 14px;
    font-weight: 750;
    backdrop-filter: blur(12px);
}

.hero h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 66px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero h1 span {
    display: block;
    color: #a5f3fc;
}

.hero-text {
    max-width: 680px;
    margin: 0 0 28px;
    color: #ecfeff;
    font-size: 19px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-bottom: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: #ffffff;
    color: var(--color-primary-dark);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.button-primary:hover {
    background: #ecfeff;
}

.button-outline {
    border: 2px solid rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.button-outline:hover {
    background: rgba(255, 255, 255, 0.15);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 620px;
}

.stat-card {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(14px);
}

.stat-number {
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
}

.stat-label {
    margin-top: 6px;
    color: #dffafe;
    font-size: 13px;
}

.hero-poster-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.36);
    backdrop-filter: blur(16px);
}

.hero-poster-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 44%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent);
    pointer-events: none;
}

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

.hero-poster-meta {
    position: absolute;
    right: 24px;
    bottom: 22px;
    left: 24px;
    z-index: 1;
}

.hero-poster-meta h2 {
    margin: 0 0 8px;
    font-size: 25px;
    line-height: 1.25;
    font-weight: 850;
}

.hero-poster-meta p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #e2e8f0;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.hero-controls {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 28px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #ffffff;
    cursor: pointer;
}

.hero-arrow {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(12px);
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
}

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

.section {
    padding: 64px 0;
}

.section-muted {
    background: #f1f5f9;
}

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

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

.section-title {
    margin: 0;
    color: #0f172a;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-subtitle {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--color-muted);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary-dark);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-card);
    background: var(--color-card);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(8, 145, 178, 0.32);
    box-shadow: var(--shadow-card);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    height: 245px;
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.compact .poster-wrap {
    height: 190px;
}

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

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

.badge-year,
.badge-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 850;
}

.badge-year {
    top: 12px;
    right: 12px;
    background: rgba(8, 145, 178, 0.92);
}

.badge-type {
    bottom: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
}

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

.movie-body {
    padding: 16px;
}

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    margin: 0 0 8px;
    color: #111827;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 850;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.compact .movie-title {
    min-height: 42px;
    font-size: 14px;
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.movie-cta {
    margin-top: 12px;
    color: var(--color-primary-dark);
    font-size: 14px;
    font-weight: 850;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 185px;
    padding: 24px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.12), rgba(16, 185, 129, 0.08));
    pointer-events: none;
}

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

.category-card h3,
.category-card p,
.category-card span {
    position: relative;
    z-index: 1;
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

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

.category-count {
    color: var(--color-primary-dark);
    font-weight: 900;
}

.page-hero {
    padding: 58px 0;
    background: linear-gradient(135deg, var(--color-primary), var(--color-teal), var(--color-emerald));
    color: #ffffff;
}

.page-hero h1 {
    max-width: 820px;
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

.search-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 12px;
    padding: 18px;
    margin: -28px auto 36px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
    outline: none;
}

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

.result-count {
    margin: 0 0 18px;
    color: var(--color-muted);
    font-weight: 700;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0;
    color: #64748b;
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--color-primary-dark);
    font-weight: 750;
}

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

.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

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

.player-box video {
    width: 100%;
    height: 100%;
    background: #020617;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.48));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    display: inline-flex;
    width: 88px;
    height: 88px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 18px 48px rgba(8, 145, 178, 0.42);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
    transform: scale(1.06);
    background: var(--color-primary-dark);
}

.play-button svg {
    margin-left: 4px;
}

.player-note {
    padding: 14px 18px;
    border-top: 1px solid #111827;
    background: #0f172a;
    color: #cbd5e1;
    font-size: 13px;
}

.detail-card {
    padding: 28px;
    margin-top: 24px;
}

.detail-title {
    margin: 0 0 16px;
    color: #0f172a;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    font-weight: 920;
    letter-spacing: -0.04em;
}

.info-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.info-chip,
.tag-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    background: #ecfeff;
    color: var(--color-primary-dark);
    font-size: 13px;
    font-weight: 800;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0 22px;
}

.tag-chip {
    background: #f1f5f9;
    color: #475569;
}

.detail-section {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--color-border);
}

.detail-section h2 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

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

.side-card {
    padding: 18px;
}

.side-card h3 {
    margin: 0 0 14px;
    font-size: 19px;
    font-weight: 900;
}

.side-list {
    display: grid;
    gap: 12px;
}

.side-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.side-item img {
    width: 72px;
    height: 92px;
    border-radius: 12px;
    object-fit: cover;
    background: #e0f2fe;
}

.side-item-title {
    display: -webkit-box;
    overflow: hidden;
    color: #0f172a;
    font-weight: 850;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.side-item-meta {
    color: #64748b;
    font-size: 12px;
}

.ranking-list {
    display: grid;
    gap: 14px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 64px 96px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.ranking-number {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-emerald));
    color: #ffffff;
    font-weight: 950;
}

.ranking-row img {
    width: 96px;
    height: 120px;
    border-radius: 14px;
    object-fit: cover;
    background: #ccfbf1;
}

.ranking-row h2 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.3;
}

.ranking-row p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--color-muted);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.site-footer {
    margin-top: 64px;
    background: #0f172a;
    color: #cbd5e1;
}

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

.footer-grid h3 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 16px;
}

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

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

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

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 80;
    display: none;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

.back-to-top.is-visible {
    display: inline-flex;
}

.empty-state {
    display: none;
    padding: 44px;
    border-radius: 18px;
    background: #ffffff;
    color: var(--color-muted);
    text-align: center;
    box-shadow: var(--shadow-card);
}

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

@media (max-width: 980px) {
    .site-nav {
        position: absolute;
        top: 68px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--color-border);
        border-radius: 16px;
        background: #ffffff;
        box-shadow: var(--shadow-card);
    }

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

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

    .hero,
    .hero-slider,
    .hero-slide {
        min-height: auto;
    }

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

    .hero-slide {
        padding: 50px 0 74px;
    }

    .hero-poster-card img {
        height: 440px;
    }

    .hero-controls {
        right: 24px;
    }

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

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

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

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

    .brand {
        font-size: 17px;
    }

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

    .hero-stats,
    .grid-cards,
    .grid-cards.compact,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster-card img {
        height: 360px;
    }

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

    .poster-wrap,
    .compact .poster-wrap {
        height: 260px;
    }

    .detail-card {
        padding: 20px;
    }

    .ranking-row {
        grid-template-columns: 48px 74px minmax(0, 1fr);
    }

    .ranking-row .button {
        grid-column: 1 / -1;
    }

    .ranking-row img {
        width: 74px;
        height: 96px;
    }

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