/* ==========================================================================
   FurryBox — 设计系统
   --------------------------------------------------------------------------
   参考 yunamo.com 的设计语言（不是照抄配色，而是同一套做法）：
     · 深黑实色底 + 实色卡片分层，不用半透明玻璃
     · 1px 极细描边，靠 line 色区分层次
     · 单一强调色（薄荷绿），不用渐变
     · 等宽字体用于域名与数值
     · 圆角分层：10 / 16 / 20

   三个站点（www / id / my）共用。
   ========================================================================== */

/* 字体：Geist / Geist Mono 本地自托管（latin 子集，可变字体）
   Space Grotesk 只用于品牌字 FurryBox
   中文回落到系统字体，不加载中文字体文件 */
/* Geist / Geist Mono — latin 子集，本地自托管（可变字体，单文件覆盖全部字重） */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/Geist-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/Geist-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/GeistMono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/GeistMono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Space Grotesk — 品牌字，latin 子集，本地自托管（可变字体） */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/SpaceGrotesk-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/SpaceGrotesk-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


:root {
  /* ---- 底色与面 ---- */
  --bg: #0a0b0d;
  --surface: #111316;
  --surface-2: #1a1d21;
  --surface-3: #22262b;

  /* ---- 线 ---- */
  --line: #22262b;
  --line-strong: #2a2e35;

  /* ---- 文字 ---- */
  --text: #ededed;
  --muted: #9aa0a8;
  --faint: #6b7179;

  /* ---- 强调色 ---- */
  --mint: #3ee6b4;
  --mint-deep: #0b8f6a;
  --mint-text: #3ee6b4;
  --on-mint: #04110c;

  /* ---- 状态 ---- */
  --ok: #3ee6b4;
  --warn: #f2c14e;
  --danger: #ff5a52;
  --danger-text: #ff8a84;
  --info: #7ab8ff;

  /* ---- 圆角 ---- */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 20px;
  --r-pill: 9999px;
  --dot-rgb: 255 255 255;

  /* ---- 字体 ---- */
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC",
    system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo,
    Consolas, "PingFang SC", "Microsoft YaHei", monospace;
  /* 品牌字：几何感强，用于 FurryBox 字样 */
  --font-brand: "Space Grotesk", "Geist", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum" 1;
}

/* ---------------------------------------------------------------- 背景 */

/* yunamo 控制台几乎纯黑。这里用极淡的径向渐变，不抢内容。 */
.fbx-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 80% 50% at 50% -10%,
      rgba(62, 230, 180, 0.05),
      transparent 60%
    ),
    radial-gradient(
      ellipse 60% 40% at 90% 100%,
      rgba(122, 184, 255, 0.025),
      transparent 60%
    );
}

/* 噪点极轻，只让纯黑不发死 */
.fbx-noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- 外壳 */

.fbx-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(16px, 4vw, 40px) 40px;
}

/* ---------------------------------------------------------------- 顶栏 */

.fbx-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: none;
  height: 62px;
  border-bottom: 1px solid var(--line);
}

.fbx-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex: none;
  font-family: var(--font-brand);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1;
}

.fbx-brand b {
  font-weight: 700;
  color: var(--mint);
}

/* 右侧动作区：扁平，不用浮岛 */
.fbx-island {
  display: flex;
  align-items: center;
  gap: 2px;
}

.fbx-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.fbx-pill:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}

.fbx-pill svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.fbx-pill b {
  color: var(--mint-text);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 13px;
}

.fbx-island .fbx-sep {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 6px;
  flex: none;
}

/* ==========================================================================
   语言切换器
   --------------------------------------------------------------------------
   放在顶栏钱包胶囊左边。视觉上与 .fbx-pill 同一套（透明底 + hover 变面）。
   ========================================================================== */

.fbx-lang {
  position: relative;
  display: inline-flex;
  flex: none;
}

/* 各站给切换器预留的挂载点：本身不占空间，只作为定位容器 */
.nav-lang-slot,
.auth-lang-slot {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.fbx-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.fbx-lang-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}

.fbx-lang-btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

/* 下拉箭头比地球小一号 */
.fbx-lang-btn svg:last-of-type {
  width: 12px;
  height: 12px;
  opacity: 0.6;
  transition: transform 0.18s var(--ease-out, ease);
}

.fbx-lang-btn[aria-expanded="true"] svg:last-of-type {
  transform: rotate(180deg);
}

.fbx-lang-cur {
  font-size: 12.5px;
  font-weight: 500;
}

/* ---- 菜单 ---- */
.fbx-lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  min-width: 148px;
  padding: 5px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.5);
  animation: fbx-lang-in 0.14s ease both;
}

