/* ─────────────────────────────────────────────────────────────────────────
 * ssui.fun portal — tokens + style（暗色高级感版）
 *
 * 设计来源：学习 ximo888ok-netizen/ximo-Agent 的 Apple / Stripe / Arc / Binance
 * 设计系统后，提炼出这套可直接用于暗色门户的 token。
 * 已保留原站结构，只改变量和通用样式，卡片/列表仍可继续用你现有 HTML。
 * ─────────────────────────────────────────────────────────────────── */

@import url("tokens-ssui.css");

:root {
  /* ─── 暗色高级感覆写 ──────────────────────────────────────────────
   * 保持原站暗色基底，但把纯黑换成深蓝黑，减少 OLED 刺眼，
   * 同时让紫色主色更稳。 */

  /* 主色保留双色：紫是品牌，荧光绿是功能强调 */
  --accent:       #8b5cf6;
  --accent-2:     #a78bfa;
  --accent-on:    #ffffff;
  --accent-hover: #7c3aed;
  --accent-active:#6d28d9;
  --accent-dim:   rgba(139,92,246,.12);
  --accent-glow:  rgba(139,92,246,.25);

  /* 暗色表面：不用纯黑，用带蓝的深灰；层级靠透明度拉开 */
  --bg:           #0b0f14;
  --bg-elevated:  #111620;
  --panel:        rgba(255,255,255,.035);
  --panel-hover:  rgba(255,255,255,.065);

  /* 文字：冷暖中性灰，正文偏冷，弱化信息偏灰紫 */
  --ink:              #e8eaf0;
  --ink-secondary:    #9aa0b0;
  --muted:            #6b7280;
  --meta:             var(--muted);

  /* 描边：轻、冷、不抢内容 */
  --line:        rgba(255,255,255,.07);
  --line-strong: rgba(255,255,255,.12);
  --border:      var(--line);
  --border-soft: var(--line);
  --border-strong: var(--line-strong);

  /* 语义色：保留你原站语义，但降低刺眼度 */
  --success: #10b981;
  --warn:    #f59e0b;
  --danger:  #ef4444;

  /* 功能绿：只做强调，不抢主色 */
  --green: #8fcfb4;
  --red:   #f47067;

  /* 字体：中文优先，再回退系统 sans */
  --font-body: "Noto Sans SC", "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  /* 字号：正文 15px，更透气；标题不蹦太狠 */
  --text-xs:    12px;
  --text-sm:    14px;
  --text-base:  15px;
  --text-lg:    17px;
  --text-xl:    20px;
  --text-2xl:   26px;
  --text-3xl:   36px;
  --text-4xl:   44px;

  /* 行高：正文略松，标题收紧 */
  --leading-body:   1.55;
  --leading-tight:  1.15;
  --tracking-display:-0.01em;

  /* 间距：保留 4px 基准，但主容器留白加大，显得贵 */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-12: 48px;

  --section-y-desktop: 80px;
  --section-y-tablet:  56px;
  --section-y-phone:   40px;

  /* 圆角：统一 14px，卡片/图标一致 */
  --radius-sm:   10px;
  --radius-md:   14px;
  --radius-lg:   18px;
  --radius-pill: 9999px;

  /* 阴影：暗色页面里用“带色的微光”，不要纯黑阴影 */
  --elev-flat:   none;
  --elev-ring:   0 0 0 1px var(--border);
  --elev-raised: 0 10px 30px rgba(0,0,0,.35), 0 0 0 1px rgba(139,92,246,.08);

  /* Focus：可用性优先，保证清晰 */
  --focus-ring: 0 0 0 3px rgba(139,92,246,.45);

  /* 动效：快而稳，不弹 */
  --motion-fast:   150ms;
  --motion-base:   200ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  /* 布局：内容宽度控制好，留白显高级 */
  --container-max: 720px;
  --container-gutter-desktop: 32px;
  --container-gutter-tablet:  24px;
  --container-gutter-phone:   16px;
}

/* ─── 全局重置 ─────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scrollbar-color: transparent transparent;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 25% 0%, rgba(139,92,246,.18), transparent 60%),
    radial-gradient(circle at 75% 0%, rgba(79,70,229,.14), transparent 55%),
    linear-gradient(to bottom, rgba(139,92,246,.08) 0%, transparent 35%, var(--bg) 35%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
  line-height: var(--leading-body);
}

/* ─── 头部 ─────────────────────────────────────────────────────────── */
.header {
  padding: 56px 24px 36px;
  text-align: center;
  position: relative;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  box-shadow:
    0 10px 28px rgba(139,92,246,.28),
    0 0 0 1px rgba(139,92,246,.18);
}

.logo-text {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--ink);
}

.logo-host {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: .5px;
}

.clock {
  font-size: 13px;
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  letter-spacing: .3px;
  margin-top: 10px;
}

.clock b {
  color: var(--accent);
  font-weight: 600;
}

/* ─── 主容器 ───────────────────────────────────────────────────────── */
main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-gutter-desktop) 56px;
}

/* ─── 服务列表 ─────────────────────────────────────────────────────── */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition:
    background var(--motion-base) var(--ease-standard),
    border-color var(--motion-base) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-base) var(--ease-standard);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.service-item:hover {
  background: var(--panel-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--elev-raised);
}

.service-item:active {
  transform: translateY(0);
}

/* 图标：轻描边 + 品牌微光，不要重色块 */
.service-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  box-shadow: 0 0 18px rgba(139,92,246,.08);
}

.service-body {
  flex: 1;
  min-width: 0;
}

.service-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 2px;
}

.service-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.service-host {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: .3px;
  white-space: nowrap;
}

.service-arrow {
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: color var(--motion-base) var(--ease-standard), transform var(--motion-base) var(--ease-standard);
  flex-shrink: 0;
}

.service-item:hover .service-arrow {
  color: var(--accent);
  transform: translateX(2px);
}

/* ─── 底部 ─────────────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 28px 20px 44px;
  color: var(--muted);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: .4px;
}

.loading,
.empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--muted);
  font-size: 13px;
}

/* ─── 响应式 ───────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .header {
    padding: 44px 16px 28px;
  }
  main {
    padding: 0 14px 40px;
  }
  .service-item {
    padding: 14px;
    gap: 12px;
  }
  .service-icon {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
  .service-title {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-item,
  .service-arrow {
    transition: none;
  }
}
