:root {
    --emerald: #059669;
    --emerald-dark: #047857;
    --teal: #0d9488;
    --cyan: #0891b2;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f3f4f6;
    --line: #e5e7eb;
    --white: #ffffff;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 46%, #f8fafc 100%);
}

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: 80;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--emerald), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 10px 22px rgba(5, 150, 105, 0.3);
    font-size: 15px;
    flex: 0 0 auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link,
.mobile-link {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #ecfdf5;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--emerald-dark);
}

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid var(--line);
}

.mobile-menu.open {
    display: grid;
    gap: 14px;
}

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

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

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

.hero-bg,
.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 40%, rgba(16, 185, 129, 0.36), transparent 30%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.76) 45%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 610px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
    max-width: 760px;
    margin-left: max(16px, calc((100vw - 1180px) / 2));
    padding: 96px 0;
}

.hero-kicker,
.page-hero span,
.section-heading span {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.18);
    color: #a7f3d0;
    padding: 8px 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 20px 0 16px;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 22px;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags span,
.detail-tags a,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.12);
    color: #ecfdf5;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 14px 28px rgba(5, 150, 105, 0.28);
}

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

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.ghost-btn.light {
    color: var(--emerald-dark);
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.hero-poster {
    position: absolute;
    right: max(20px, calc((100vw - 1180px) / 2));
    bottom: 62px;
    z-index: 3;
    width: min(300px, 25vw);
    aspect-ratio: 4 / 5;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

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

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

.hero-dot.active {
    width: 30px;
    background: #34d399;
}

.quick-cats {
    width: min(1180px, calc(100% - 32px));
    margin: -28px auto 42px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.quick-cats a {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #ffffff;
    color: #065f46;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(16, 185, 129, 0.18);
}

.intro-block {
    padding: 6px 0 30px;
    text-align: center;
}

.intro-block h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 48px);
    letter-spacing: -0.04em;
}

.intro-block p {
    width: min(780px, 100%);
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.9;
}

.search-panel {
    margin: 22px 0 16px;
    padding: 22px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.search-box input,
.filter-row select {
    width: 100%;
    border: 1px solid var(--line);
    outline: none;
    border-radius: 16px;
    background: #f9fafb;
    color: var(--ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input {
    min-height: 52px;
    padding: 0 18px;
    font-size: 16px;
}

.search-box input:focus,
.filter-row select:focus {
    border-color: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.filter-row select {
    min-height: 46px;
    padding: 0 14px;
}

.filter-empty {
    display: none;
    margin: 18px 0 0;
    color: var(--muted);
    text-align: center;
}

.filter-empty.show {
    display: block;
}

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

.soft-section {
    background: linear-gradient(135deg, #ecfdf5, #eff6ff);
    border-block: 1px solid rgba(16, 185, 129, 0.12);
}

.section-heading {
    margin-bottom: 26px;
}

.section-heading span,
.page-hero span {
    color: var(--emerald-dark);
    background: #d1fae5;
}

.section-heading h2 {
    margin: 14px 0 8px;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.035em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #064e3b, #0f766e);
}

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

.card-poster img {
    transition: transform 0.5s ease;
}

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

.card-play,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
}

.card-play {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.86);
    box-shadow: 0 12px 24px rgba(5, 150, 105, 0.25);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
    padding: 16px;
}

.card-meta,
.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f3f4f6;
}

.card-body h3 {
    margin: 12px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--emerald);
}

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

.tag-row span {
    background: #ecfdf5;
    border-color: #d1fae5;
    color: #047857;
}

.center-action {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.category-stack {
    display: grid;
    gap: 36px;
}

.slice-head,
.category-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.slice-head h3,
.category-panel h2 {
    margin: 0;
    font-size: 24px;
}

.slice-head a {
    color: var(--emerald-dark);
    font-weight: 800;
}

.page-hero {
    position: relative;
    padding: 88px 0;
    overflow: hidden;
    background: linear-gradient(135deg, #ecfdf5, #f8fafc 45%, #e0f2fe);
}

.page-hero h1 {
    margin: 16px 0 12px;
    font-size: clamp(34px, 5vw, 62px);
    letter-spacing: -0.05em;
}

.page-hero p {
    width: min(760px, 100%);
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

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

.category-overview {
    display: grid;
    gap: 30px;
}

.category-panel {
    border-radius: 28px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.category-panel p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.ranking-hero {
    background: radial-gradient(circle at 70% 25%, rgba(16, 185, 129, 0.18), transparent 34%), linear-gradient(135deg, #0f172a, #064e3b);
    color: #ffffff;
}

.ranking-hero p {
    color: #d1d5db;
}

.rank-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 40px;
    align-items: center;
}

.rank-board {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
}

.rank-line {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    color: #ffffff;
}

.rank-line:hover {
    background: rgba(255, 255, 255, 0.1);
}

.rank-line span {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-weight: 900;
}

.rank-line strong,
.rank-line em {
    display: block;
    min-width: 0;
}

.rank-line em {
    grid-column: 2;
    color: #cbd5e1;
    font-style: normal;
    font-size: 13px;
}

.detail-hero {
    position: relative;
    min-height: 570px;
    overflow: hidden;
    background: #020617;
}

.detail-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 24%, rgba(16, 185, 129, 0.24), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72) 52%, rgba(2, 6, 23, 0.45)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 45%);
}

.detail-top {
    position: relative;
    z-index: 2;
    padding: 46px 0 72px;
    color: #ffffff;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 34px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #34d399;
}

.detail-grid {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 4 / 5;
    border-radius: 26px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.detail-line {
    max-width: 820px;
    margin: 0 0 22px;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.8;
}

.detail-info .detail-meta span {
    background: rgba(255, 255, 255, 0.13);
    color: #f9fafb;
}

.detail-tags {
    margin: 22px 0 28px;
}

.detail-tags a {
    background: rgba(16, 185, 129, 0.2);
    color: #d1fae5;
}

.player-section {
    margin-top: -52px;
    position: relative;
    z-index: 5;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: #ffffff;
    cursor: pointer;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.72));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-circle {
    width: 78px;
    height: 78px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 20px 40px rgba(5, 150, 105, 0.36);
    font-size: 28px;
}

.player-overlay strong {
    max-width: 80%;
    text-align: center;
    font-size: 22px;
}

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

.content-card {
    border-radius: 26px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.content-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

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

.site-footer {
    margin-top: 60px;
    background: linear-gradient(135deg, #111827, #1f2937 55%, #0f172a);
    color: #d1d5db;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 34px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 30px;
}

.footer-brand {
    margin-bottom: 14px;
    color: #ffffff;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

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

.site-footer p {
    margin: 0;
    color: #9ca3af;
    line-height: 1.8;
}

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

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

.site-footer a:hover {
    color: #34d399;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 16px;
    text-align: center;
    color: #9ca3af;
}

@media (max-width: 1100px) {
    .nav-links {
        gap: 16px;
    }

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

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

    .hero-poster {
        display: none;
    }

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

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

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

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

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

    .hero-content {
        margin-left: 16px;
        padding-right: 16px;
    }

    .hero-actions,
    .slice-head,
    .category-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-row,
    .detail-content,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(280px, 78vw);
    }
}

@media (max-width: 640px) {
    .brand {
        font-size: 20px;
    }

    .movie-grid,
    .small-grid,
    .rank-grid {
        grid-template-columns: 1fr;
    }

    .quick-cats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: -18px;
    }

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

    .search-panel,
    .category-panel,
    .content-card {
        padding: 18px;
        border-radius: 20px;
    }

    .player-shell {
        border-radius: 18px;
    }

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