/* ═══════════════════════════════════════════
   网址导航 — 科技感主题 v3
   玻璃拟态 · 霓虹动效 · 星空背景
   ═══════════════════════════════════════════ */

/* ── 字体 ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #00e5a0;
  --primary-glow: rgba(0,229,160,.35);
  --primary-dim: rgba(0,229,160,.12);
  --accent: #7c3aed;
  --accent-glow: rgba(124,58,237,.3);
  --surface: rgba(255,255,255,.06);
  --surface-hover: rgba(255,255,255,.10);
  --border: rgba(255,255,255,.10);
  --border-glow: rgba(0,229,160,.25);
  --text: #e8e8f0;
  --text-light: #a0a0b8;
  --text-lighter: #686880;
  --bg-start: #0a0a1a;
  --bg-mid: #0f0f2a;
  --bg-end: #1a0a2e;
  --radius: 10px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-card: 0 4px 30px rgba(0,0,0,.3);
  --glow-neon: 0 0 20px var(--primary-glow), 0 0 60px var(--primary-glow);
  --btn-text: #0a0a1a;
}

/* ── 浅色主题 ── */
[data-theme="light"] {
  --surface: rgba(255,255,255,.7);
  --surface-hover: rgba(255,255,255,.85);
  --border: rgba(0,0,0,.10);
  --border-glow: rgba(0,229,160,.4);
  --text: #1a1a2e;
  --text-light: #555570;
  --text-lighter: #8888a0;
  --bg-start: #f0f2f8;
  --bg-mid: #e8ecf5;
  --bg-end: #e0e5f0;
  --shadow-card: 0 4px 30px rgba(0,0,0,.08);
  --glow-neon: 0 0 15px var(--primary-glow);
  --btn-text: #0a0a1a;
}
[data-theme="light"] .header { background: rgba(255,255,255,.85); }
[data-theme="light"] .modal { background: linear-gradient(135deg, #f8f9ff, #f0f2ff); }
[data-theme="light"] .admin-table th { background: rgba(0,0,0,.03); }
[data-theme="light"] .category-tab.active { color: #fff; }
[data-theme="light"] .btn-primary { color: var(--btn-text); }
[data-theme="light"] body::before { opacity: .3; }
[data-theme="light"] .login-card { background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(248,249,255,.92)); }
[data-theme="light"] .user-badge { background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.08); }

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-mid) 50%, var(--bg-end) 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── 星空粒子动画 ── */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
body::before {
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,.3), transparent),
    radial-gradient(1px 1px at 20% 60%, rgba(255,255,255,.2), transparent),
    radial-gradient(1.5px 1.5px at 30% 10%, rgba(0,229,160,.4), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,.2), transparent),
    radial-gradient(1px 1px at 50% 30%, rgba(255,255,255,.15), transparent),
    radial-gradient(1.5px 1.5px at 60% 50%, rgba(124,58,237,.3), transparent),
    radial-gradient(1px 1px at 70% 15%, rgba(255,255,255,.25), transparent),
    radial-gradient(1px 1px at 80% 75%, rgba(255,255,255,.2), transparent),
    radial-gradient(1.5px 1.5px at 90% 40%, rgba(0,229,160,.3), transparent),
    radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,.15), transparent),
    radial-gradient(1px 1px at 55% 5%, rgba(124,58,237,.25), transparent),
    radial-gradient(1px 1px at 85% 25%, rgba(255,255,255,.2), transparent),
    radial-gradient(1.5px 1.5px at 25% 45%, rgba(0,229,160,.3), transparent),
    radial-gradient(1px 1px at 45% 95%, rgba(255,255,255,.15), transparent),
    radial-gradient(1px 1px at 65% 65%, rgba(124,58,237,.2), transparent),
    radial-gradient(1px 1px at 95% 55%, rgba(255,255,255,.2), transparent),
    radial-gradient(1.5px 1.5px at 5% 35%, rgba(0,229,160,.25), transparent),
    radial-gradient(1px 1px at 35% 70%, rgba(255,255,255,.15), transparent),
    radial-gradient(1px 1px at 75% 90%, rgba(255,255,255,.2), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(124,58,237,.15), transparent);
  background-size: 200px 200px;
  animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: .6; }
  100% { opacity: 1; }
}

