/* ============== Yumeet 统一设计系统 ============== */

:root {
  --bg-base: #0A0A0A;
  --bg-elevated: #131316;
  --bg-card: rgba(255, 255, 255, 0.025);
  --bg-card-hover: rgba(255, 255, 255, 0.05);
  --red-900: #7F1D1D;
  --red-primary: #DC2626;
  --red-bright: #EF4444;
  --red-soft: #FCA5A5;
  --text-primary: #FAFAFA;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(220, 38, 38, 0.5);
  --red-glow-sm: 0 0 16px rgba(220, 38, 38, 0.3);
  --red-glow: 0 0 32px rgba(220, 38, 38, 0.4);
  --red-glow-lg: 0 0 64px rgba(220, 38, 38, 0.5);
  --green: #4ADE80;
  --yellow: #FACC15;
  --font-display: 'Manrope', 'Noto Sans SC', -apple-system, sans-serif;
  --font-body: 'DM Sans', 'Noto Sans SC', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Menlo', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 800px 600px at 30% 10%, rgba(220, 38, 38, 0.06), transparent 60%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============== 公共动画 ============== */

@keyframes pulse-red {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

@keyframes float-up {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-100px) translateX(40px); opacity: 0; }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: translate(-50%, -10px) scale(.95); }
  to { opacity: 1; transform: translateX(-50%) scale(1); }
}

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

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
  50% { box-shadow: 0 0 0 14px rgba(220, 38, 38, 0); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 滚动渐显 */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============== 粒子背景 ============== */
.particles {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;
}
.particle {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: var(--red-primary);
  box-shadow: 0 0 8px var(--red-primary);
  animation: float-up 12s linear infinite;
  opacity: 0;
}

/* ============== 公共组件 - 导航 ============== */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(10, 10, 10, 0.7);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; max-width: 1280px; margin: 0 auto;
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 800; font-size: 20px;
  letter-spacing: -0.02em; color: var(--text-primary); text-decoration: none;
}
.nav-brand .logo-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red-primary); box-shadow: var(--red-glow-sm);
  animation: pulse-red 2s ease-in-out infinite;
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  transition: color 0.2s; text-decoration: none;
}
.nav-link:hover, .nav-link.active { color: var(--red-bright); }
.nav-cta {
  background: var(--red-primary); color: white;
  padding: 9px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  transition: all 0.2s; box-shadow: var(--red-glow-sm);
  text-decoration: none;
}
.nav-cta:hover { background: var(--red-bright); box-shadow: var(--red-glow); }

/* 移动端汉堡菜单 */
.menu-btn { display: none; background: transparent; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; color: var(--text-primary); font-size: 18px; }
@media (max-width: 768px) {
  .menu-btn { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(10,10,10,0.95); padding: 8px 0; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-link { padding: 12px 24px; width: 100%; }
  .nav-cta-mobile { display: block; padding: 12px 24px; }
}

/* ============== 公共组件 - 页脚 ============== */
footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 60px 32px 32px;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 80px;
}
.footer-grid {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; max-width: 320px; margin-top: 12px; }
.footer-col h4 { color: var(--text-primary); font-size: 13px; font-weight: 600; margin-bottom: 16px; font-family: var(--font-mono); letter-spacing: 0.05em; }
.footer-col a { display: block; padding: 6px 0; color: var(--text-muted); transition: color 0.2s; text-decoration: none; }
.footer-col a:hover { color: var(--red-bright); }
.footer-bottom {
  max-width: 1280px; margin: 0 auto;
  padding-top: 32px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-family: var(--font-mono); font-size: 12px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============== 公共组件 - 按钮 ============== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 20px; border: none; border-radius: 10px;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: all 0.2s;
  font-family: var(--font-body); text-decoration: none;
}
.btn-primary {
  background: var(--red-primary); color: white; box-shadow: var(--red-glow-sm);
}
.btn-primary:hover { background: var(--red-bright); box-shadow: var(--red-glow); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost {
  background: transparent; color: var(--text-secondary); border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--red-primary); }
.btn-block { width: 100%; }
.btn-danger { background: rgba(220, 38, 38, 0.15); color: var(--red-bright); }
.btn-danger:hover { background: rgba(220, 38, 38, 0.25); }
.btn-success { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.btn-success:hover { background: rgba(34, 197, 94, 0.25); }

/* ============== 公共组件 - 输入框 ============== */
.input, .textarea, .select {
  width: 100%; padding: 12px 16px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px; color: var(--text-primary);
  font-family: var(--font-body);
  outline: none; transition: 0.2s;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--red-primary);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.select { cursor: pointer; }
.select option { background: var(--bg-elevated); color: var(--text-primary); }

/* ============== 公共组件 - 卡片 ============== */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.2s;
}
.card:hover { border-color: var(--border-hover); }

