/* ============================================================
   V3 新视界 · 全局样式 v7
   - iOS App Switcher 风格水平堆叠（中间在上，左右在下）
   - Liquid Glass 玻璃卡片
   - 60fps 切换动画（仅 transform / opacity）
   - 深色/浅色双模式
   - 移动端优先适配
   ============================================================ */

@import url('icons.css');

/* ---- 浅色模式 ---- */
:root {
  --bg-deep: #f2f4f8;
  --bg-glow-1: rgba(124, 92, 252, 0.12);
  --bg-glow-2: rgba(91, 141, 239, 0.08);
  --text-primary: #0f0f12;
  --text-secondary: rgba(15, 15, 18, 0.55);
  --text-muted: rgba(15, 15, 18, 0.32);
  --accent: #7c5cfc;
  --accent-2: #4b8df5;
  --accent-glow: rgba(124, 92, 252, 0.25);
  --danger: #ef4444;
  --success: #22c55e;

  /* Liquid Glass */
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.72);
  --glass-border-soft: rgba(0, 0, 0, 0.06);
  --glass-shadow: 0 14px 40px rgba(0, 0, 0, 0.10),
                  0 2px 6px rgba(0, 0, 0, 0.04),
                  inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --glass-shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.16),
                     0 8px 24px rgba(0, 0, 0, 0.08),
                     inset 0 1px 0 rgba(255, 255, 255, 0.9);

  --card-surface: linear-gradient(150deg, #2b2d3a 0%, #11121a 100%);
  --card-glow: rgba(124, 92, 252, 0.35);

  --font-display: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", monospace;

  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 30px;
  --radius-xl: 40px;
  --radius-pill: 9999px;

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-ios: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---- 深色模式 ---- */
:root[data-theme="dark"] {
  --bg-deep: #05060a;
  --bg-glow-1: rgba(124, 92, 252, 0.18);
  --bg-glow-2: rgba(91, 141, 239, 0.10);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.58);
  --text-muted: rgba(255, 255, 255, 0.30);
  --accent: #a78bfa;
  --accent-2: #7aa7ff;
  --accent-glow: rgba(167, 139, 250, 0.30);

  --glass-bg: rgba(28, 30, 44, 0.62);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-soft: rgba(255, 255, 255, 0.06);
  --glass-shadow: 0 14px 40px rgba(0, 0, 0, 0.35),
                  0 2px 6px rgba(0, 0, 0, 0.25),
                  inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --glass-shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.45),
                     0 8px 24px rgba(0, 0, 0, 0.25),
                     inset 0 1px 0 rgba(255, 255, 255, 0.10);

  --card-surface: linear-gradient(150deg, #1c1e2a 0%, #08090e 100%);
  --card-glow: rgba(167, 139, 250, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg-deep: #05060a;
    --bg-glow-1: rgba(124, 92, 252, 0.18);
    --bg-glow-2: rgba(91, 141, 239, 0.10);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.58);
    --text-muted: rgba(255, 255, 255, 0.30);
    --accent: #a78bfa;
    --accent-2: #7aa7ff;
    --accent-glow: rgba(167, 139, 250, 0.30);
    --glass-bg: rgba(28, 30, 44, 0.62);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-soft: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 14px 40px rgba(0, 0, 0, 0.35),
                    0 2px 6px rgba(0, 0, 0, 0.25),
                    inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --glass-shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.45),
                       0 8px 24px rgba(0, 0, 0, 0.25),
                       inset 0 1px 0 rgba(255, 255, 255, 0.10);
    --card-surface: linear-gradient(150deg, #1c1e2a 0%, #08090e 100%);
    --card-glow: rgba(167, 139, 250, 0.28);
  }
}

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 70% 40% at 20% 0%, var(--bg-glow-1), transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 100%, var(--bg-glow-2), transparent 70%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent-glow); }