/* ── 顶栏 ── */
.header {
  position: relative;
  z-index: 10;
  background: rgba(10,10,26,.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0,0,0,.2);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 24px;
  gap: 12px;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.3px;
}
.header-brand span { font-size: 20px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.user-badge {
  font-size: 13px;
  color: var(--text-light);
  padding: 4px 12px;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* ── 搜索框 ── */
.search-box input {
  padding: 8px 16px 8px 36px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  width: 220px;
  outline: none;
  transition: all .3s;
  font-family: var(--font);
  position: relative;
}
.search-box {
  position: relative;
}
.search-box::before {
  content: '🔍';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  pointer-events: none;
  z-index: 1;
}
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  width: 280px;
}
.search-box input::placeholder { color: var(--text-lighter); }

/* ── 分类标签 ── */
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
  padding: 0 16px;
}
.category-tab {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-light);
  transition: all .3s;
  user-select: none;
}
.category-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.category-tab.active {
  background: linear-gradient(135deg, var(--primary), #00c8a0);
  color: #0a0a1a;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 0 20px var(--primary-glow);
}

/* ── 卡片网格 ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  position: relative;
  z-index: 10;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
@supports (grid-template-columns: subgrid) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}
@supports not (grid-template-columns: subgrid) {
  @media (min-width: 900px) { .card-grid { grid-template-columns: repeat(5, 1fr); } }
  @media (min-width: 700px) and (max-width: 899px) { .card-grid { grid-template-columns: repeat(4, 1fr); } }
  @media (min-width: 500px) and (max-width: 699px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
  @media (max-width: 499px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
}

/* ── 卡片 ── */
.card {
  display: block;
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 16px 20px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
}
/* 卡片顶部霓虹光条 */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity .3s;
}
.card:hover::before { opacity: 1; }

.card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 32px rgba(0,229,160,.15), 0 0 0 1px rgba(0,229,160,.1);
  background: var(--surface-hover);
}
.card:active { transform: translateY(-2px) scale(1.01); }

.card-icon { font-size: 2.4rem; margin-bottom: 10px; display: block; }
.card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}
.card-category {
  font-size: 11px;
  color: var(--text-lighter);
  margin-top: 6px;
  padding: 2px 10px;
  background: var(--surface);
  border-radius: 12px;
  display: inline-block;
  border: 1px solid var(--border);
}

/* ── 全屏 iframe 弹窗 ────────────── */
.iframe-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  justify-content: center; align-items: center;
}
.iframe-container {
  width: 100vw; height: 100vh;
  background: var(--bg-start);
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
}
.iframe-toolbar {
  display: flex; align-items: center;
  padding: 8px 16px;
  background: rgba(10,10,26,.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  gap: 12px;
  z-index: 2;
}
.iframe-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.iframe-newwin {
  font-size: 18px;
  text-decoration: none;
  color: var(--text-lighter);
  padding: 4px 8px;
  border-radius: 4px;
  transition: all .2s;
}
.iframe-newwin:hover { color: var(--primary); background: var(--primary-dim); }
.iframe-close {
  background: none; border: none;
  font-size: 24px; cursor: pointer;
  padding: 0 8px; color: var(--text-lighter);
  line-height: 1;
  transition: color .2s;
}
.iframe-close:hover { color: #f87171; }
#previewIframe { flex: 1; border: none; width: 100%; height: calc(100vh - 44px); }
[data-theme="light"] .iframe-toolbar {
  background: rgba(255,255,255,.95);
}

/* ── 空状态 ── */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-lighter); }
.empty-state p { font-size: 15px; }

/* ── 后台表格 ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h2 {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.admin-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-lighter);
  background: rgba(10,10,26,.5);
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr {
  transition: background .2s;
}
.admin-table tr:hover td {
  background: rgba(0,229,160,.04);
}

.url-cell a {
  color: var(--primary);
  text-decoration: none;
  font-size: 12px;
  word-break: break-all;
  transition: color .2s;
}
.url-cell a:hover { color: #fff; text-decoration: underline; }
.action-cell { white-space: nowrap; }
.remark-cell {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-lighter);
  font-size: 12px;
}

/* ── 按钮 ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s;
  font-family: var(--font);
  background: transparent;
  color: var(--text);
  text-decoration: none;
}
.btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #00c8a0);
  color: #0a0a1a;
  border-color: transparent;
  font-weight: 700;
}
.btn-primary:hover {
  box-shadow: var(--glow-neon);
  transform: scale(1.02);
  color: #0a0a1a;
}
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border-color: transparent;
}
.btn-danger:hover {
  box-shadow: 0 0 20px rgba(239,68,68,.35);
  transform: scale(1.02);
  color: #fff;
}
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-outline {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-light);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-dim);
}
.btn-cancel { composes: btn; color: var(--text-lighter); }

/* ── 排序按钮 ── */
.sort-cell { text-align: center; white-space: nowrap; }
.btn-sort {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  padding: 2px 6px;
  margin: 0 2px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--text-lighter);
  transition: all .2s;
}
.btn-sort:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); }
.btn-sort:disabled { opacity: .2; cursor: not-allowed; }

/* ── 弹窗 ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0; z-index: 1000;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
}
.modal {
  background: linear-gradient(135deg, #12122a, #1a0a2e);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  width: 420px; max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(0,229,160,.1);
}
.modal h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: all .3s;
  font-family: var(--font);
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  background: rgba(255,255,255,.06);
}
.form-input::placeholder { color: var(--text-lighter); }
textarea.form-input { resize: vertical; min-height: 48px; }
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ── 登录页 ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.login-card {
  background: linear-gradient(135deg, rgba(18,18,42,.9), rgba(26,10,46,.9));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 48px 40px;
  border-radius: 20px;
  width: 400px; max-width: 90%;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,.4), 0 0 0 1px rgba(0,229,160,.08);
  position: relative;
  overflow: hidden;
}
/* 登录卡顶光条 */
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), var(--primary), transparent);
  background-size: 200% 100%;
  animation: glowBar 3s linear infinite;
}
@keyframes glowBar {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.login-card .login-icon {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dim), transparent);
  border: 1px solid var(--border);
}
.login-card h1 {
  font-size: 24px;
  margin-bottom: 4px;
  text-align: center;
  font-weight: 800;
}
.login-card h1 span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-card .subtitle {
  text-align: center;
  color: var(--text-lighter);
  font-size: 13px;
  margin-bottom: 32px;
}

