:root {
    --bg: #f7faf9;
    --panel: #ffffff;
    --text: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --emerald: #059669;
    --emerald-dark: #065f46;
    --emerald-soft: #d1fae5;
    --dark: #0b1220;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.nav-wrap {
    width: min(1200px, calc(100% - 32px));
    height: 68px;
    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-weight: 800;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.28);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-title {
    font-size: 20px;
    color: #0f172a;
}

.brand-subtitle {
    color: #64748b;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 600;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #374151;
    font-weight: 650;
    font-size: 15px;
}

.desktop-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
    color: var(--emerald);
    transform: translateY(-1px);
}

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

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #111827;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-weight: 650;
}

.mobile-nav.is-open {
    display: grid;
}

.hero-slider {
    position: relative;
    height: 68vh;
    min-height: 520px;
    overflow: hidden;
    background: #000;
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transform: scale(1.03);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.52) 48%, rgba(0, 0, 0, 0.16) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1200px;
    color: #fff;
}

.hero-content h1 {
    max-width: 780px;
    margin: 18px 0 16px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 14px;
    border-radius: 999px;
    color: #fff;
    background: var(--emerald);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.04em;
}

.eyebrow.dark {
    color: var(--emerald-dark);
    background: var(--emerald-soft);
}

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

.hero-meta span {
    padding: 7px 12px;
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-tags span,
.tag-row span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #065f46;
    background: #d1fae5;
    font-weight: 700;
    font-size: 13px;
}

.hero-tags {
    margin: 0 0 26px;
}

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

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

.btn-primary {
    color: #fff;
    background: var(--emerald);
    box-shadow: 0 14px 30px rgba(5, 150, 105, 0.28);
}

.btn-primary:hover,
.section-link:hover {
    transform: translateY(-2px);
    background: var(--emerald-dark);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.28);
}

.btn-primary.full {
    width: 100%;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    z-index: 3;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.page-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 72px;
}

.intro-panel,
.filter-panel,
.detail-card,
.side-card,
.category-card-wide,
.rank-showcase {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.96);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.intro-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 30px;
    margin-bottom: 52px;
}

.intro-panel h2 {
    margin: 14px 0 12px;
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.15;
}

.intro-panel p,
.section-head p,
.category-card-body p,
.page-hero p,
.card-desc,
.detail-section p,
.footer-main p {
    color: var(--muted);
    line-height: 1.8;
}

.content-section {
    margin: 0 0 56px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 22px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.2;
}

.section-head p {
    margin: 8px 0 0;
}

.section-link {
    color: #fff;
    background: var(--emerald);
    white-space: nowrap;
}

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

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

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.38);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.16);
}

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

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

.movie-card:hover .poster-link img {
    transform: scale(1.06);
    opacity: 0.86;
}

.card-badge,
.play-chip {
    position: absolute;
    left: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.card-badge {
    top: 10px;
    color: #065f46;
    background: rgba(209, 250, 229, 0.94);
}

.play-chip {
    bottom: 10px;
    color: #fff;
    background: rgba(5, 150, 105, 0.92);
}

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    color: #111827;
    font-weight: 850;
    font-size: 16px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-title:hover {
    color: var(--emerald);
}

.card-meta {
    margin: 8px 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.5;
}

.card-desc {
    display: -webkit-box;
    min-height: 50px;
    overflow: hidden;
    margin: 0 0 12px;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    gap: 6px;
}

.tag-row span {
    font-size: 12px;
    padding: 5px 8px;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--shadow);
    background: #0f172a;
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    opacity: 0.76;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.58;
}

.category-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.82) 100%);
}

.category-name,
.category-desc {
    position: absolute;
    left: 18px;
    right: 18px;
    color: #fff;
}

.category-name {
    bottom: 66px;
    font-size: 22px;
    font-weight: 900;
}

.category-desc {
    bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    line-height: 1.5;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 48px 68px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-3px);
    border-color: rgba(5, 150, 105, 0.4);
}

.rank-row.large {
    grid-template-columns: 58px 78px 1fr;
}

.rank-no {
    color: var(--emerald);
    font-size: 24px;
    font-weight: 950;
    text-align: center;
}

.rank-row img {
    width: 68px;
    height: 92px;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.rank-row.large img {
    width: 78px;
    height: 106px;
}

.rank-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-copy strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 17px;
}

.rank-copy em {
    overflow: hidden;
    color: #64748b;
    font-style: normal;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.page-hero {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.45), transparent 34%), linear-gradient(135deg, #020617 0%, #064e3b 100%);
}