/* ---- 粒子背景 ---- */
#particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---- 导航栏 ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.site-logo { height: 26px; width: auto; }
.site-logo--dark { display: none; }
:root[data-theme="dark"] .site-logo--light { display: none; }
:root[data-theme="dark"] .site-logo--dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .site-logo--light { display: none; }
  :root:not([data-theme]) .site-logo--dark { display: block; }
}
.nav-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.nav-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: transform 0.2s var(--ease-spring), color 0.2s;
}
.icon-btn:hover { transform: scale(1.08); color: var(--text-primary); }

/* ---- 主页布局 ---- */
.main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 16px 40px;
}

/* ---- Hero ---- */
.hero {
  text-align: center;
  margin-bottom: 8px;
  max-width: 520px;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(124, 92, 252, 0.08);
  margin-bottom: 6px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 4px;
}
.hero-title .accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
  max-width: 340px;
  margin: 0 auto;
}

/* ---- 连续滑动卡片轮播 ---- */
.stack-section {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  justify-content: flex-start;
  padding-top: 0;
}

.stack-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.stack-counter .current {
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}
.stack-counter .sep { margin: 0 4px; opacity: 0.4; }

/* iOS App Switcher 堆叠容器 */
.stack-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 520px;
  perspective: 900px;
  user-select: none;
  -webkit-user-select: none;
  overflow: visible;
}

/* 卡片定位层 */
.stack {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.stack.dragging .work-card {
  transition: none !important;
}

/* 卡片 —— 绝对定位，全部叠在左上角，由 JS 控制 transform */
.work-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 340px;
  height: 460px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: grab;
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow-lg);
  color: var(--text-primary);
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
  will-change: transform, opacity;
  transform-origin: center center;
}
.work-card:active {
  cursor: grabbing;
}

/* 背景图层 */
.work-card .card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.work-card .card-surface {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--card-surface);
}
.work-card .card-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 30% 20%, var(--card-glow), transparent 60%);
  opacity: 0.7;
}
.work-card.has-bg .card-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.70) 100%);
}

/* 无图卡片：深色模式用深色背景+白字，浅色模式用玻璃透明+深色文字 */
.work-card:not(.has-bg) { color: #ffffff; }
.work-card:not(.has-bg) .card-name,
.work-card:not(.has-bg) .card-desc,
.work-card:not(.has-bg) .card-domain { color: rgba(255,255,255,0.92); }

/* 浅色模式下无图卡片用透明背景+深色文字 */
:root:not([data-theme]) .work-card:not(.has-bg),
:root[data-theme="light"] .work-card:not(.has-bg) {
  color: var(--text-primary);
}
:root:not([data-theme]) .work-card:not(.has-bg) .card-name,
:root:not([data-theme]) .work-card:not(.has-bg) .card-desc,
:root:not([data-theme]) .work-card:not(.has-bg) .card-domain,
:root[data-theme="light"] .work-card:not(.has-bg) .card-name,
:root[data-theme="light"] .work-card:not(.has-bg) .card-desc,
:root[data-theme="light"] .work-card:not(.has-bg) .card-domain {
  color: var(--text-primary);
}
:root:not([data-theme]) .work-card:not(.has-bg) .card-surface,
:root[data-theme="light"] .work-card:not(.has-bg) .card-surface {
  background: transparent;
}
:root:not([data-theme]) .work-card:not(.has-bg) .card-glow,
:root[data-theme="light"] .work-card:not(.has-bg) .card-glow {
  display: none;
}
/* 浅色模式下图标框用深色边框 */
:root:not([data-theme]) .work-card .card-icon,
:root[data-theme="light"] .work-card .card-icon {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text-primary);
}