/* ============== 公共组件 - 标签 ============== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700;
}
.badge.red { background: rgba(220, 38, 38, 0.12); color: var(--red-bright); }
.badge.green { background: rgba(34, 197, 94, 0.12); color: var(--green); }
.badge.yellow { background: rgba(250, 204, 21, 0.12); color: var(--yellow); }
.badge.muted { background: var(--border); color: var(--text-muted); }

/* ============== 公共组件 - Toast ============== */
.toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  z-index: 9999; padding: 12px 20px; border-radius: 12px;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.05);
  animation: toastSlideIn 0.25s ease, toastFadeOut 0.3s ease 2.4s forwards;
  max-width: min(90vw, 520px);
  display: flex; align-items: center; gap: 8px;
  text-align: center;
  pointer-events: auto;
}
.toast::before {
  content: ''; width: 18px; height: 18px; border-radius: 50%;
  background: currentColor; opacity: 0.2; flex-shrink: 0;
  display: inline-block;
}
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toastFadeOut {
  to { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}
.toast.success { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.4); color: var(--green); backdrop-filter: blur(8px); }
.toast.error   { background: rgba(220, 38, 38, 0.18); border: 1px solid rgba(220, 38, 38, 0.5);  color: var(--red-bright); backdrop-filter: blur(8px); }
.toast.info    { background: var(--bg-elevated);       border: 1px solid var(--border);         color: var(--text-primary); backdrop-filter: blur(8px); }

