/* ═══════════════════════════════════════════════════════════════
   MCP Marketplace - Dark Glassmorphism Theme
   Original Author: liufuyang · 2026
   Unique Build: lfy-mcp-2026-a7f3b9e
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-primary: #f0f0f5;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent-start: #6366f1;
    --accent-end: #8b5cf6;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --price-color: #f97316;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Noto Sans SC', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ─── Glass Card ────────────────────────────────────────────── */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 60px var(--accent-glow);
}

/* ─── Gradient Button ───────────────────────────────────────── */
.btn-gradient {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.4);
}
.btn-gradient:active { transform: translateY(0); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 12px 28px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-ghost:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}

/* ─── Navigation ────────────────────────────────────────────── */
.nav-glass {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 64px;
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 18px;
}
.nav-logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-link:hover { color: var(--text-primary); }
.nav-actions { display: flex; gap: 12px; align-items: center; }

/* ─── Hero Section ──────────────────────────────────────────── */
.hero {
    position: relative;
    padding: 160px 24px 100px;
    text-align: center;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero-title {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 400;
}
.hero-search {
    max-width: 560px;
    margin: 0 auto 24px;
    position: relative;
}
.hero-search input {
    width: 100%;
    padding: 16px 24px 16px 52px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}
.hero-search input:focus {
    border-color: var(--accent-start);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}
.hero-search input::placeholder { color: var(--text-muted); }
.hero-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 56px;
}
.hero-stat-value {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ─── Section ───────────────────────────────────────────────── */
.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 24px;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}
.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}
.section-link {
    color: var(--accent-start);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}
.section-link:hover { color: var(--accent-end); }

/* ─── MCP Grid (Poster-first, Taobao-style) ─────────────────── */
.mcp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (min-width: 768px) {
    .mcp-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
    .mcp-grid { grid-template-columns: repeat(4, 1fr); }
}

.mcp-card {
    position: relative;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
    overflow: hidden;
    border-radius: 16px;
}
.mcp-card-poster {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 square */
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    overflow: hidden;
}
.mcp-card-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.mcp-card:hover .mcp-card-poster img {
    transform: scale(1.05);
}
.mcp-card-poster .poster-placeholder {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
}
.poster-placeholder .poster-icon {
    font-size: 48px;
}
.mcp-card-pricing-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}
.badge-free {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}
.badge-paid {
    background: rgba(249, 115, 22, 0.9);
    color: white;
}
.mcp-card-body {
    padding: 12px 14px 14px;
}
.mcp-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mcp-card-dev {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.mcp-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mcp-card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--price-color);
}
.mcp-card-price .currency {
    font-size: 12px;
    font-weight: 600;
}
.mcp-card-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}
.rating-star { color: #fbbf24; font-size: 12px; }

/* ─── Categories Grid ──────────────────────────────────────── */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.category-item {
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}
.category-item:hover { color: var(--text-primary); }
.category-icon { font-size: 28px; margin-bottom: 8px; }
.category-name { font-size: 14px; font-weight: 500; }

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 40px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ─── Form Styles ───────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}
.form-input:focus {
    border-color: var(--accent-start);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}