@keyframes fbx-lang-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fbx-lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.fbx-lang-item:hover {
  background: var(--surface-3);
  color: var(--text);
}

.fbx-lang-item.on {
  color: var(--mint-text);
}

.li-tick {
  font-size: 12px;
  color: var(--mint-text);
}

/* 窄屏只留图标，省空间 */
@media (max-width: 560px) {
  .fbx-lang-cur,
  .fbx-lang-btn svg:last-of-type {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fbx-lang-menu {
    animation: none;
  }
  .fbx-lang-btn svg:last-of-type {
    transition: none;
  }
}

.fbx-avatar {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--mint-text);
  border: 1px solid var(--line);
  flex: none;
}

/* ---------------------------------------------------------------- 按钮 */

.fbx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
}

.fbx-btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.fbx-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 主按钮 = yunamo 的 .y-btn-ink-block：反色白胶囊，不是薄荷绿实心 */
.fbx-btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
  border-radius: 9999px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.fbx-btn-primary:hover:not(:disabled) {
  background: #fff;
  border-color: transparent;
}

.fbx-btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.fbx-btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.fbx-btn-quiet {
  background: transparent;
  color: var(--muted);
  padding: 9px 11px;
}

.fbx-btn-quiet:hover:not(:disabled) {
  color: var(--text);
  background: var(--surface-2);
}

.fbx-btn-danger {
  background: transparent;
  color: var(--faint);
}

.fbx-btn-danger:hover:not(:disabled) {
  color: var(--danger-text);
  background: rgba(255, 90, 82, 0.08);
}

/* ---------------------------------------------------------------- 表单 */

.fbx-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.fbx-label {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.fbx-input,
.fbx-select {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.fbx-input::placeholder {
  color: var(--faint);
}

.fbx-input:focus,
.fbx-select:focus {
  border-color: var(--mint-deep);
  background: var(--surface);
}

.fbx-input.mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

.fbx-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%236b7179' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.fbx-select option {
  background: var(--surface-2);
  color: var(--text);
}

.fbx-hint {
  font-size: 12px;
  color: var(--faint);
  line-height: 1.55;
}

.fbx-hint.error {
  color: var(--danger-text);
}

.fbx-hint.ok {
  color: var(--mint-text);
}

/* ---------------------------------------------------------------- 状态 */

.fbx-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
}

.fbx-status .fbx-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}

.fbx-status.ok {
  color: var(--mint-text);
}
.fbx-status.ok .fbx-dot {
  background: var(--mint);
  box-shadow: 0 0 10px rgba(62, 230, 180, 0.7);
}

.fbx-status.warn {
  color: var(--warn);
}
.fbx-status.warn .fbx-dot {
  background: var(--warn);
  box-shadow: 0 0 10px rgba(242, 193, 78, 0.6);
}

.fbx-status.bad {
  color: var(--danger-text);
}
.fbx-status.bad .fbx-dot {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(255, 90, 82, 0.6);
}

/* ---------------------------------------------------------------- 面板 */

.fbx-panel {
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.fbx-tile {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

/* ---------------------------------------------------------------- 表格 */

.fbx-table {
  width: 100%;
  border-collapse: collapse;
}

.fbx-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.fbx-table thead th.r {
  text-align: right;
}

.fbx-table tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 13.5px;
}

.fbx-table tbody tr:last-child td {
  border-bottom: none;
}

.fbx-table tbody tr {
  transition: background 0.12s;
}

.fbx-table tbody tr:hover {
  background: var(--surface-2);
}

.fbx-table td.r {
  text-align: right;
}

/* ---------------------------------------------------------------- 提示条 */

.fbx-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid;
}

.fbx-alert svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 2px;
}

.fbx-alert.error {
  background: rgba(255, 90, 82, 0.07);
  border-color: rgba(255, 90, 82, 0.28);
  color: var(--danger-text);
}

.fbx-alert.ok {
  background: rgba(62, 230, 180, 0.06);
  border-color: rgba(62, 230, 180, 0.25);
  color: var(--mint-text);
}

.fbx-alert.info {
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted);
}

.fbx-alert.warn {
  background: rgba(242, 193, 78, 0.06);
  border-color: rgba(242, 193, 78, 0.25);
  color: var(--warn);
}

/* ---------------------------------------------------------------- 加载 */

.fbx-spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--mint);
  animation: fbx-spin 0.7s linear infinite;
  flex: none;
}

@keyframes fbx-spin {
  to {
    transform: rotate(360deg);
  }
}

.fbx-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 60px 20px;
  color: var(--faint);
  font-size: 13.5px;
}

/* ---------------------------------------------------------------- 工具 */