/* ============== 全局 Toast (window.showToast) ============== */
.ym-global-toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%) translateY(-20px);
  z-index: 10000; padding: 12px 20px; border-radius: 12px;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.05);
  max-width: min(90vw, 520px);
  display: flex; align-items: center; gap: 10px;
  text-align: left;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(8px);
}
.ym-global-toast.ym-toast-show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.ym-global-toast .ym-toast-icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.ym-global-toast .ym-toast-msg { flex: 1; }
.ym-global-toast.ym-toast-success { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.4); color: #4ADE80; }
.ym-global-toast.ym-toast-success .ym-toast-icon { background: rgba(74, 222, 128, 0.25); color: #4ADE80; }
.ym-global-toast.ym-toast-error   { background: rgba(220, 38, 38, 0.18); border: 1px solid rgba(220, 38, 38, 0.5); color: var(--red-bright); }
.ym-global-toast.ym-toast-error .ym-toast-icon   { background: rgba(220, 38, 38, 0.3); color: #fff; }
.ym-global-toast.ym-toast-warning  { background: rgba(252, 211, 77, 0.12); border: 1px solid rgba(252, 211, 77, 0.4); color: #fcd34d; }
.ym-global-toast.ym-toast-warning .ym-toast-icon { background: rgba(252, 211, 77, 0.25); color: #fcd34d; }
.ym-global-toast.ym-toast-info     { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-primary); }
.ym-global-toast.ym-toast-info .ym-toast-icon    { background: rgba(255, 255, 255, 0.1); color: var(--text-secondary); }

/* ============== 公共组件 - 弹窗 (uiConfirm / uiPrompt) ============== */
.ym-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; backdrop-filter: blur(4px);
  animation: ym-modal-fade .15s ease-out;
}
@keyframes ym-modal-fade { from { opacity: 0; } to { opacity: 1; } }
.ym-modal {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px; max-width: 420px; width: calc(100% - 32px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: ym-modal-scale .18s cubic-bezier(.2,.7,.3,1.2);
}
@keyframes ym-modal-scale { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ym-modal-title { font-family: var(--font-display); font-weight: 800; font-size: 16px; margin-bottom: 10px; color: var(--text-primary); }
.ym-modal-body { font-size: 13px; color: var(--text-secondary); margin-bottom: 18px; line-height: 1.6; white-space: pre-wrap; }
.ym-modal-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.ym-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.ym-textarea { width: 100%; background: var(--bg-base); border: 1px solid var(--border); color: var(--text-primary);
  border-radius: 8px; padding: 10px 12px; font-family: inherit; font-size: 13px; outline: none; resize: vertical; }
.ym-textarea:focus { border-color: var(--border-hover); }
.ym-btn { padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: .15s; font-family: inherit; }
.ym-btn-primary { background: var(--red-primary); color: white; }
.ym-btn-primary:hover { background: var(--red-bright); }
.ym-btn-danger { background: rgba(220,38,38,0.15); color: var(--red-bright); border: 1px solid rgba(220,38,38,0.4); }
.ym-btn-danger:hover { background: rgba(220,38,38,0.25); }
.ym-btn-dark { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border); }
.ym-btn-dark:hover { background: var(--bg-card-hover); color: var(--text-primary); }
@media (max-width: 480px) {
  .ym-modal { padding: 18px; }
  .ym-modal-actions .ym-btn { flex: 1; }
}

/* ============== 公共组件 - Empty State ============== */
.empty-state {
  text-align: center; padding: 80px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 56px; display: block; margin-bottom: 16px; opacity: 0.5; }
.empty-state .title { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.empty-state .desc { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.empty-state a { color: var(--red-bright); font-size: 14px; font-weight: 600; text-decoration: none; }
.empty-state a:hover { text-decoration: underline; }

/* ============== 公共组件 - Skeleton ============== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--border) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ============== 公共组件 - Eyebrow ============== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; color: var(--red-bright);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.eyebrow::before, .eyebrow::after { content: ''; width: 24px; height: 1px; background: var(--red-bright); }

/* ============== 公共组件 - Glow Text ============== */
.glow {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 50%, #7F1D1D 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; filter: drop-shadow(0 0 24px rgba(220, 38, 38, 0.4));
}

/* ============== 工具类 ============== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }

/* ============== 公共组件 - Navbar (sticky) ============== */
.navbar {
  position: sticky; top: 0; z-index: 50;
  height: 64px; padding: 0 32px;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.navbar .nav-brand { font-size: 18px; }
.navbar .nav-back {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);
  text-decoration: none; padding: 8px 16px; border: 1px solid var(--border);
  border-radius: 8px; transition: .2s; cursor: pointer; background: none;
}
.navbar .nav-back:hover { color: var(--red-bright); border-color: var(--border-hover); }
@media (max-width: 640px) {
  .navbar { padding: 0 16px; }
  .navbar .nav-back { padding: 6px 12px; font-size: 11px; }
}

/* ============== 公共组件 - Container ============== */
.container { max-width: 1080px; margin: 0 auto; padding: 56px 24px 80px; position: relative; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 56px 24px 80px; position: relative; }

/* ============== 公共组件 - 统一 Hero (与首页一致) ============== */
.yn-hero {
  position: relative;
  /* 不限制 max-width，让 ::before 光晕铺满全宽；内容由子元素 max-width 限制 */
  padding: 64px 24px 48px;
  text-align: center;
  overflow: visible;
}
.yn-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 800px 400px at 20% 0%, rgba(220, 38, 38, 0.12), transparent 60%),
    radial-gradient(ellipse 600px 300px at 80% 50%, rgba(220, 38, 38, 0.08), transparent 60%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
}
.yn-hero > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.yn-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 880px;
  margin: 16px auto 14px;
}
.yn-hero h1 .glow {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 50%, #7F1D1D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 16px rgba(220, 38, 38, 0.35));
}
.yn-hero p.yn-sub {
  font-size: clamp(14px, 1.3vw, 16px);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 24px;
  line-height: 1.7;
}
.yn-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: var(--red-soft);
  padding: 6px 14px; border: 1px solid var(--border-hover); border-radius: 999px;
  background: rgba(220, 38, 38, 0.08);
  letter-spacing: 0.05em;
}
.yn-hero .eyebrow .blink {
  width: 6px; height: 6px; border-radius: 50%; background: var(--red-bright);
  animation: yn-blink 1.2s ease-in-out infinite;
}
@keyframes yn-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

/* 紧凑型 hero（次级页面用，padding 较小） */
.yn-hero.yn-hero-sm { padding: 40px 24px 32px; }
.yn-hero.yn-hero-sm h1 { font-size: clamp(26px, 3.5vw, 38px); margin: 12px auto 10px; }
.yn-hero.yn-hero-sm p.yn-sub { font-size: 14px; margin-bottom: 16px; }

/* ============== 兼容旧 .page-head，与 .yn-hero 风格一致 ============== */
.page-head {
  position: relative;
  /* 不限制 max-width，让 ::before 光晕铺满全宽；内容由子元素 max-width 限制 */
  padding: 48px 24px 28px;
  text-align: center;
  overflow: visible;
}
.page-head::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 800px 400px at 20% 0%, rgba(220, 38, 38, 0.10), transparent 60%),
    radial-gradient(ellipse 600px 300px at 80% 50%, rgba(220, 38, 38, 0.06), transparent 60%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
}
.page-head > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.page-head .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: var(--red-soft);
  padding: 6px 14px; border: 1px solid var(--border-hover); border-radius: 999px;
  background: rgba(220, 38, 38, 0.08);
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.page-head .eyebrow .blink {
  width: 6px; height: 6px; border-radius: 50%; background: var(--red-bright);
  animation: yn-blink 1.2s ease-in-out infinite;
}
.page-head h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  max-width: 880px;
  margin: 0 auto 12px;
}
.page-head h1 .glow {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 50%, #7F1D1D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 16px rgba(220, 38, 38, 0.35));
}
.page-head p {
  font-size: clamp(13px, 1.2vw, 15px);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}