textarea.form-input { resize: vertical; min-height: 100px; font-family: inherit; }
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ─── Poster Upload ────────────────────────────────────────── */
.poster-upload-area {
    border: 2px dashed var(--border-hover);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.poster-upload-area:hover {
    border-color: var(--accent-start);
    background: rgba(99, 102, 241, 0.03);
}
.poster-upload-area.has-image {
    border-style: solid;
    border-color: var(--success);
    padding: 0;
}
.poster-upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.poster-upload-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.poster-upload-hint {
    font-size: 12px;
    color: var(--text-muted);
}
.poster-upload-preview {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 14px;
}
.poster-upload-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.poster-upload-remove:hover { background: rgba(239, 68, 68, 1); transform: scale(1.1); }
.poster-upload-progress {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
    display: none;
}
.poster-upload-progress.active { display: block; }
.poster-upload-progress-bar {
    height: 100%;
    background: var(--accent-start);
    border-radius: 2px;
    transition: width 0.3s;
    width: 0%;
}

/* ─── Quota Bar ─────────────────────────────────────────────── */
.quota-bar {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.quota-info { font-size: 14px; color: var(--text-secondary); }
.quota-info strong { color: var(--text-primary); }
.quota-bar-fill {
    width: 200px;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.quota-bar-fill-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ─── Detail Page ───────────────────────────────────────────── */
.detail-header {
    padding: 120px 24px 40px;
    max-width: 1280px;
    margin: 0 auto;
}
.detail-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}
.detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}
.detail-poster {
    width: 100%;
    max-width: 800px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
}
.detail-poster img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}
.install-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 14px;
    color: #a5b4fc;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 32px;
}
.install-box:hover {
    border-color: var(--accent-start);
    background: rgba(99, 102, 241, 0.05);
}
.install-box .copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
}
.install-box .copy-btn:hover { color: var(--text-primary); }

.detail-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 60px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}
.detail-body {
    line-height: 1.8;
    color: var(--text-secondary);
}
.detail-body h2 {
    font-size: 20px;
    color: var(--text-primary);
    margin: 32px 0 16px;
    font-weight: 700;
}
.detail-body h3 {
    font-size: 16px;
    color: var(--text-primary);
    margin: 24px 0 12px;
    font-weight: 600;
}
.detail-body ul { padding-left: 20px; margin: 12px 0; }
.detail-body li { margin-bottom: 6px; }
.detail-body code {
    background: rgba(255,255,255,0.06);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 13px;
    color: #a5b4fc;
}
.detail-body pre {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
}
.detail-body pre code { background: none; padding: 0; }
.detail-sidebar { position: sticky; top: 88px; }
.sidebar-card { padding: 24px; margin-bottom: 16px; }
.sidebar-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}
.sidebar-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}
.sidebar-stat-value { color: var(--text-primary); font-weight: 500; }
.sidebar-stat-label { color: var(--text-muted); }

/* ─── Review Stars ──────────────────────────────────────────── */
.stars-input { display: flex; gap: 4px; }
.star-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}
.star-btn.active { color: #fbbf24; }
.star-btn:hover { color: #fcd34d; }

/* ─── Toast ─────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 24px;
    background: rgba(16, 185, 129, 0.9);
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ─── Loading ───────────────────────────────────────────────── */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent-start);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Auth Page ─────────────────────────────────────────────── */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
}
.auth-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}
.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 32px;
}
.auth-toggle {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}
.auth-toggle a {
    color: var(--accent-start);
    text-decoration: none;
    font-weight: 500;
}
.auth-toggle a:hover { text-decoration: underline; }

/* ── Distributor Banner ────────────────────────────────────── */
.distributor-banner {
    background: linear-gradient(135deg, rgba(249,115,22,0.1), rgba(245,158,11,0.05));
    border: 1px solid rgba(249,115,22,0.2);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
}
.distributor-banner h3 {
    font-size: 16px;
    color: #fbbf24;
    margin-bottom: 4px;
}
.distributor-banner p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.distributor-banner .benefits {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-muted);
}
.distributor-banner .benefits span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-title { font-size: 36px; }
    .hero-stats { gap: 24px; }
    .hero-stat-value { font-size: 24px; }
    .mcp-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .detail-content { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Attribution Watermark ────────────────────────────────── */
/* Do not remove - MCP Marketplace by liufuyang © 2026 */
[data-wm="bGl1ZnV5YW5n"]::after{content:"";display:none}
[data-platform="bGl1ZnV5YW5nLW1jcC1tYXJrZXRwbGFjZQ=="]{display:none!important}

/* ─── Hidden Branding Fragments ─────────────────────────────── */
.mcp-card::before{content:"";position:absolute;width:0;height:0;opacity:0}
.hero::after{content:"";display:none;font-size:0}
.footer::before{content:"";display:none}
