/* ===== admin.css ===== */
.admin-layout {
  display: flex;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-void);
  overflow: hidden;
}

/* 侧边栏 */
.admin-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border-dim);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}
.admin-logo {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--neon-cyan);
  text-align: center;
  padding: 0 16px 20px;
  border-bottom: 1px solid var(--border-dim);
  text-shadow: 0 0 10px var(--neon-cyan);
}
.admin-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 12px;
  overflow-y: auto;
}
.admin-nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-nav-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}
.admin-nav-btn.active {
  background: rgba(0, 245, 212, 0.1);
  color: var(--neon-cyan);
  box-shadow: inset 2px 0 0 var(--neon-cyan);
}
.admin-sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border-dim);
}
.btn-ghost {
  display: block;
  text-align: center;
  padding: 8px 12px;
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  transition: all 0.2s;
}
.btn-ghost:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

/* 主内容区 */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-dim);
  background: var(--bg-card);
}
.admin-title {
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.admin-actions { display: flex; gap: 12px; }
.btn-save {
  padding: 10px 24px;
  background: var(--neon-cyan);
  color: var(--bg-void);
  border: none;
  border-radius: 10px;
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0,245,212,0.4);
  transition: all 0.2s;
}
.btn-save:hover {
  box-shadow: 0 0 24px rgba(0,245,212,0.6);
  transform: translateY(-1px);
}
.btn-save:active { transform: scale(0.97); }

/* 编辑区 */
.admin-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* 条目卡片 */
.entry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.entry-card:hover { border-color: var(--neon-cyan); }
.entry-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.entry-card-title {
  font-family: 'Orbitron', monospace;
  font-size: 15px;
  color: var(--text-primary);
}
.entry-card-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}
.entry-card-delete:hover { color: #ff4466; background: rgba(255,68,102,0.1); }

/* 表单字段 */
.field-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.field-full { grid-column: 1 / -1; }
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.field input, .field select {
  padding: 8px 12px;
  background: var(--bg-void);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  transition: border-color 0.2s;
  outline: none;
}
.field input:focus, .field select:focus {
  border-color: var(--neon-cyan);
}
.field input[type="number"] { font-family: 'Orbitron', monospace; }
input[type="color"] {
  height: 38px;
  padding: 2px 6px;
  cursor: pointer;
}

/* 滑块 */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.slider-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.slider-value {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  color: var(--neon-cyan);
}
input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: var(--border-dim);
  border-radius: 3px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--neon-cyan);
  cursor: pointer;
  box-shadow: 0 0 8px var(--neon-cyan);
}

/* 概率显示 */
.prob-display {
  text-align: right;
  font-size: 12px;
  color: var(--neon-amber);
  margin-top: 4px;
}

/* 新增按钮 */
.btn-add {
  width: 100%;
  padding: 12px;
  background: none;
  border: 2px dashed var(--border-dim);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-add:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

/* 全局开关 */
.global-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  margin-bottom: 16px;
}
.toggle-switch {
  position: relative;
  width: 44px; height: 24px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-dim);
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--neon-cyan); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--neon-cyan);
  border-radius: 10px;
  color: var(--neon-cyan);
  font-size: 14px;
  box-shadow: 0 0 20px rgba(0,245,212,0.3);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
  z-index: 1000;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: #ff4466; color: #ff4466; }

/* emoji 选择器 */
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 8px;
  background: var(--bg-void);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  margin-top: 6px;
}
.emoji-opt {
  font-size: 20px;
  text-align: center;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.emoji-opt:hover { background: rgba(255,255,255,0.1); }
.emoji-opt.selected { background: rgba(0,245,212,0.2); }

/* 稀有度星级 */
.rarity-stars {
  /* 锁屏 */
  body.locked { background: var(--bg-base); overflow: hidden; }
  .lock-screen {
    position: fixed; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
    background: var(--bg-base);
  }
  .lock-logo { font-size: 48px; animation: pulse-glow 2s ease-in-out infinite; }
  .lock-title { font-family: 'Orbitron', monospace; font-size: 24px; color: var(--neon-cyan); letter-spacing: 0.2em; }
  .lock-input {
    background: var(--bg-card); border: 1px solid var(--neon-cyan); border-radius: 8px;
    color: #fff; font-size: 16px; padding: 12px 20px; width: 280px; text-align: center;
    outline: none; transition: box-shadow 0.3s;
  }
  .lock-input:focus { box-shadow: 0 0 20px rgba(0,245,212,0.4); }
  .lock-error { color: var(--neon-pink); font-size: 13px; }
  #lock-btn { width: 280px; }

  /* 概率统计栏 */
  .prob-stats {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 12px; background: var(--bg-card); border-radius: 10px;
    border: 1px solid var(--border-dim); margin-bottom: 16px;
  }
  .prob-stat-item { display: flex; align-items: center; gap: 6px; }
  .prob-stat-label { font-size: 12px; color: var(--text-muted); }
  .prob-stat-value {
    font-family: 'Orbitron', monospace; font-size: 12px; color: var(--neon-cyan);
    background: rgba(0,245,212,0.1); padding: 2px 8px; border-radius: 4px;
  }
  .prob-stat-value.guaranteed { color: var(--neon-amber); background: rgba(255,214,10,0.15); }

  /* 概率控件组 */
  .prob-field-group { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

  /* 必中开关 */
  .guaranteed-toggle {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; background: var(--bg-base); border-radius: 8px;
    border: 1px solid var(--border-dim);
  }
  .guaranteed-label { font-size: 12px; color: var(--text-muted); flex: 1; }
  .guaranteed-value {
    font-family: 'Orbitron', monospace; font-size: 12px; color: var(--text-muted);
    transition: color 0.3s;
  }
  .guaranteed-value.on { color: var(--neon-amber); }

  /* 权重滑块 */
  .weight-slider-group { display: flex; flex-direction: column; gap: 4px; }
  .weight-header { display: flex; justify-content: space-between; font-size: 12px; }
  .weight-label { color: var(--text-muted); }
  .weight-value { color: var(--neon-cyan); font-family: 'Orbitron', monospace; }
  .weight-range {
    width: 100%; accent-color: var(--neon-cyan);
    cursor: pointer;
  }
  .weight-range:disabled { opacity: 0.3; cursor: not-allowed; }

  /* 稀有度星级 */
  .rarity-stars { display: flex; gap: 4px; font-size: 18px; }
  .rarity-star { cursor: pointer; opacity: 0.3; transition: opacity 0.2s; }
  .rarity-star.active { opacity: 1; }

  /* 响应式 */
  @media (max-width: 640px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar {
      width: 100%; height: auto; flex-direction: row; padding: 0;
      border-right: none; border-bottom: 1px solid var(--border-dim); overflow-x: auto;
    }
    .admin-logo { display: none; }
    .admin-nav { flex-direction: row; padding: 8px; gap: 4px; }
    .admin-nav-btn { padding: 8px 10px; font-size: 12px; white-space: nowrap; }
    .admin-sidebar-footer { display: none; }
    .admin-content { padding: 16px; }
    .field-group { grid-template-columns: 1fr; }
  }