/* ============== 公共组件 - 滚动容器 ============== */
.scroll-x { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.scroll-x::-webkit-scrollbar { height: 6px; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ============== 公共组件 - Hover Lift ============== */
.hover-lift { transition: transform 0.2s, box-shadow 0.2s; }
.hover-lift:hover { transform: translateY(-2px); box-shadow: var(--red-glow-sm); }

/* ============== 公共组件 - Section ============== */
.section { padding: 60px 24px; }
.section-sm { padding: 40px 24px; }

/* ============== 公共组件 - 状态徽章 ============== */
.status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700;
}
.status-pill.active { background: rgba(34, 197, 94, 0.12); color: var(--green); }
.status-pill.active::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-pill.pending { background: rgba(250, 204, 21, 0.12); color: var(--yellow); }
.status-pill.processing { background: rgba(220, 38, 38, 0.12); color: var(--red-bright); animation: pulse-red 1.5s infinite; }
.status-pill.completed { background: rgba(34, 197, 94, 0.12); color: var(--green); }
.status-pill.failed { background: rgba(220, 38, 38, 0.12); color: var(--red-bright); }
.status-pill.muted { background: var(--border); color: var(--text-muted); }

/* ============== 公共组件 - Loading 旋转 ============== */
.spin { animation: spin 1s linear infinite; display: inline-block; }

/* ============== 公共组件 - 移动菜单 ============== */
.mobile-menu-btn { display: none; background: transparent; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; color: var(--text-primary); font-size: 16px; cursor: pointer; }
@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .nav-links-desktop { display: none; }
}

