:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --emerald: #10b981;
    --emerald-deep: #047857;
    --teal: #14b8a6;
    --gold: #f59e0b;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.96);
    color: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(14px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    color: white;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.35);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 1.3rem;
    letter-spacing: 0.02em;
}

.brand-text small {
    color: #cbd5e1;
    font-size: 0.75rem;
    margin-top: 3px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.nav-link {
    padding: 10px 13px;
    color: #e2e8f0;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: rgba(16, 185, 129, 0.18);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.header-search input,
.mobile-search input {
    width: 180px;
    padding: 10px 14px;
    background: transparent;
    color: #fff;
    outline: none;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: #cbd5e1;
}

.header-search button,
.mobile-search button {
    padding: 10px 16px;
    background: var(--emerald);
    color: #fff;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-panel.is-open {
    display: block;
}

.mobile-links {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.mobile-links a,
.mobile-sub-link {
    padding: 11px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
}

.hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #334155 52%, #065f46 100%);
    color: #fff;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 20%, rgba(20, 184, 166, 0.35), transparent 32%), radial-gradient(circle at 18% 78%, rgba(16, 185, 129, 0.24), transparent 30%);
}

.hero-container {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0 58px;
}

.hero-slider {
    position: relative;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1.08fr 0.82fr;
    align-items: center;
    gap: 44px;
    opacity: 0;
    transform: translateY(24px);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 0.82rem;
}

.hero-copy h1 {
    max-width: 720px;
    margin: 18px 0 20px;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-line {
    max-width: 740px;
    color: #dbeafe;
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    line-height: 1.8;
}

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

.tag-pill {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-tags .tag-pill,
.wide-tags .tag-pill {
    background: rgba(255, 255, 255, 0.14);
    color: #f8fafc;
}

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

.primary-btn,
.ghost-btn,
.text-link,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    padding: 13px 22px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    color: #fff;
    box-shadow: 0 16px 32px rgba(16, 185, 129, 0.3);
}

.ghost-btn {
    padding: 12px 22px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster {
    position: relative;
    min-height: 430px;
    border-radius: 34px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(16, 185, 129, 0.35));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.92));
}

.hero-poster span {
    position: absolute;
    left: 22px;
    bottom: 20px;
    z-index: 2;
    color: #fff;
    font-weight: 800;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cover-image.is-missing {
    display: none;
}

.hero-controls {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 11px !important;
    height: 11px !important;
    background: rgba(255, 255, 255, 0.35) !important;
}

.hero-dot.is-active {
    width: 28px !important;
    background: #34d399 !important;
}

.category-strip {
    width: min(1180px, calc(100% - 32px));
    margin: -34px auto 0;
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.category-tile,
.category-card {
    display: grid;
    gap: 8px;
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.category-tile strong,
.category-card-title {
    font-size: 1.12rem;
    font-weight: 900;
    color: var(--ink);
}

.category-tile span,
.category-card p,
.footer-grid p,
.card-line,
.card-meta,
.rank-info p,
.rank-info span {
    color: var(--muted);
}

.content-section,
.page-main,
.detail-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

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

.section-head h2 {
    margin: 0 0 6px;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.section-more,
.text-link {
    color: var(--emerald-deep);
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.cover-frame {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #065f46);
}

.cover-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: white;
    font-weight: 800;
    font-size: 0.78rem;
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.1em;
    color: var(--ink);
    font-weight: 900;
    line-height: 1.5;
}

.card-title:hover,
.rank-title:hover,
.category-card-title:hover {
    color: var(--emerald-deep);
}

.card-meta {
    margin: 8px 0;
    font-size: 0.88rem;
}

.card-line {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.1em;
    margin: 0;
    line-height: 1.55;
    font-size: 0.92rem;
}

.compact-card {
    display: grid;
    grid-template-columns: 112px 1fr;
}

.compact-card .cover-frame {
    aspect-ratio: auto;
    min-height: 168px;
}

.accent-panel {
    margin-top: 54px;
    padding: 36px;
    border-radius: 30px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 34px;
}

.two-column-section .movie-grid {
    grid-template-columns: 1fr;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 76px 82px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line);
}

.rank-number {
    display: grid;
    place-items: center;
    min-height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    font-weight: 900;
}

.rank-cover {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f172a, #065f46);
}

.rank-title {
    font-weight: 900;
    color: var(--ink);
}

.rank-info p,
.rank-info span {
    display: block;
    margin: 5px 0 0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.full-rank .rank-item {
    grid-template-columns: 96px 96px 1fr;
}

.page-main {
    padding-bottom: 50px;
}

.page-hero {
    margin-top: 36px;
    padding: 44px;
    border-radius: 30px;
    color: #fff;
    background: linear-gradient(135deg, #1e293b, #047857);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: #dbeafe;
    line-height: 1.85;
}

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

.category-sample {
    display: grid;
    gap: 8px;
    margin: 6px 0;
}

.category-sample a {
    color: var(--muted);
    font-size: 0.92rem;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin: 24px 0 0;
    padding: 16px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.large-filter {
    grid-template-columns: 1fr 170px 170px 170px;
}

.filter-bar input,
.filter-bar select {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--ink);
    outline: none;
}

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

.empty-state {
    display: none;
    margin: 30px 0 0;
    padding: 24px;
    text-align: center;
    border-radius: 18px;
    background: #fff;
    color: var(--muted);
    border: 1px solid var(--line);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 28px 0 0;
    color: var(--muted);
}

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

.detail-main {
    padding-bottom: 60px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 34px;
    align-items: center;
    margin-top: 24px;
    padding: 32px;
    border-radius: 32px;
    background: linear-gradient(135deg, #0f172a, #1e293b 55%, #065f46);
    color: #fff;
    box-shadow: var(--shadow);
}

.detail-poster {
    border-radius: 26px;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
}

.detail-copy h1 {
    margin: 16px 0;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-line {
    color: #dbeafe;
    font-size: 1.08rem;
    line-height: 1.8;
}

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

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    font-weight: 700;
}

.player-section,
.detail-block {
    margin-top: 32px;
    padding: 28px;
    border-radius: 28px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.player-section h2,
.detail-block h2 {
    margin: 0 0 18px;
    font-size: 1.55rem;
    font-weight: 900;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
}

.movie-video {
    display: block;
    width: 100%;
    height: 100%;
    background: #020617;
    object-fit: contain;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.72));
    color: #fff;
    cursor: pointer;
}

.player-shell.is-playing .play-layer {
    display: none;
}

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    font-size: 2rem;
    padding-left: 5px;
    box-shadow: 0 18px 40px rgba(16, 185, 129, 0.35);
}

.detail-block p {
    color: #334155;
    line-height: 1.9;
    margin: 0;
    font-size: 1.02rem;
}

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

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

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

.footer-logo {
    display: block;
    color: #fff;
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 0.92rem;
}

@media (max-width: 1080px) {
    .header-search {
        display: none;
    }

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

    .two-column-section,
    .hero-slide,
    .detail-hero {
        grid-template-columns: 1fr;
    }

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

    .hero-poster {
        min-height: 360px;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .header-inner {
        min-height: 66px;
    }

    .brand-text small {
        display: none;
    }

    .hero-container {
        padding: 46px 0 42px;
    }

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

    .hero-copy h1 {
        font-size: 2.55rem;
    }

    .hero-poster {
        min-height: 320px;
    }

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

    .accent-panel,
    .page-hero,
    .detail-hero,
    .player-section,
    .detail-block {
        padding: 22px;
        border-radius: 24px;
    }

    .filter-bar,
    .large-filter {
        grid-template-columns: 1fr;
    }

    .compact-card {
        grid-template-columns: 96px 1fr;
    }

    .full-rank .rank-item,
    .rank-item {
        grid-template-columns: 62px 76px 1fr;
        gap: 10px;
    }

    .rank-number {
        font-size: 0.82rem;
    }

    .detail-hero {
        gap: 22px;
    }

    .detail-poster {
        max-width: 260px;
    }

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

@media (max-width: 520px) {
    .category-strip,
    .movie-grid,
    .category-grid,
    .related-section .movie-grid {
        grid-template-columns: 1fr;
    }

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

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

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