/* 卡片内容 */
.work-card .card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
}
/* 图标框：纯玻璃透明效果 */
.work-card .card-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #ffffff;
  margin-bottom: auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.work-card .card-domain {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 5px;
}
.work-card .card-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 6px;
}
.work-card .card-desc {
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.85;
  margin-bottom: 18px;
  max-width: 320px;
}
.work-card .card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  align-self: flex-start;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.work-card .card-cta:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 6px 20px var(--accent-glow); }

/* 卡片位置/缩放/透明度全部由 JS 动态设置 */

/* ---- 控制区 ---- */
.stack-controls {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  align-items: center;
}
.ctrl-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--text-secondary);
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: transform 0.2s var(--ease-spring), color 0.2s;
}
.ctrl-btn:hover { transform: scale(1.08); color: var(--text-primary); }
.ctrl-btn:active { transform: scale(0.94); }

.stack-dots {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0 10px;
}
.stack-dots .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--glass-border-soft);
  transition: all 0.3s var(--ease-ios);
  cursor: pointer;
}
.stack-dots .dot:hover { background: var(--text-muted); }
.stack-dots .dot.active {
  width: 22px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* ---- 空状态 ---- */
.empty-state {
  text-align: center;
  padding: 44px 28px;
  max-width: 360px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.empty-state .icon { font-size: 36px; color: var(--accent); display: block; margin-bottom: 14px; }
.empty-state h3 { font-size: 18px; margin-bottom: 6px; }
.empty-state p { color: var(--text-secondary); font-size: 13px; margin-bottom: 18px; }

/* ---- 页脚 ---- */
.footer {
  margin-top: auto;
  padding-top: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}
.footer a { color: var(--text-secondary); transition: color 0.3s; }
.footer a:hover { color: var(--accent); }
.footer .sep { margin: 0 6px; opacity: 0.4; }

/* ============================================================
   后台管理
   ============================================================ */
.admin-wrap {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 92px 20px 48px;
}
.admin-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 14px;
}
.admin-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-title .icon { color: var(--accent); font-size: 20px; }
.admin-title .count { font-size: 13px; color: var(--text-muted); font-weight: 400; font-family: var(--font-mono); }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn .icon { font-size: 15px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 6px 20px var(--accent-glow); }
.btn-ghost {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--glass-border-soft);
  color: var(--text-primary);
}
.btn-ghost:hover { border-color: var(--glass-border); }
.btn-danger {
  background: rgba(239, 68, 68, 0.10);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.20);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.15); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }

/* 玻璃面板 */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
}

/* 表单 */
.form-card { padding: 24px; margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.full { grid-template-columns: 1fr; }
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 7px;
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--glass-border-soft);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
:root[data-theme="dark"] .form-input { background: rgba(255, 255, 255, 0.03); }
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--accent);
  background: var(--glass-bg);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea.form-input { resize: vertical; min-height: 80px; line-height: 1.5; }
.form-help { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.form-help code { font-family: var(--font-mono); background: var(--glass-border-soft); padding: 2px 6px; border-radius: 4px; }
.form-error { font-size: 13px; color: var(--danger); margin-bottom: 16px; }
.form-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* 上传 */
.upload-area {
  border: 2px dashed var(--glass-border-soft);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(0, 0, 0, 0.02);
}
:root[data-theme="dark"] .upload-area { background: rgba(255, 255, 255, 0.02); }
.upload-area:hover, .upload-area.dragover { border-color: var(--accent); background: var(--accent-glow); }
.upload-area .icon { font-size: 26px; color: var(--text-muted); margin-bottom: 8px; display: block; }
.upload-area p { font-size: 14px; color: var(--text-secondary); }
.upload-area small { font-size: 12px; color: var(--text-muted); display: block; margin-top: 4px; }
.upload-preview { margin-top: 12px; border-radius: 12px; overflow: hidden; display: none; border: 1px solid var(--glass-border-soft); }
.upload-preview img { width: 100%; height: 150px; object-fit: cover; }

/* 图标选择 */
.icon-picker {
  border: 1px solid var(--glass-border-soft);
  border-radius: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.02);
  max-height: 240px;
  overflow-y: auto;
}
:root[data-theme="dark"] .icon-picker { background: rgba(255, 255, 255, 0.02); }
.icon-picker-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.icon-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring);
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.icon-cell:hover { transform: scale(1.08); }
.icon-cell.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  transform: scale(1.08);
}