.fbx-mono {
  font-family: var(--font-mono);
}

.fbx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* hidden 属性必须压过组件自身的 display */
[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .fbx-spinner {
    animation: none;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   以下工具类逐项对齐 yunamo.com 的实现
   证据：_rebuild/mirror/assets/index-C8OdA-Aj.css
   ========================================================================== */

/* ---- 点阵背景（登录/控制台用） ---- */
.y-dot-grid {
  position: absolute;
  inset: 0;
  z-index: -20;
  background-image: radial-gradient(rgb(var(--dot-rgb) / 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
}

/* ---- 中心光晕 ---- */
.y-glow {
  position: absolute;
  z-index: -10;
  background: radial-gradient(closest-side, rgb(62 230 180 / 0.16), transparent);
}

/* ---- 标题 ---- */
.y-headline {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: var(--text);
}

.y-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mint-text);
}

.y-container {
  margin-inline: auto;
  width: 100%;
  max-width: 1160px;
  padding-inline: 20px;
}

/* ---- 反色胶囊按钮（yunamo 的主 CTA 样式） ---- */
.y-btn-ink-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding-inline: 20px;
  border: none;
  border-radius: 9999px;
  background: var(--text);
  color: var(--bg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.y-btn-ink-block:hover:not(:disabled) {
  box-shadow: 0 0 0 3px rgb(62 230 180 / 0.25);
}

/* ---- 链接瓦片 ---- */
.y-link-tile {
  display: block;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

/* ---- 小标签 ---- */
.y-label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---- 活点 ---- */
.y-dot-live {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 9999px;
  background: var(--mint);
  box-shadow: 0 0 10px rgb(62 230 180 / 0.7);
}

/* ============================================================================
   StarryID Developers — app.starryid.com
   ----------------------------------------------------------------------------
   和 starry.id 同一套设计语言：深空底 + 星光强调色。
   但这里是**工作台**，信息密度更高，所以：
     - 不用极简登录卡片那套居中布局
     - 用「列表 + 详情」结构
     - 等宽字体展示 client_id / redirect_uri 这类技术串
   ========================================================================== */

:root {
  --bg: #05060b;
  --surface: #0c0f18;
  --surface-2: #141824;
  --surface-3: #1c2130;

  --line: #1c2130;
  --line-strong: #2a3145;

  --text: #f0f2f7;
  --muted: #a0a8bd;
  --faint: #6e7689;

  --accent: #9db4ff;
  --accent-deep: #4a5fd0;
  --accent-text: #b8c9ff;
  --on-accent: #060a18;

  --ok: #4ade80;
  --warn: #f2c14e;
  --danger: #ff5a52;
  --danger-text: #ff8a84;
  --info: #7ab8ff;

  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-brand: "Space Grotesk", var(--font);

  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 640px at 16% -12%, rgba(120, 150, 255, 0.10), transparent 62%),
    radial-gradient(820px 520px at 86% 2%, rgba(160, 130, 255, 0.08), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------------
   顶栏
   ------------------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 11, 0.82);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.brand svg { color: var(--accent); flex: none; }
.brand-sub {
  font-family: var(--font);
  font-size: 12px;
  color: var(--faint);
  padding-left: 10px;
  margin-left: 2px;
  border-left: 1px solid var(--line-strong);
  letter-spacing: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}

.whoami {
  color: var(--muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   布局
   ------------------------------------------------------------------------- */
.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}

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

.page-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.page-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 60ch;
}

/* ---------------------------------------------------------------------------
   按钮
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  padding: 9px 16px;
  border-radius: 9999px;       /* 主按钮是药丸形 */
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover:not(:disabled) { background: var(--surface-3); border-color: #35405a; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.btn.primary:hover:not(:disabled) { background: #b3c5ff; border-color: #b3c5ff; }

.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }

.btn.danger { color: var(--danger-text); border-color: #3a2226; background: transparent; }
.btn.danger:hover:not(:disabled) { background: #1d1114; border-color: #5c2020; }

.btn.sm { padding: 6px 12px; font-size: 12px; }

/* ---------------------------------------------------------------------------
   卡片
   ------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.card + .card { margin-top: 16px; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.card-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.card-body { padding: 18px; }

/* 应用列表 */
.app-list { display: grid; gap: 10px; }

.app-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s, background .15s;
}
.app-row:hover { border-color: var(--line-strong); background: var(--surface-2); }

.app-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex: none;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 16px;
  background: linear-gradient(140deg, #232a3d, #171c28);
  color: var(--accent-text);
  border: 1px solid var(--line-strong);
  overflow: hidden;
}
.app-avatar img { width: 100%; height: 100%; object-fit: cover; }

.app-main { flex: 1; min-width: 0; }
.app-name {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.app-meta {
  font-size: 12px;
  color: var(--faint);
  font-family: var(--mono);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   表单
   ------------------------------------------------------------------------- */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

.field .hint {
  font-size: 12px;
  color: var(--faint);
  margin-top: 6px;
  line-height: 1.55;
}

.field .hint code {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--surface-3);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--muted);
}

input[type="text"],
input[type="url"],
input[type="email"],
textarea,
select {
  width: 100%;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-deep);
}
input::placeholder, textarea::placeholder { color: #4b5366; }

textarea { resize: vertical; min-height: 76px; }
input.mono, textarea.mono { font-family: var(--mono); font-size: 12.5px; }

/* 多值输入（redirect_uris） */
.uri-list { display: grid; gap: 8px; }
.uri-row { display: flex; gap: 8px; align-items: center; }
.uri-row input { flex: 1; }

/* scope 勾选 */
.scope-grid { display: grid; gap: 8px; }

.scope-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.scope-item:hover { border-color: var(--line-strong); background: var(--surface-2); }
.scope-item input { margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.scope-item .s-name { font-family: var(--mono); font-size: 12.5px; }
.scope-item .s-desc { font-size: 12px; color: var(--faint); margin-top: 1px; }

/* ---------------------------------------------------------------------------
   提示 / 状态
   ------------------------------------------------------------------------- */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 18px;
  border: 1px solid;
}
.alert svg { flex: none; margin-top: 1px; }
.alert.error { background: #1a0f11; border-color: #3a2226; color: var(--danger-text); }
.alert.ok { background: #0c1710; border-color: #1c3a24; color: #7ee2a8; }
.alert.info { background: #0b1220; border-color: #1d2c45; color: var(--accent-text); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
}
.pill.ok { border-color: #1c5033; color: var(--ok); }
.pill.warn { border-color: #4d3d1a; color: var(--warn); }
.pill.bad { border-color: #5c2020; color: var(--danger-text); }

/* ---------------------------------------------------------------------------
   详情页
   ------------------------------------------------------------------------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 16px;
  font-size: 13px;
}
.kv dt { color: var(--faint); }
.kv dd { margin: 0; min-width: 0; }

.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.copy-row code {
  flex: 1;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent-text);
  overflow-x: auto;
  white-space: nowrap;
}
.copy-btn {
  flex: none;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  border-radius: 6px;
  padding: 4px 9px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.copy-btn:hover { color: var(--text); border-color: #35405a; }

.uri-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}
.uri-chip + .uri-chip { margin-top: 6px; }

/* ---------------------------------------------------------------------------
   空状态
   ------------------------------------------------------------------------- */
.empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--faint);
}
.empty svg { color: var(--line-strong); margin-bottom: 14px; }
.empty h3 { margin: 0 0 6px; font-size: 15px; color: var(--muted); font-weight: 500; }
.empty p { margin: 0 0 20px; font-size: 13px; }

/* ---------------------------------------------------------------------------
   弹窗
   ------------------------------------------------------------------------- */
.dlg-mask {
  position: fixed;
  inset: 0;
  background: rgba(2, 3, 7, 0.72);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 100;
  opacity: 0;
  transition: opacity .16s;
}
.dlg-mask.show { opacity: 1; }

.dlg {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  transform: translateY(6px) scale(.99);
  transition: transform .16s;
}
.dlg-mask.show .dlg { transform: none; }

.dlg-head { padding: 18px 20px 0; }
.dlg-title { font-size: 15px; font-weight: 600; margin: 0; }
.dlg-detail { font-size: 13px; color: var(--muted); margin: 8px 0 0; line-height: 1.6; }
.dlg-body { padding: 16px 20px 0; }
.dlg-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px 20px 20px;
}

/* ---------------------------------------------------------------------------
   加载骨架
   ------------------------------------------------------------------------- */
.skeleton {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* 居中处理中 */
.center-box {
  min-height: 60vh;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 13px;
}

/* 语言切换 */
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 9999px;
  overflow: hidden;
}
.lang-switch button {
  font: inherit;
  font-size: 12px;
  padding: 5px 11px;
  background: transparent;
  border: 0;
  color: var(--faint);
  cursor: pointer;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { background: var(--surface-3); color: var(--text); }

/* ---------------------------------------------------------------------------
   响应式
   ------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .shell { padding: 24px 16px 80px; }
  .topbar { padding: 12px 16px; }
  .kv { grid-template-columns: 1fr; gap: 4px 0; }
  .kv dt { margin-top: 8px; }
  .brand-sub { display: none; }
  .app-row { padding: 12px 14px; }
  .whoami { display: none; }
}