/* ============== 公共组件 - Glass Card ============== */
.glass {
  background: rgba(19, 19, 22, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
}

/* ============== 公共组件 - 渐变文字 ============== */
.text-gradient-red {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 50%, #7F1D1D 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============== 公共组件 - 强调数字 ============== */
.num-large {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ============== 公共组件 - Section Title ============== */
.section-title {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 8px;
}
.section-sub { font-size: 14px; color: var(--text-muted); }

/* ============== 公共组件 - Stat Card ============== */
.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  transition: all 0.2s;
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--red-glow-sm); }
.stat-card .lbl { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.stat-card .num { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-card .sub { font-size: 12px; color: var(--text-muted); margin-top: 6px; font-family: var(--font-mono); }
.stat-card.red .num { color: var(--red-bright); }
.stat-card.green .num { color: var(--green); }
.stat-card.yellow .num { color: var(--yellow); }

/* ============== MCP 指南页专用（全局，避免 scoped 编译问题） ============== */
.mcp-body { max-width: 1080px; margin: 0 auto; padding: 24px 24px 80px; color: var(--text-secondary); }
.mcp-body h1 { color: #DC2626; font-size: 32px; margin-bottom: 8px; }
.mcp-body h2 { color: #EF4444; font-size: 22px; margin: 32px 0 12px; border-left: 4px solid #DC2626; padding-left: 12px; }
.mcp-body h3 { color: #FCA5A5; font-size: 16px; margin: 20px 0 8px; }
.mcp-body p, .mcp-body li { color: #A1A1AA; font-size: 14px; margin: 8px 0; line-height: 1.7; }
.mcp-body code, .mcp-body pre { font-family: "SF Mono", "Monaco", monospace; }
.mcp-body code { background: rgba(220, 38, 38, 0.15); padding: 2px 6px; border-radius: 4px; color: #EF4444; font-size: 13px; }
.mcp-body pre { background: #131316; border: 1px solid rgba(220, 38, 38, 0.3); padding: 16px; border-radius: 8px; overflow-x: auto; margin: 12px 0; font-size: 13px; color: #FAFAFA; }
.mcp-body pre code { background: none; padding: 0; color: #FAFAFA; }
.mcp-body .card { background: #131316; border: 1px solid rgba(220, 38, 38, 0.2); border-radius: 12px; padding: 20px; margin: 16px 0; }
.mcp-body .badge { display: inline-block; background: rgba(220, 38, 38, 0.2); color: #EF4444; padding: 2px 10px; border-radius: 12px; font-size: 12px; margin-right: 6px; }
.mcp-body ol { counter-reset: mcp-step; padding-left: 0; list-style: none; }
.mcp-body .step { counter-increment: mcp-step; padding: 12px 0 12px 36px; position: relative; }
.mcp-body .step::before { content: counter(mcp-step); position: absolute; left: 0; top: 12px; width: 24px; height: 24px; background: linear-gradient(135deg, #DC2626, #7F1D1D); color: #fff; border-radius: 50%; text-align: center; line-height: 24px; font-weight: bold; font-size: 13px; }
.mcp-body a { color: #EF4444; text-decoration: none; }
.mcp-body a:hover { text-decoration: underline; }
.mcp-body table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.mcp-body table th, .mcp-body table td { padding: 10px; text-align: left; border-bottom: 1px solid rgba(220, 38, 38, 0.2); font-size: 13px; }
.mcp-body table th { color: #EF4444; font-weight: 600; }
.mcp-body .highlight { background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(91, 33, 182, 0.1)); border: 1px solid rgba(220, 38, 38, 0.3); padding: 16px; border-radius: 8px; margin: 12px 0; }
.mcp-body .api-banner { background: rgba(220, 38, 38, 0.12); border: 1px solid rgba(220, 38, 38, 0.3); border-radius: 8px; padding: 12px 16px; margin: 12px 0; font-size: 13px; color: #FCA5A5; }
.mcp-body .api-banner code { background: rgba(255, 255, 255, 0.06); }

/* 5 分钟快速接入区 */
.mcp-body .quickstart { background: linear-gradient(135deg, rgba(220, 38, 38, 0.18), rgba(91, 33, 182, 0.12)); border: 1px solid rgba(220, 38, 38, 0.4); border-radius: 12px; padding: 24px; margin: 24px 0; }
.mcp-body .quickstart h2 { color: #EF4444; border-left: none; padding-left: 0; margin-top: 0; }
.mcp-body .quickstart-steps { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.mcp-body .qs-step { display: flex; gap: 14px; align-items: flex-start; }
.mcp-body .qs-num { flex-shrink: 0; width: 28px; height: 28px; background: linear-gradient(135deg, #DC2626, #7F1D1D); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 13px; }
.mcp-body .qs-body { flex: 1; }
.mcp-body .qs-title { color: #FAFAFA; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.mcp-body .qs-desc { color: #A1A1AA; font-size: 13px; line-height: 1.6; }
.mcp-body .qs-desc code { background: rgba(220, 38, 38, 0.2); color: #FCA5A5; }
.mcp-body .quickstart-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; justify-content: flex-start; }
.mcp-body .btn-qs { display: inline-block; padding: 8px 16px; background: rgba(220, 38, 38, 0.15); color: #EF4444; border: 1px solid rgba(220, 38, 38, 0.3); border-radius: 6px; cursor: pointer; font-size: 13px; text-decoration: none; transition: all 0.2s; }
.mcp-body .btn-qs:hover { background: rgba(220, 38, 38, 0.25); text-decoration: none; }
.mcp-body .btn-qs-primary { background: linear-gradient(135deg, #DC2626, #7F1D1D); color: #fff; border: none; }
.mcp-body .btn-qs-primary:hover { opacity: 0.9; }
.mcp-body .quickstart-tip { margin-top: 16px; padding: 12px 14px; background: rgba(0, 0, 0, 0.2); border-left: 3px solid #DC2626; border-radius: 4px; font-size: 13px; color: #FCA5A5; line-height: 1.7; }
.mcp-body .quickstart-tip a { color: #EF4444; }


/* ===== Discover 页面动态元素样式（动态 innerHTML 生成，必须在全局 CSS） ===== */
  .search-bar {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 6px 6px 6px 20px;
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 24px;
    transition: border-color .2s, box-shadow .2s;
  }
  .search-bar:focus-within {
    border-color: var(--border-hover);
    box-shadow: var(--red-glow-sm);
  }
  .search-bar .icon { font-size: 18px; color: var(--text-muted); }
  .search-bar input {
    flex: 1; background: transparent; border: none; outline: none;
    color: var(--text-primary); font-size: 15px; font-family: inherit;
  }
  .search-bar input::placeholder { color: var(--text-muted); }
  .search-bar .search-clear { display: none; background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 4px 6px; font-size: 14px; }
  .search-bar .search-clear:hover { color: var(--red-bright); }
  .search-bar .search-clear.show { display: inline-block; }
  .search-bar button {
    background: var(--red-primary); color: white;
    padding: 10px 24px; border-radius: 10px;
    font-size: 14px; font-weight: 600;
    transition: all .2s;
  }
  .search-bar button:hover { background: var(--red-bright); }

  /* ===== 筛选区 ===== */
  .filter-section {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
    margin-bottom: 32px;
  }
  .filter-label {
    font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.05em; margin-right: 4px;
  }
  .filter-chip {
    padding: 6px 14px; border-radius: 99px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 12px; font-weight: 500;
    cursor: pointer; transition: all .2s;
  }
  .filter-chip:hover { border-color: var(--border-hover); color: var(--text-primary); }
  .filter-chip.active {
    background: rgba(220, 38, 38, 0.15);
    border-color: var(--red-primary); color: var(--red-bright);
  }
  .filter-divider {
    width: 1px; height: 20px; background: var(--border); margin: 0 4px;
  }

  /* ===== AI员工网格 ===== */
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
  }
  .agent-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px; padding: 24px;
    transition: all .25s; cursor: pointer;
    position: relative; overflow: hidden;
    animation: fadeUp .5s ease backwards;
  }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
  .agent-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--red-glow);
  }
  .agent-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--red-primary), transparent);
    opacity: 0; transition: opacity .3s;
  }
  .agent-card:hover::before { opacity: 1; }

  .agent-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
  .agent-avatar {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; line-height: 1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25); flex-shrink: 0;
  }
  .agent-info { flex: 1; min-width: 0; }
  .agent-name {
    font-family: var(--font-display); font-weight: 700; font-size: 16px;
    color: var(--text-primary); margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
  }
  .agent-creator { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
  .agent-follow-btn {
    display: inline-flex; align-items: center; gap: 3px;
    margin-left: 6px; padding: 2px 8px; border-radius: 6px;
    background: rgba(220, 38, 38, 0.12); color: var(--red-bright);
    font-size: 10px; font-weight: 600; cursor: pointer;
    border: 1px solid rgba(220, 38, 38, 0.3);
    transition: all .2s; vertical-align: middle;
  }
  .agent-follow-btn:hover { background: rgba(220, 38, 38, 0.25); border-color: var(--red-primary); }
  .agent-follow-btn.following { background: var(--border); color: var(--text-muted); border-color: transparent; }
  .agent-status {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 99px;
    font-size: 10px; font-weight: 700;
  }
  .status-active { background: rgba(34, 197, 94, 0.12); color: #4ADE80; }
  .status-active::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 6px #4ADE80; }

  .agent-desc {
    font-size: 13px; color: var(--text-secondary);
    line-height: 1.65; margin-bottom: 16px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 42px;
  }
  .agent-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; min-height: 24px; }
  .tag {
    padding: 3px 10px; border-radius: 6px;
    background: rgba(220, 38, 38, 0.1); color: var(--red-bright);
    font-size: 11px; font-weight: 600;
  }
  .tag-gray { background: var(--border); color: var(--text-muted); }

  .agent-foot {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 16px; border-top: 1px solid var(--border);
  }
  .agent-price {
    font-family: var(--font-display); font-weight: 800;
    font-size: 20px; color: var(--red-bright);
  }
  .agent-price .unit { font-size: 11px; color: var(--text-muted); font-weight: 400; margin-left: 2px; }
  .agent-meta { display: flex; gap: 12px; font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
  .agent-meta span { display: flex; align-items: center; gap: 3px; }

  .agent-cta {
    width: 100%; margin-top: 14px;
    background: var(--red-primary); color: white;
    padding: 10px; border-radius: 10px;
    font-size: 13px; font-weight: 700;
    transition: all .2s; box-shadow: var(--red-glow-sm);
  }
  .agent-cta:hover { background: var(--red-bright); box-shadow: var(--red-glow); }

  /* ===== 空状态 ===== */
  .empty {
    text-align: center; padding: 80px 20px;
    background: var(--bg-elevated);
    border: 1px dashed var(--border);
    border-radius: 16px;
  }
  .empty-icon { font-size: 56px; margin-bottom: 16px; opacity: .5; }
  .empty-text { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }
  .empty-cta {
    display: inline-block; padding: 10px 24px;
    background: var(--red-primary); color: white;
    border-radius: 8px; font-size: 13px; font-weight: 600;
    transition: all .2s;
  }
  .empty-cta:hover { background: var(--red-bright); }

  /* ===== 加载 ===== */
  .skeleton {
    background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--border) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
  }
  @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
  .skel-card {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: 16px; padding: 24px; height: 240px;
  }

  /* ===== 排序 ===== */
  .toolbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
  }
  .result-info { font-size: 13px; color: var(--text-muted); font-family: var(--font-mono); }
  .result-info strong { color: var(--red-bright); }
  .sort-pick {
    display: flex; gap: 6px; align-items: center;
    font-size: 12px; color: var(--text-muted);
  }
  .sort-pick select {
    background: var(--bg-elevated); border: 1px solid var(--border);
    color: var(--text-primary); padding: 6px 12px;
    border-radius: 8px; font-size: 12px; font-family: var(--font-body);
    outline: none; cursor: pointer;
  }
  .sort-pick select:hover { border-color: var(--border-hover); }

  /* ===== RAG 搜索状态条 ===== */
  .rag-status {
    grid-column: 1 / -1;
    background: linear-gradient(90deg, rgba(239,68,68,0.08), rgba(239,68,68,0.02));
    border: 1px solid rgba(239,68,68,0.3);
    color: var(--text-secondary);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 4px;
  }
  .rag-status strong { color: var(--red-bright); }

  /* ===== 卡片内 RAG 匹配 ===== */
  .rag-match {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    margin: 6px 0 4px;
  }
  .rag-score-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
  }
  .rag-score-fill {
    height: 100%;
    transition: width 0.3s;
  }
  .rag-score-label {
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
  }
  .rag-snippet {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
    font-style: italic;
    max-height: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ===== 响应式 ===== */
  @media (max-width: 768px) {
    
    .container { padding: 0 16px; }
    .grid { grid-template-columns: 1fr; }
    .filter-section { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
    .filter-chip { white-space: nowrap; }
  }

/* 弹窗样式（discover 页面用） */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 999; }
.modal-mask.open { display: flex; }
.modal-box { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 16px; width: 92%; max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-title { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 15px; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 24px; cursor: pointer; line-height: 1; padding: 0 8px; }
.modal-close:hover { color: var(--text-primary); }
.modal-foot { padding: 16px 20px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; margin-bottom: 6px; font-size: 13px; }
.form-textarea {
  width: 100%; min-height: 90px;
  background: var(--bg-base); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; line-height: 1.6;
  font-family: inherit; resize: vertical;
  outline: none; transition: border-color .15s;
}
.form-textarea:focus { border-color: var(--red-primary); }
.btn { padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: .2s; border: 1px solid transparent; }
.btn-primary { background: var(--red-primary); color: white; }
.btn-primary:hover { background: var(--red-bright); }
.btn-primary:disabled { opacity: .5; cursor: wait; }
.btn-ghost { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,.04); color: var(--text-primary); }

/* ===== Skill Manifest 详情弹窗 ===== */
.manifest-section { margin-bottom: 20px; }
.manifest-section-title {
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  color: var(--red-bright); text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.manifest-section-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.manifest-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.manifest-field {
  background: var(--bg-base); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
}
.manifest-field.full { grid-column: 1 / -1; }
.manifest-field-label {
  font-size: 11px; color: var(--text-muted); font-family: var(--font-mono);
  margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em;
}
.manifest-field-value {
  font-size: 13px; color: var(--text-primary); font-weight: 500;
  word-break: break-all;
}
.manifest-field-value.mono { font-family: var(--font-mono); font-size: 12px; }
.manifest-field-value.bool-yes { color: #4ADE80; }
.manifest-field-value.bool-no { color: var(--text-muted); }
.manifest-tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: rgba(220,38,38,0.12); color: var(--red-bright);
  font-size: 11px; font-weight: 600; margin: 2px 2px;
}
.manifest-example {
  background: var(--bg-base); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; margin-top: 6px;
  font-size: 12px; color: var(--text-secondary); line-height: 1.5;
  font-family: var(--font-mono); white-space: pre-wrap; word-break: break-all;
}
.manifest-versions-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  background: rgba(220,38,38,0.1); border: 1px solid rgba(220,38,38,0.3);
  color: var(--red-bright); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.manifest-versions-btn:hover { background: rgba(220,38,38,0.2); border-color: var(--red-primary); }
.manifest-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 60px 20px; color: var(--text-muted); font-size: 14px; gap: 8px;
}
.manifest-loading .spinner {
  width: 20px; height: 20px; border: 2px solid var(--border);
  border-top-color: var(--red-primary); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.versions-list { margin-top: 8px; }
.version-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: var(--bg-base);
  border: 1px solid var(--border); border-radius: 6px;
  margin-bottom: 4px; font-size: 12px;
}
.version-item .v-tag { font-family: var(--font-mono); color: var(--red-bright); font-weight: 600; }
.version-item .v-date { color: var(--text-muted); font-family: var(--font-mono); }

/* ============== Orders Page ============== */
.orders-page .stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.orders-page .stat-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px;
  transition: all 0.2s;
}
.orders-page .stat-card:hover { border-color: var(--border-hover); }
.orders-page .stat-card .lbl { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.orders-page .stat-card .num { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1; }
.orders-page .stat-card .num.red { color: var(--red-bright); }
.orders-page .stat-card .num.green { color: var(--green); }
.orders-page .stat-card .num.yellow { color: var(--yellow); }
@media (max-width: 1024px) {
  .orders-page .stats-row { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .orders-page .stat-card { padding: 18px; }
  .orders-page .stat-card .num { font-size: 22px; }
}
@media (max-width: 768px) { .orders-page .stats-row { grid-template-columns: repeat(2, 1fr); } }

.orders-page .toolbar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 20px;
}
.orders-page .tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.orders-page .tab {
  padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; transition: all 0.15s;
  background: transparent; border: none;
}
.orders-page .tab:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.04); }
.orders-page .tab.active { background: var(--red-primary); color: white; box-shadow: var(--red-glow-sm); }
.orders-page .tab .count {
  display: inline-block; margin-left: 4px; padding: 1px 6px;
  background: rgba(255, 255, 255, 0.15); border-radius: 99px; font-size: 11px;
}
.orders-page .search-input {
  background: var(--bg-base); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 12px; color: var(--text-primary);
  font-size: 13px; outline: none; min-width: 180px;
}
.orders-page .search-input:focus { border-color: var(--red-primary); }

.orders-page .order-list { display: flex; flex-direction: column; gap: 12px; }
.orders-page .order-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 24px;
  transition: all 0.2s; cursor: pointer;
  animation: fadeUp 0.4s ease;
}
.orders-page .order-card:hover { border-color: var(--border-hover); transform: translateY(-1px); box-shadow: var(--red-glow-sm); }
.orders-page .order-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
}
.orders-page .order-id { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.orders-page .status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700;
}
.orders-page .status-pending { background: rgba(250, 204, 21, 0.12); color: var(--yellow); }
.orders-page .status-pending::before { content: '⏳'; }
.orders-page .status-processing { background: rgba(220, 38, 38, 0.12); color: var(--red-bright); }
.orders-page .status-processing::before { content: '⚙️'; animation: spin 2s linear infinite; display: inline-block; }
.orders-page .status-reviewing { background: rgba(168, 85, 247, 0.12); color: #C084FC; }
.orders-page .status-reviewing::before { content: '🔍'; }
.orders-page .status-completed { background: rgba(34, 197, 94, 0.12); color: var(--green); }
.orders-page .status-completed::before { content: '✓'; }
.orders-page .status-reworking { background: rgba(250, 204, 21, 0.12); color: var(--yellow); }
.orders-page .status-reworking::before { content: '🔄'; }
.orders-page .status-refunded { background: rgba(220, 38, 38, 0.12); color: var(--red-bright); }
.orders-page .status-refunded::before { content: '↩'; }
.orders-page .status-failed { background: rgba(220, 38, 38, 0.12); color: var(--red-bright); }
.orders-page .status-failed::before { content: '✕'; }

.orders-page .order-body { display: flex; gap: 16px; align-items: flex-start; }
.orders-page .order-info { flex: 1; min-width: 0; }
.orders-page .order-agent {
  font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.orders-page .order-req {
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 8px;
}
.orders-page .order-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); flex-wrap: wrap; }
.orders-page .order-meta span::before { margin-right: 4px; }
.orders-page .order-time::before { content: '🕐'; }
.orders-page .order-price::before { content: '💰'; }

.orders-page .order-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.orders-page .order-price-big {
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  color: var(--red-bright); margin-right: 8px;
}
.orders-page .order-btn {
  padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
  background: rgba(220, 38, 38, 0.1); color: var(--red-bright);
  border: 1px solid rgba(220, 38, 38, 0.3);
  text-decoration: none; transition: all 0.15s;
}
.orders-page .order-btn:hover { background: var(--red-primary); color: white; }
.orders-page .order-btn.ghost { background: var(--bg-base); color: var(--text-secondary); border-color: var(--border); }
.orders-page .order-btn.ghost:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); }

.orders-page .order-progress {
  margin-top: 12px; height: 4px; background: var(--bg-base); border-radius: 2px; overflow: hidden;
}
.orders-page .order-progress-bar {
  height: 100%; background: linear-gradient(90deg, var(--red-primary), var(--red-bright));
  border-radius: 2px; transition: width 0.6s ease;
}

.orders-page .loading { text-align: center; padding: 60px; color: var(--text-muted); }
.orders-page .loading-spinner {
  display: inline-block; width: 32px; height: 32px;
  border: 3px solid var(--border); border-top-color: var(--red-primary);
  border-radius: 50%; animation: spin 1s linear infinite;
}

@media (max-width: 768px) {
  .orders-page .order-card { padding: 16px; }
  .orders-page .order-body { flex-direction: column; gap: 12px; }
  .orders-page .order-actions {
    width: 100%; justify-content: space-between;
    flex-direction: row; align-items: center;
    padding-top: 12px; border-top: 1px solid var(--border);
  }
  .orders-page .order-price-big { font-size: 18px; margin-right: 0; }
  .orders-page .order-agent { font-size: 14px; }
  .orders-page .order-req { font-size: 12px; }
  .orders-page .order-id { font-size: 11px; }
}