/* 列表 */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.site-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.site-card-header { display: flex; align-items: flex-start; gap: 12px; }
.site-card-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 2px 8px var(--accent-glow);
}
.site-card-info { flex: 1; min-width: 0; }
.site-card-name {
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.site-card-url {
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
  opacity: 0.7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.site-card-intro {
  font-size: 13px; line-height: 1.55; color: var(--text-secondary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.site-card-actions { display: flex; gap: 8px; }

/* 登录 */
.login-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 20px 20px;
  position: relative; z-index: 1;
}
.login-card { width: 100%; max-width: 380px; padding: 40px 32px; text-align: center; }
.login-logo {
  width: 56px; height: 56px; border-radius: 16px;
  margin: 0 auto 18px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px var(--accent-glow);
}
.login-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.login-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }
.login-form .btn { width: 100%; margin-top: 8px; }

/* 消息 */
.message {
  padding: 12px 16px; border-radius: 12px; font-size: 14px;
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.message-success { background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.15); color: #16a34a; }
.message-error { background: rgba(239, 68, 68, 0.06); border: 1px solid rgba(239, 68, 68, 0.12); color: #dc2626; }

/* 空状态后台 */
.empty-state-admin { text-align: center; padding: 52px 24px; }
.empty-state-admin .icon { font-size: 44px; opacity: 0.2; margin-bottom: 14px; display: block; }
.empty-state-admin h3 { font-size: 17px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state-admin p { font-size: 13px; margin-bottom: 18px; color: var(--text-muted); }

/* 模态 */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
}
.modal-mask.show { display: flex; animation: fadeIn 0.25s ease; }
.modal { width: 100%; max-width: 360px; padding: 28px; text-align: center; }
.modal .icon { font-size: 34px; color: var(--danger); margin-bottom: 14px; display: block; }
.modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.modal p { color: var(--text-secondary); font-size: 14px; margin-bottom: 22px; line-height: 1.5; }
.modal p strong { color: var(--text-primary); }
.modal .actions { display: flex; gap: 10px; justify-content: center; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 768px) {
  .navbar { padding: 10px 14px; }
  .nav-brand { padding: 6px 14px; gap: 8px; }
  .site-logo { height: 22px; }
  .nav-title { font-size: 14px; }
  .icon-btn { width: 38px; height: 38px; font-size: 16px; }

  .main { padding: 56px 14px 32px; }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 12px; }

  .stack-section { padding-top: 0; }
  .stack-wrap { height: 480px; max-width: 360px; }
  .work-card { width: 300px; height: 420px; }
  .work-card .card-content { padding: 20px; }
  .work-card .card-name { font-size: 21px; }
  .work-card .card-desc { font-size: 13px; margin-bottom: 16px; }
  .work-card .card-icon { width: 44px; height: 44px; font-size: 21px; }

  .stack-controls { margin-top: 16px; }
  .ctrl-btn { width: 40px; height: 40px; font-size: 16px; }

  .admin-wrap { padding: 80px 14px 40px; }
  .admin-header-bar { flex-direction: column; align-items: flex-start; }
  .sites-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .icon-picker-grid { grid-template-columns: repeat(6, 1fr); }
  .login-card { padding: 32px 24px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 22px; }
  .stack-wrap { height: 440px; max-width: 330px; }
  .work-card { width: 280px; height: 400px; }
  .work-card .card-name { font-size: 19px; }
  .work-card .card-desc { font-size: 12.5px; }

  .icon-picker-grid { grid-template-columns: repeat(5, 1fr); }
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-border-soft); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