.page-hero.compact {
    min-height: 300px;
}

.page-hero.category-hero {
    min-height: 420px;
}

.page-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
}

.page-hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.26));
}

.page-hero > div:last-child,
.page-hero.compact > div {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.page-hero h1 {
    margin: 18px 0 14px;
    max-width: 820px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: end;
    padding: 18px;
    margin: 0 0 30px;
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #475569;
    font-weight: 800;
}

.search-field input,
.filter-select {
    height: 46px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    outline: none;
}

.search-field input {
    width: 100%;
    padding: 0 15px;
}

.filter-select {
    padding: 0 34px 0 12px;
}

.search-field input:focus,
.filter-select:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.filter-controls {
    display: flex;
    gap: 10px;
}

.empty-state {
    margin: 0 0 24px;
    padding: 18px;
    border-radius: 14px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    font-weight: 750;
}

.category-wide-grid {
    display: grid;
    gap: 18px;
}

.category-card-wide {
    overflow: hidden;
}

.category-card-link {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 180px;
}

.category-card-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    background: #0f172a;
}

.category-card-images img {
    width: 100%;
    height: 100%;
    min-height: 88px;
    object-fit: cover;
}

.category-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
}

.category-card-body h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.category-card-body p {
    margin: 0 0 18px;
}

.category-card-body span {
    color: var(--emerald);
    font-weight: 900;
}

.detail-shell {
    padding-top: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--emerald);
    font-weight: 750;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.66));
    cursor: pointer;
}

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

.player-button {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--emerald);
    box-shadow: 0 18px 40px rgba(5, 150, 105, 0.36);
    font-size: 30px;
    padding-left: 4px;
}

.player-overlay strong {
    font-size: 18px;
}

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

.detail-card h1 {
    margin: 0 0 18px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 10px;
    color: #475569;
    background: #f1f5f9;
    font-weight: 750;
}

.detail-tags {
    margin: 20px 0 26px;
}

.detail-section {
    padding-top: 22px;
    margin-top: 22px;
    border-top: 1px solid #e5e7eb;
}

.detail-section h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

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

.review-box {
    padding: 18px;
    border-radius: 16px;
    background: #f8fafc;
}

.detail-side {
    display: grid;
    gap: 20px;
    position: sticky;
    top: 92px;
}

.side-card {
    padding: 18px;
}

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

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    border-radius: 16px;
}

.movie-card-horizontal .poster-link {
    aspect-ratio: 2 / 3;
}

.movie-card-horizontal .card-body {
    padding: 12px;
}

.movie-card-horizontal .card-title {
    min-height: auto;
    font-size: 14px;
}

.movie-card-horizontal .card-desc,
.movie-card-horizontal .tag-row,
.movie-card-horizontal .play-chip {
    display: none;
}

.poster-side img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 14px;
    background: #0f172a;
}

.site-footer {
    color: #cbd5e1;
    background: #111827;
    margin-top: 24px;
}

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

.footer-brand {
    color: #fff;
    font-size: 22px;
    margin-bottom: 14px;
}

.footer-main p {
    max-width: 520px;
    color: #94a3b8;
}

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

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

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

.footer-copy {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    text-align: center;
}

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

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

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

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

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

    .detail-side {
        position: static;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 820px) {
    .hero-slider {
        height: 72vh;
        min-height: 560px;
    }

    .hero-content {
        padding: 30px 0 70px;
        justify-content: flex-end;
    }

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

    .hero-arrow {
        display: none;
    }

    .intro-panel,
    .section-head,
    .filter-panel {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-controls {
        display: grid;
        grid-template-columns: 1fr;
    }

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

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

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

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

    .category-card-images {
        height: 180px;
    }

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

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

@media (max-width: 520px) {
    .nav-wrap,
    .mobile-nav,
    .page-shell,
    .hero-content,
    .page-hero > div:last-child,
    .page-hero.compact > div,
    .footer-grid,
    .footer-copy {
        width: min(100% - 22px, 1200px);
    }

    .brand-title {
        font-size: 17px;
    }

    .brand-subtitle {
        font-size: 11px;
    }

    .hero-slider {
        min-height: 620px;
    }

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

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

    .movie-grid,
    .dense-grid,
    .category-grid {
        gap: 12px;
    }

    .card-body {
        padding: 11px;
    }

    .card-title {
        font-size: 14px;
    }

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

    .detail-card,
    .side-card {
        padding: 18px;
    }
}