.login-card .form-group {
  margin-bottom: 20px;
  position: relative;
}
.login-card .form-group .input-icon {
  position: absolute;
  left: 14px;
  top: 38px;
  font-size: 14px;
  pointer-events: none;
}
.login-card .form-input {
  padding-left: 38px;
}

.login-card .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 15px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-lighter);
  text-decoration: none;
  transition: color .2s;
}
.back-link:hover { color: var(--primary); }

.error-msg {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.25);
  color: #f87171;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13px;
}

.login-card .version {
  text-align: center;
  color: var(--text-lighter);
  font-size: 11px;
  margin-top: 24px;
  opacity: .5;
}

/* ── 后台链接样式 ── */
.admin-link {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text-light) !important;
  text-decoration: none;
  transition: all .2s;
}
.admin-link:hover {
  border-color: var(--primary);
  color: var(--primary) !important;
}

/* ── Emoji 选择器 ── */
.emoji-picker { position: relative; }
.emoji-selected {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: var(--text-light);
  font-size: 20px;
  cursor: pointer;
  transition: all .3s;
  user-select: none;
}
.emoji-selected:hover { border-color: var(--primary); }
.emoji-grid {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  z-index: 10;
  margin-top: 6px;
  padding: 12px;
  background: linear-gradient(135deg, #12122a, #1a0a2e);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
  max-height: 240px;
  overflow-y: auto;
}
.emoji-grid.show { display: block; }
.emoji-group { margin-bottom: 8px; }
.emoji-group:last-child { margin-bottom: 0; }
.emoji-group-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-lighter);
  margin-bottom: 4px;
}
.emoji-opt {
  display: inline-block;
  padding: 4px 6px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 4px;
  transition: all .15s;
}
.emoji-opt:hover {
  background: var(--primary-dim);
  transform: scale(1.25);
}
[data-theme="light"] .emoji-grid {
  background: linear-gradient(135deg, #f8f9ff, #f0f2ff);
}
[data-theme="light"] .emoji-selected {
  background: rgba(0,0,0,.03);
}
.emoji-none {
  font-size: 12px !important;
  padding: 4px 10px !important;
  opacity: .6;
}
.emoji-none:hover { opacity: 1; }

/* ── 主题切换按钮 ── */
.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all .3s;
  line-height: 1;
}
.theme-toggle:hover {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
  transform: rotate(15deg);
}

/* ── 响应式 ── */
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: 8px; padding: 8px 16px; height: auto; }
  .search-box input { width: 100%; }
  .search-box input:focus { width: 100%; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { padding: 20px 12px 16px; }
  .admin-table { font-size: 12px; }
  .admin-table th, .admin-table td { padding: 8px 10px; }
  .modal { padding: 24px; }
  /* ── 移动端：分类标签改为横向滚动条 ── */
  .category-tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 16px 4px;
    margin-bottom: 24px;
    gap: 6px;
    scroll-snap-type: x mandatory;
  }
  .category-tabs::-webkit-scrollbar { display: none; }
  .category-tab {
    scroll-snap-align: start;
    padding: 6px 14px;
    font-size: 12px;
  }
}

/* ── App 风格 - 分类总览 ── */
.app-section {
  margin-bottom: 36px;
}

.app-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  margin-bottom: 18px;
}

.app-section-icon {
  font-size: 18px;
  line-height: 1;
}

.app-section-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: .3px;
  text-transform: uppercase;
}

.app-section-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-lighter);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 8px;
  line-height: 20px;
  margin-left: auto;
}

/* ── 横向滚动托盘 ── */
.app-tray {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 20px;
  padding: 4px 4px 12px;
}

/* ── App 图标方块 ── */
.app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform .15s ease;
}
.app-tile:hover {
  transform: translateY(-4px);
}
.app-tile:active {
  transform: scale(.9);
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  transition: all .2s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.app-tile:hover .app-icon {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim), 0 6px 24px rgba(0,229,160,.18);
  background: var(--surface-hover);
}

.app-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  text-align: center;
  line-height: 1.35;
  word-break: break-all;
}

/* ── 浅色主题适配 ── */
[data-theme="light"] .app-icon {
  background: rgba(255,255,255,.85);
  border-color: rgba(0,0,0,.08);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
[data-theme="light"] .app-tile:hover .app-icon {
  border-color: var(--primary);
  background: #fff;
}

/* ── 移动端 ── */
@media (max-width: 600px) {
  .app-section { margin-bottom: 28px; }
  .app-tray {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .app-tile { width: auto; }
  .app-icon { width: 62px; height: 62px; font-size: 28px; border-radius: 16px; }
  .app-label { font-size: 11px; max-width: 100%; }
  .app-section-label { font-size: 13px; }
}
