/* ============================================================
   ION Domains · 完整样式表
   包含：基础、布局、仪表盘、域名管理、论坛、特殊功能、状态控制
   ============================================================ */

/* ============================================================
   CSS Variables
   ============================================================ */
:root {
  --bg-primary: #06080f;
  --bg-secondary: #0a0d1a;
  --bg-card: rgba(10, 14, 35, 0.55);
  --bg-card-hover: rgba(16, 22, 50, 0.75);
  --bg-input: rgba(0, 0, 0, 0.35);
  --ion-blue: #00d4ff;
  --ion-blue-dim: rgba(0, 212, 255, 0.12);
  --ion-blue-glow: rgba(0, 212, 255, 0.25);
  --plasma-purple: #7c3aed;
  --plasma-purple-dim: rgba(124, 58, 237, 0.12);
  --energy-orange: #f97316;
  --text-primary: #e8edf5;
  --text-secondary: rgba(200, 215, 235, 0.7);
  --text-muted: rgba(160, 180, 210, 0.5);
  --glass-border: rgba(0, 212, 255, 0.08);
  --glass-border-hover: rgba(0, 212, 255, 0.2);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(24px);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.2s ease;
  --transition-med: 0.3s ease;
  --transition-slow: 0.5s ease;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --font-sans: -apple-system, 'Segoe UI', 'Inter', system-ui, sans-serif;
}

/* ============================================================
   Reset & Base
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--ion-blue); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--plasma-purple); }

::selection { background: var(--ion-blue); color: var(--bg-primary); }

/* ============================================================
   LOADER
   ============================================================ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
#loader canvas { width: 200px; height: 200px; display: block; }

.loader-status { margin-top: 32px; width: 260px; text-align: center; font-family: var(--font-mono); }
.loader-text {
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 14px;
}
.loader-text .highlight { color: var(--ion-blue); }

.loader-progress-wrap {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.loader-progress-wrap .loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--ion-blue), var(--plasma-purple));
  border-radius: 4px;
  transition: width 0.15s linear;
  box-shadow: 0 0 20px var(--ion-blue-glow);
}
.loader-progress-wrap .loader-progress-glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3));
  filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.loader-progress-wrap .loader-progress-glow.active { opacity: 1; }

.loader-progress-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
}
.loader-progress-label .pct { color: var(--ion-blue); }

/* ============================================================
   LOGIN BUTTON
   ============================================================ */
#login-container {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
}
#login-container.visible { display: flex; }

#login-btn {
  position: relative;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  width: 240px;
  height: 60px;
}

#login-btn .btn-bg {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 2px solid var(--ion-blue);
  overflow: hidden;
  transition: border-color var(--transition-med);
}
#login-btn .btn-bg .btn-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.12), rgba(0, 212, 255, 0.2));
  border-radius: var(--radius-md);
  transition: width 0.05s linear;
}
#login-btn .btn-bg .btn-fill-glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.15));
  filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
#login-btn.pressing .btn-bg .btn-fill-glow { opacity: 1; }

#login-btn .btn-text {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: var(--ion-blue);
  transition: color var(--transition-med);
}
#login-btn.pressing .btn-text { color: var(--text-primary); }

#login-btn .btn-shake { display: inline-block; transition: transform 0.05s linear; }
#login-btn.pressing .btn-shake { animation: shake 0.08s linear infinite alternate; }

#login-btn .progress-ring {
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--transition-med);
  z-index: 3;
}
#login-btn.pressing .progress-ring { opacity: 1; }
#login-btn .progress-ring .progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--ion-blue), var(--plasma-purple));
  border-radius: 4px;
  transition: width 0.05s linear;
  box-shadow: 0 0 20px var(--ion-blue-glow);
}

#login-btn .login-hint {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 1px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--transition-med);
  z-index: 3;
}
#login-btn.pressing .login-hint { opacity: 1; }

@keyframes shake {
  0% { transform: translateX(-1px) rotate(-0.5deg); }
  100% { transform: translateX(1px) rotate(0.5deg); }
}

/* ============================================================
   APP LAYOUT
   ============================================================ */
#app {
  display: none;
  width: 100%;
  height: 100vh;
  background: var(--bg-primary);
}
#app.visible { display: flex; }

/* ===== Sidebar ===== */
.sidebar {
  width: 220px;
  min-width: 220px;
  height: 100vh;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
  transition: width var(--transition-med), min-width var(--transition-med);
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 20px 8px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 20px;
}
.sidebar .brand .logo-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--ion-blue); }
.sidebar .brand .logo-icon svg { width: 28px; height: 28px; }
.sidebar .brand .logo-text {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
}
.sidebar .brand .logo-text .accent { color: var(--ion-blue); }
.sidebar .brand .logo-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  display: block;
  margin-top: -2px;
}
.sidebar .nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar .nav .nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  width: 100%;
  position: relative;
}
.sidebar .nav .nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 0;
  background: var(--ion-blue);
  transition: height var(--transition-fast);
  border-radius: 0 2px 2px 0;
}
.sidebar .nav .nav-item:hover { color: var(--text-primary); background: rgba(0, 212, 255, 0.04); }
.sidebar .nav .nav-item.active { color: var(--ion-blue); background: rgba(0, 212, 255, 0.06); }
.sidebar .nav .nav-item.active::before { height: 60%; }
.sidebar .nav .nav-item .nav-icon { width: 18px; height: 18px; flex-shrink: 0; color: currentColor; }
.sidebar .nav .nav-item .nav-icon svg { width: 100%; height: 100%; }
.sidebar .nav .nav-item .nav-badge {
  margin-left: auto;
  font-size: 10px;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 212, 255, 0.12);
  color: var(--ion-blue);
  font-family: var(--font-mono);
}
.sidebar .nav-divider { height: 1px; background: var(--glass-border); margin: 8px 12px; }
.sidebar .sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
  margin-top: auto;
}
.sidebar .sidebar-footer .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(0, 212, 255, 0.03);
}
.sidebar .sidebar-footer .user-info .avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--ion-blue-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ion-blue);
  font-size: 12px;
  font-weight: 600;
}
.sidebar .sidebar-footer .user-info .user-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar .sidebar-footer .user-info .user-email {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar .sidebar-footer .logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
  margin-top: 4px;
}
.sidebar .sidebar-footer .logout-btn:hover { color: #ef4444; background: rgba(239, 68, 68, 0.08); }
.sidebar .sidebar-footer .logout-btn .nav-icon { width: 16px; height: 16px; }

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  padding: 28px 36px 40px 36px;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ============================================================
   PAGE
   ============================================================ */
.page {
  display: none;
  animation: pageFadeIn 0.35s ease;
  width: 100%;
  max-width: 1200px;
}
.page.active { display: block; }

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header { margin-bottom: 28px; }
.page-header .page-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}
.page-header .page-title .accent { color: var(--ion-blue); }
.page-header .page-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.page-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}
.page-header-actions .btn-sm { font-size: 12px; padding: 4px 14px; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  font-weight: 500;
}
.form-group label .hint {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  transition: all var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}
.form-control::placeholder { color: var(--text-muted); opacity: 0.6; }
.form-control:hover { border-color: var(--glass-border-hover); }
.form-control:focus {
  border-color: var(--ion-blue);
  box-shadow: 0 0 24px var(--ion-blue-dim), inset 0 0 20px rgba(0, 212, 255, 0.02);
  background: rgba(0, 0, 0, 0.5);
}
.form-control:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='rgba(160,180,210,0.5)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
select.form-control option { background: var(--bg-secondary); color: var(--text-primary); padding: 8px; }
select.form-control:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='rgba(0,212,255,0.7)'/%3E%3C/svg%3E");
}

textarea.form-control { resize: vertical; min-height: 80px; font-family: var(--font-sans); line-height: 1.6; }

.search-input {
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
  outline: none;
  transition: all var(--transition-fast);
  width: 200px;
}
.search-input::placeholder { color: var(--text-muted); opacity: 0.6; }
.search-input:hover { border-color: var(--glass-border-hover); }
.search-input:focus { border-color: var(--ion-blue); box-shadow: 0 0 20px var(--ion-blue-dim); }

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--ion-blue);
  cursor: pointer;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
input[type="checkbox"]:checked { background-color: var(--ion-blue); border-color: var(--ion-blue); }
input[type="checkbox"]:focus { outline: none; box-shadow: 0 0 12px var(--ion-blue-dim); }

.icon-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
  -webkit-user-select: none;
}
.icon-checkbox:hover { color: var(--text-primary); }

/* ============================================================
   CUSTOM SELECT
   ============================================================ */
.custom-select {
  position: relative;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
}
.custom-select .select-trigger {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all var(--transition-fast);
  min-height: 44px;
  position: relative;
}
.custom-select .select-trigger:hover { border-color: var(--glass-border-hover); }
.custom-select .select-trigger:focus {
  border-color: var(--ion-blue);
  box-shadow: 0 0 24px var(--ion-blue-dim);
  outline: none;
}
.custom-select .select-trigger .trigger-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.custom-select .select-trigger .trigger-placeholder { color: var(--text-muted); opacity: 0.6; }
.custom-select .select-trigger .trigger-arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}
.custom-select .select-trigger .trigger-arrow svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.custom-select.open .select-trigger .trigger-arrow { transform: rotate(180deg); }
.custom-select .select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 6px 4px;
  z-index: 999;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.custom-select.open .select-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.custom-select .select-dropdown::-webkit-scrollbar { width: 4px; }
.custom-select .select-dropdown::-webkit-scrollbar-track { background: transparent; }
.custom-select .select-dropdown::-webkit-scrollbar-thumb { background: var(--ion-blue); border-radius: 4px; }
.custom-select .select-option {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.custom-select .select-option:hover { background: rgba(0, 212, 255, 0.06); color: var(--text-primary); }
.custom-select .select-option.selected { background: rgba(0, 212, 255, 0.08); color: var(--ion-blue); }
.custom-select .select-option .option-check {
  opacity: 0;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--ion-blue);
  transition: opacity var(--transition-fast);
}
.custom-select .select-option .option-check svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.custom-select .select-option.selected .option-check { opacity: 1; }
.custom-select .select-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  min-height: 40px;
  min-width: 80px;
}
.btn:hover:not(:disabled) { border-color: var(--glass-border-hover); color: var(--text-primary); background: var(--bg-card-hover); }
.btn .icon { width: 16px; height: 16px; flex-shrink: 0; }

.btn.loading { pointer-events: none; opacity: 0.7; }
.btn .btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn.loading .btn-spinner { display: inline-block; }
.btn.loading .btn-text,
.btn.loading .btn-icon,
.btn.loading .btn-label { display: none; }

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

.btn-primary { background: var(--ion-blue); color: var(--bg-primary); border-color: var(--ion-blue); }
.btn-primary:hover:not(:disabled) { background: #00c4f0; border-color: #00c4f0; color: var(--bg-primary); box-shadow: 0 0 30px var(--ion-blue-glow); }
.btn-primary .btn-spinner { border-top-color: var(--bg-primary); }

.btn-danger { background: #ef4444; color: white; border-color: #ef4444; }
.btn-danger:hover:not(:disabled) { background: #dc2626; border-color: #dc2626; box-shadow: 0 0 30px rgba(239, 68, 68, 0.3); }
.btn-danger .btn-spinner { border-top-color: white; }

.btn-outline { background: transparent; border: 1px solid var(--glass-border); color: var(--text-secondary); }
.btn-outline:hover:not(:disabled) { border-color: rgba(255, 255, 255, 0.2); color: var(--text-primary); }

.btn-sm {
  padding: 4px 12px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  min-width: auto;
}
.btn-sm:hover:not(:disabled) { border-color: var(--glass-border-hover); color: var(--text-primary); }
.btn-sm.primary { border-color: rgba(0, 212, 255, 0.2); color: var(--ion-blue); }
.btn-sm.primary:hover:not(:disabled) { background: rgba(0, 212, 255, 0.06); border-color: var(--ion-blue); }
.btn-sm.danger:hover:not(:disabled) { border-color: rgba(239, 68, 68, 0.3); color: #ef4444; }
.btn-sm .icon { width: 12px; height: 12px; }
.btn-sm .btn-spinner { width: 14px; height: 14px; border-width: 2px; }

.btn-icon {
  padding: 4px 8px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 28px;
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover:not(:disabled) { background: rgba(0, 212, 255, 0.06); color: var(--text-primary); }
.btn-icon.danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.08); color: #ef4444; }
.btn-icon .icon { width: 14px; height: 14px; }

.btn-refresh { padding: 4px 10px; font-size: 12px; }
.btn-refresh .icon { width: 14px; height: 14px; transition: transform 0.4s ease; }
.btn-refresh:hover .icon { transform: rotate(180deg); }
.btn-refresh.loading .icon { animation: spin 0.7s linear infinite; }

/* ============================================================
   BUTTONS - 操作按钮 (进度灌满)
   ============================================================ */
.btn-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 44px;
  min-width: 120px;
  overflow: hidden;
  font-weight: 500;
}
.btn-action:hover:not(:disabled) { border-color: var(--glass-border-hover); color: var(--text-primary); background: var(--bg-card-hover); }
.btn-action.primary { background: var(--ion-blue); color: var(--bg-primary); border-color: var(--ion-blue); }
.btn-action.primary:hover:not(:disabled) { background: #00c4f0; border-color: #00c4f0; box-shadow: 0 0 30px var(--ion-blue-glow); }
.btn-action.danger { background: #ef4444; color: white; border-color: #ef4444; }
.btn-action.danger:hover:not(:disabled) { background: #dc2626; border-color: #dc2626; box-shadow: 0 0 30px rgba(239, 68, 68, 0.3); }

.btn-action .btn-progress-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  height: 100%;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  transition: width 0.1s linear;
}
.btn-action.primary .btn-progress-fill { background: rgba(0, 0, 0, 0.15); }
.btn-action.danger .btn-progress-fill { background: rgba(255, 255, 255, 0.15); }

.btn-action .btn-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-action .btn-content .btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-action.loading .btn-content .btn-spinner { display: inline-block; }
.btn-action.loading .btn-content .btn-label { display: none; }

.btn-action.pulsing { animation: btnPulse 1s ease-in-out infinite; }
@keyframes btnPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }

.btn-action.completed { border-color: #10b981; box-shadow: 0 0 40px rgba(16, 185, 129, 0.3); }
.btn-action.completed .btn-content .btn-label { color: #10b981; }

/* ============================================================
   DROPDOWN MENU
   ============================================================ */
.dropdown { position: relative; display: inline-block; z-index: 10; }
.dropdown .dropdown-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dropdown .dropdown-toggle:hover { background: rgba(0, 212, 255, 0.06); color: var(--text-primary); }
.dropdown .dropdown-toggle .icon { width: 18px; height: 18px; }

.dropdown .dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 180px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 6px 4px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.dropdown .dropdown-menu.open {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: all var(--transition-fast);
}
.dropdown .dropdown-item:hover { background: rgba(0, 212, 255, 0.06); color: var(--text-primary); }
.dropdown .dropdown-item .item-icon { width: 16px; height: 16px; flex-shrink: 0; color: currentColor; }
.dropdown .dropdown-item .item-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dropdown .dropdown-item.danger { color: #ef4444; }
.dropdown .dropdown-item.danger:hover { background: rgba(239, 68, 68, 0.08); color: #ef4444; }
.dropdown .dropdown-divider { height: 1px; background: var(--glass-border); margin: 4px 12px; }

/* ============================================================
   DOMAIN CARD
   ============================================================ */
.domain-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: all var(--transition-med);
  position: relative;
  overflow: visible;
  z-index: 1;
}
.domain-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.02), transparent 50%);
  pointer-events: none;
  border-radius: var(--radius-lg);
}
.domain-card:hover {
  border-color: var(--glass-border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  z-index: 100;
}
.domain-card .domain-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.domain-card .domain-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.domain-card .domain-name .root { color: var(--text-muted); font-weight: 400; }
.domain-card .domain-mode-badge {
  font-size: 10px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.domain-card .domain-mode-badge.ion {
  background: rgba(0, 212, 255, 0.12);
  color: var(--ion-blue);
  border: 1px solid rgba(0, 212, 255, 0.15);
}
.domain-card .domain-mode-badge.self {
  background: rgba(249, 115, 22, 0.12);
  color: var(--energy-orange);
  border: 1px solid rgba(249, 115, 22, 0.15);
}
.domain-card .domain-stats {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-family: var(--font-mono);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.domain-card .domain-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ============================================================
   DOMAIN STATUS BADGE
   ============================================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.status-badge.active {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.15);
}
.status-badge.client_push {
  background: rgba(249, 115, 22, 0.12);
  color: var(--energy-orange);
  border: 1px solid rgba(249, 115, 22, 0.15);
}
.status-badge.server_push {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.15);
}
.status-badge.server_hold {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ============================================================
   DOMAIN DETAIL
   ============================================================ */
.domain-detail-mode {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}
.domain-detail-mode .mode-label { font-size: 12px; color: var(--text-muted); }
.domain-detail-mode .mode-value { font-size: 13px; font-weight: 500; font-family: var(--font-mono); }
.domain-detail-mode .mode-value.ion { color: var(--ion-blue); }
.domain-detail-mode .mode-value.self { color: var(--energy-orange); }

.record-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.record-list-header .record-count { font-size: 12px; color: var(--text-muted); }

.record-list { margin-bottom: 20px; }
.record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  transition: all var(--transition-fast);
}
.record-item:hover { border-color: var(--glass-border-hover); }
.record-item .record-info {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
}
.record-item .record-type {
  font-weight: 600;
  color: var(--ion-blue);
  font-family: var(--font-mono);
  font-size: 12px;
  min-width: 40px;
}
.record-item .record-domain { font-family: var(--font-mono); font-size: 13px; color: var(--text-primary); }
.record-item .record-arrow { color: var(--text-muted); }
.record-item .record-value { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.record-item .record-ttl { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.record-item .record-actions { display: flex; gap: 4px; flex-shrink: 0; }
.empty-records { text-align: center; padding: 32px; color: var(--text-muted); font-size: 13px; }

.add-record-form {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.add-record-form .form-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.add-record-form .form-title .edit-badge {
  font-size: 10px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: rgba(0, 212, 255, 0.12);
  color: var(--ion-blue);
  font-family: var(--font-mono);
  margin-left: 8px;
}
.add-record-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.add-record-form .form-group { margin-bottom: 12px; }
.add-record-form .form-group label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.add-record-form .form-group label .hint { font-size: 11px; color: var(--text-muted); font-weight: 400; text-transform: none; }
.add-record-form .form-control { padding: 8px 12px; font-size: 13px; }
.add-record-form .subhost-preview {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  margin-top: 4px;
}
.add-record-form .subhost-preview .highlight { color: var(--ion-blue); }
.add-record-form .form-actions { display: flex; gap: 10px; margin-top: 4px; }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: all var(--transition-med);
}
.stat-card:hover { border-color: var(--glass-border-hover); background: var(--bg-card-hover); }
.stat-card .stat-value { font-size: 28px; font-weight: 600; color: var(--text-primary); font-family: var(--font-mono); }
.stat-card .stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

.dashboard-activity {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.dashboard-activity .activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.dashboard-activity .activity-header h3 { font-size: 14px; font-weight: 500; color: var(--text-secondary); letter-spacing: 0.5px; }
.dashboard-activity .activity-header .activity-count { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.activity-item:last-child { border-bottom: none; }
.activity-item .activity-dot { width: 6px; height: 6px; border-radius: var(--radius-full); flex-shrink: 0; }
.activity-item .activity-dot.blue { background: var(--ion-blue); }
.activity-item .activity-dot.purple { background: var(--plasma-purple); }
.activity-item .activity-dot.orange { background: var(--energy-orange); }
.activity-item .activity-dot.green { background: #10b981; }

.activity-item .activity-text { flex: 1; font-size: 13px; color: var(--text-secondary); }
.activity-item .activity-text strong { color: var(--text-primary); }
.activity-item .activity-time { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); flex-shrink: 0; }

.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   DOMAIN LIST
   ============================================================ */
.domain-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.domain-list-header .domain-count { font-size: 13px; color: var(--text-secondary); }
.domain-list-header .domain-count strong { color: var(--text-primary); }
.domain-list-search { display: flex; gap: 10px; align-items: center; }
.domain-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ============================================================
   SPECIAL FUNCTIONS
   ============================================================ */
.special-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  transition: all var(--transition-med);
}
.special-card:hover {
  border-color: var(--glass-border-hover);
  background: var(--bg-card-hover);
}
.special-card .special-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.special-card .special-card-header .special-card-icon {
  font-size: 24px;
}
.special-card .special-card-header .special-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.special-card .special-card-body .form-group:last-child {
  margin-bottom: 0;
}

/* ============================================================
   REGISTER & CLAIM
   ============================================================ */
.register-container { max-width: 560px; margin: 0 auto; width: 100%; }
.register-container .register-preview {
  margin-top: 16px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text-secondary);
}
.register-container .register-preview .highlight { color: var(--ion-blue); }
.register-container .register-hint { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

.claim-container { max-width: 480px; margin: 0 auto; width: 100%; }
.claim-container .claim-hint { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.claim-container .claim-hint .example { color: var(--ion-blue); font-family: var(--font-mono); }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-container { max-width: 520px; margin: 0 auto; width: 100%; }
.settings-container .settings-group { margin-bottom: 24px; }
.settings-container .settings-group .settings-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: block;
}
.settings-container .settings-group+.settings-group { padding-top: 20px; border-top: 1px solid var(--glass-border); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: background 0.35s ease, backdrop-filter 0.35s ease;
}
.modal-overlay.active {
  display: flex;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.modal-overlay .modal {
  max-width: 560px;
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--glass-shadow);
  opacity: 0;
  transform: scale(0.92) translateY(20px);
  transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.active .modal { opacity: 1; transform: scale(1) translateY(0); }
.modal-overlay.closing { pointer-events: none; }
.modal-overlay.closing .modal {
  opacity: 0;
  transform: scale(0.92) translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.modal-overlay.closing {
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background 0.25s ease, backdrop-filter 0.25s ease;
}
.modal-overlay .modal.modal-lg { max-width: 700px; }
.modal-overlay .modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}
.modal-overlay .modal .modal-header .modal-title { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.modal-overlay .modal .modal-header .modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-overlay .modal .modal-header .modal-close:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
.modal-overlay .modal .modal-header .modal-close .icon { width: 22px; height: 22px; }
.modal-overlay .modal .modal-body { color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.modal-overlay .modal .modal-body .form-group:last-child { margin-bottom: 0; }

/* ============================================================
   PIN MODAL (锁定域名专用)
   ============================================================ */
.pin-modal .modal { max-width: 420px; }
.pin-modal .pin-display {
  text-align: center;
  padding: 8px 0 16px 0;
}
.pin-modal .pin-display .pin-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.pin-modal .pin-display .pin-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}
.pin-modal .pin-input-group {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 16px 0;
}
.pin-modal .pin-input-group .pin-box {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: 28px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
  caret-color: var(--ion-blue);
}
.pin-modal .pin-input-group .pin-box:focus {
  border-color: var(--ion-blue);
  box-shadow: 0 0 20px var(--ion-blue-dim);
}
.pin-modal .pin-input-group .pin-box::placeholder {
  color: var(--text-muted);
  font-size: 14px;
}
.pin-modal .pin-warning {
  font-size: 12px;
  color: var(--energy-orange);
  padding: 10px 14px;
  background: rgba(249, 115, 22, 0.06);
  border-left: 2px solid var(--energy-orange);
  border-radius: var(--radius-sm);
  margin: 8px 0;
}
.pin-modal .pin-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}
.pin-modal .pin-actions .btn {
  min-width: 100px;
}

/* ============================================================
   TRANSFER CODE
   ============================================================ */
.transfer-code-display {
  text-align: center;
  padding: 20px;
  margin: 12px 0;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}
.transfer-code-display .code {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--ion-blue);
  letter-spacing: 4px;
  word-break: break-all;
  user-select: all;
}
.transfer-code-display .copy-btn {
  margin-top: 8px;
  padding: 6px 16px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: var(--radius-sm);
  color: var(--ion-blue);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
}
.transfer-code-display .copy-btn:hover { background: rgba(0, 212, 255, 0.15); }

.transfer-warning {
  font-size: 13px;
  color: var(--energy-orange);
  padding: 12px 16px;
  background: rgba(249, 115, 22, 0.06);
  border-left: 2px solid var(--energy-orange);
  border-radius: var(--radius-sm);
  margin: 12px 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
  margin-top: 16px;
}
.modal-footer .btn {
  padding: 8px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  min-height: 36px;
}
.modal-footer .btn-primary { background: var(--ion-blue); color: var(--bg-primary); }
.modal-footer .btn-primary:hover:not(:disabled) { box-shadow: 0 0 30px var(--ion-blue-glow); }
.modal-footer .btn-outline { background: transparent; border: 1px solid var(--glass-border); color: var(--text-secondary); }
.modal-footer .btn-outline:hover:not(:disabled) { border-color: rgba(255, 255, 255, 0.2); color: var(--text-primary); }
.modal-footer .btn-danger { background: #ef4444; color: white; }
.modal-footer .btn-danger:hover:not(:disabled) { box-shadow: 0 0 30px rgba(239, 68, 68, 0.3); }

/* ============================================================
   CONFIRM MODAL
   ============================================================ */
.confirm-modal .modal { max-width: 420px; }
.confirm-modal .confirm-icon { text-align: center; font-size: 48px; margin-bottom: 12px; }
.confirm-modal .confirm-title { text-align: center; font-size: 18px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.confirm-modal .confirm-message { text-align: center; font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.confirm-modal .confirm-message .highlight { color: var(--ion-blue); font-family: var(--font-mono); }
.confirm-modal .confirm-actions { display: flex; gap: 10px; justify-content: center; }

/* ============================================================
   AUTH SWITCH
   ============================================================ */
.auth-switch { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-muted); }
.auth-switch a { color: var(--ion-blue); cursor: pointer; text-decoration: none; transition: color var(--transition-fast); }
.auth-switch a:hover { color: #00c4f0; text-decoration: underline; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 14px;
  box-shadow: var(--glass-shadow);
  animation: toastSlide 0.3s ease-out;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.toast.success { border-color: rgba(16, 185, 129, 0.3); color: #10b981; }
.toast.error { border-color: rgba(239, 68, 68, 0.3); color: #ef4444; }
.toast.warning { border-color: rgba(249, 115, 22, 0.3); color: var(--energy-orange); }
@keyframes toastSlide {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   MODE TOGGLE
   ============================================================ */
.mode-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  -webkit-user-select: none;
}
.mode-toggle:hover { border-color: var(--glass-border-hover); }
.mode-toggle .mode-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.mode-toggle .mode-track {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-med);
  flex-shrink: 0;
}
.mode-toggle .mode-track .mode-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--text-muted);
  transition: all var(--transition-med);
}
.mode-toggle .mode-track .mode-thumb .thumb-icon { width: 100%; height: 100%; padding: 3px; color: var(--bg-primary); }
.mode-toggle .mode-track .mode-thumb .thumb-icon svg { width: 100%; height: 100%; }
.mode-toggle.active .mode-track { border-color: var(--ion-blue); background: var(--ion-blue-dim); }
.mode-toggle.active .mode-track .mode-thumb { left: 22px; background: var(--ion-blue); box-shadow: 0 0 16px var(--ion-blue-glow); }
.mode-toggle .mode-status { font-size: 11px; font-weight: 500; font-family: var(--font-mono); min-width: 48px; }
.mode-toggle .mode-status.ion { color: var(--ion-blue); }
.mode-toggle .mode-status.self { color: var(--energy-orange); }

/* ============================================================
   COMPLETION FLASH
   ============================================================ */
.flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
}
.flash-overlay.active { opacity: 1; }
.flash-overlay .flash-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(0, 212, 255, 0.6);
  animation: flashRing 0.8s ease-out forwards;
}
.flash-overlay.success .flash-ring { border-color: rgba(16, 185, 129, 0.6); }
.flash-overlay.danger .flash-ring { border-color: rgba(239, 68, 68, 0.6); }
@keyframes flashRing {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(20); opacity: 0; }
}
.flash-overlay .flash-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.15), transparent 70%);
  animation: flashGlow 0.8s ease-out forwards;
}
.flash-overlay.success .flash-glow { background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%); }
.flash-overlay.danger .flash-glow { background: radial-gradient(circle, rgba(239, 68, 68, 0.15), transparent 70%); }
@keyframes flashGlow {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(15); opacity: 0; }
}

/* ============================================================
   NODE STATUS INDICATOR
   ============================================================ */
.node-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.node-status .status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.node-status .status-dot.online { background: #10b981; box-shadow: 0 0 12px rgba(16, 185, 129, 0.4); }
.node-status .status-dot.standby { background: var(--energy-orange); box-shadow: 0 0 12px rgba(249, 115, 22, 0.3); }
.node-status .status-dot.offline { background: #6b7280; box-shadow: none; }
.node-status .status-dot.deploying { background: var(--ion-blue); animation: dotPulse 0.8s ease-in-out infinite; }
@keyframes dotPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }

/* ============================================================
   FORUM - 讨论区
   ============================================================ */

/* 论坛头部 */
.forum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.forum-header .forum-title-area h1 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}
.forum-header .forum-title-area p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* 分类标签栏 */
.forum-categories {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
}
.forum-categories .cat-btn {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.forum-categories .cat-btn:hover {
  border-color: var(--glass-border-hover);
  color: var(--text-primary);
  background: rgba(0, 212, 255, 0.04);
}
.forum-categories .cat-btn.active {
  background: rgba(0, 212, 255, 0.08);
  border-color: var(--ion-blue);
  color: var(--ion-blue);
}
.forum-categories .cat-btn .cat-icon { margin-right: 4px; }

/* 话题列表 */
.topic-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.topic-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.topic-item:hover {
  border-color: var(--glass-border-hover);
  background: var(--bg-card-hover);
}
.topic-item .topic-pin { color: var(--energy-orange); font-size: 14px; flex-shrink: 0; }
.topic-item .topic-status { font-size: 14px; flex-shrink: 0; color: var(--text-muted); }
.topic-item .topic-status.locked { color: #ef4444; }
.topic-item .topic-status.solved { color: #10b981; }

.topic-item .topic-content { flex: 1; min-width: 0; }
.topic-item .topic-content .topic-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.topic-item .topic-content .topic-title .topic-badge {
  font-size: 9px;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.topic-item .topic-content .topic-title .topic-badge.pinned {
  background: rgba(249, 115, 22, 0.12);
  color: var(--energy-orange);
}
.topic-item .topic-content .topic-title .topic-badge.locked {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}
.topic-item .topic-content .topic-title .topic-badge.solved {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.topic-item .topic-content .topic-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.topic-item .topic-content .topic-meta .topic-category {
  font-size: 10px;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 212, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
}
.topic-item .topic-content .topic-meta .topic-author { color: var(--text-secondary); }
.topic-item .topic-content .topic-meta .topic-author strong { color: var(--text-primary); font-weight: 500; }
.topic-item .topic-content .topic-meta .topic-time { color: var(--text-muted); }
.topic-item .topic-content .topic-meta .topic-replies { color: var(--text-secondary); font-family: var(--font-mono); font-size: 11px; }
.topic-item .topic-content .topic-meta .topic-views { color: var(--text-muted); font-size: 11px; }
.topic-item .topic-content .topic-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.topic-item .topic-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--ion-blue-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ion-blue);
}

/* 分页 */
.forum-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}
.forum-pagination .page-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 36px;
  text-align: center;
}
.forum-pagination .page-btn:hover {
  border-color: var(--glass-border-hover);
  color: var(--text-primary);
}
.forum-pagination .page-btn.active {
  background: rgba(0, 212, 255, 0.08);
  border-color: var(--ion-blue);
  color: var(--ion-blue);
}
.forum-pagination .page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ============================================================
   TOPIC DETAIL
   ============================================================ */

.topic-detail-header { margin-bottom: 20px; }
.topic-detail-header .back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: color var(--transition-fast);
  padding: 0;
  margin-bottom: 12px;
}
.topic-detail-header .back-btn:hover { color: var(--text-primary); }
.topic-detail-header .back-btn .icon { width: 16px; height: 16px; }

.topic-detail-header .topic-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.topic-detail-header .topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--text-muted);
}
.topic-detail-header .topic-meta .meta-item { display: flex; align-items: center; gap: 4px; }
.topic-detail-header .topic-meta .meta-item strong { color: var(--text-secondary); font-weight: 500; }

/* 话题内容 */
.topic-content-body {
  padding: 20px 0;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 20px;
}
.topic-content-body .topic-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}
.topic-content-body .topic-text p { margin-bottom: 12px; }
.topic-content-body .topic-text code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ion-blue);
}
.topic-content-body .topic-text pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 16px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}
.topic-content-body .topic-text blockquote {
  border-left: 3px solid var(--ion-blue);
  padding-left: 16px;
  margin: 12px 0;
  color: var(--text-muted);
}
.topic-content-body .topic-text ul, .topic-content-body .topic-text ol { padding-left: 24px; margin: 8px 0; }
.topic-content-body .topic-text a { color: var(--ion-blue); text-decoration: none; }
.topic-content-body .topic-text a:hover { text-decoration: underline; }
.topic-content-body .topic-text img { max-width: 100%; border-radius: var(--radius-md); margin: 8px 0; }

.topic-content-body .topic-author-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}
.topic-content-body .topic-author-info .author-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--ion-blue-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ion-blue);
}
.topic-content-body .topic-author-info .author-name { font-weight: 500; color: var(--text-primary); }
.topic-content-body .topic-author-info .author-time { font-size: 12px; color: var(--text-muted); }

/* 回复列表 */
.reply-list { margin: 16px 0 24px 0; }
.reply-list .reply-header { font-size: 14px; font-weight: 500; color: var(--text-secondary); margin-bottom: 12px; }

.reply-item {
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all var(--transition-fast);
}
.reply-item:hover { border-color: var(--glass-border-hover); }
.reply-item .reply-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.reply-item .reply-meta .reply-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--ion-blue-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ion-blue);
}
.reply-item .reply-meta .reply-author { font-weight: 500; font-size: 13px; color: var(--text-primary); }
.reply-item .reply-meta .reply-time { font-size: 12px; color: var(--text-muted); }
.reply-item .reply-meta .reply-solution {
  font-size: 10px;
  padding: 1px 10px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  font-weight: 500;
}
.reply-item .reply-content { font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
.reply-item .reply-content p { margin-bottom: 8px; }
.reply-item .reply-content code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ion-blue);
}
.reply-item .reply-content pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid var(--glass-border);
}
.reply-item .reply-actions { margin-top: 8px; display: flex; gap: 8px; }
.reply-item .reply-actions .btn-sm { font-size: 11px; padding: 2px 10px; }

/* 回复表单 */
.reply-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}
.reply-form .reply-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 10px; display: block; }
.reply-form .reply-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  resize: vertical;
  outline: none;
  transition: all var(--transition-fast);
  line-height: 1.6;
}
.reply-form .reply-textarea::placeholder { color: var(--text-muted); }
.reply-form .reply-textarea:focus { border-color: var(--ion-blue); box-shadow: 0 0 24px var(--ion-blue-dim); }
.reply-form .reply-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  align-items: center;
}
.reply-form .reply-actions .btn { min-width: auto; }
.reply-form .reply-actions .reply-hint { font-size: 11px; color: var(--text-muted); }
.reply-form .reply-actions .reply-hint code {
  background: rgba(0, 0, 0, 0.2);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

/* ============================================================
   NEW TOPIC
   ============================================================ */

.new-topic-form {
  max-width: 700px;
  margin: 0 auto;
}
.new-topic-form .form-group { margin-bottom: 20px; }
.new-topic-form .form-group label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
}
.new-topic-form .form-group .hint {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.new-topic-form .form-control { font-size: 14px; padding: 10px 14px; }
.new-topic-form .form-control.title-input { font-size: 18px; font-weight: 500; }
.new-topic-form .form-control.content-textarea {
  min-height: 200px;
  font-family: var(--font-sans);
  line-height: 1.7;
  resize: vertical;
}
.new-topic-form .form-actions { display: flex; gap: 12px; margin-top: 8px; }
.new-topic-form .form-actions .btn { min-width: 100px; }

/* ============================================================
   BUTTON ANIMATIONS
   ============================================================ */

.btn, .btn-action, .btn-sm, .btn-icon, .dropdown-item {
  position: relative;
  overflow: hidden;
}
.btn::after, .btn-action::after, .btn-sm::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.15), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: inherit;
}
.btn:active::after, .btn-action:active::after, .btn-sm:active::after {
  opacity: 1;
  animation: rippleOut 0.6s ease-out forwards;
}
@keyframes rippleOut {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

.btn-send {
  position: relative;
  transition: all 0.3s ease;
}
.btn-send .send-icon {
  transition: transform 0.3s ease;
}
.btn-send:hover:not(:disabled) .send-icon {
  transform: translateX(4px) rotate(-10deg);
}
.btn-send.loading .send-icon {
  animation: sendPulse 0.8s ease-in-out infinite;
}
@keyframes sendPulse {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}
.btn-send.completed {
  background: #10b981 !important;
  border-color: #10b981 !important;
}
.btn-send.completed .send-icon {
  transform: translateX(0) scale(1.2);
}
.btn-send.completed .btn-label {
  color: white;
}

.btn-delete-anim {
  position: relative;
  transition: all 0.3s ease;
}
.btn-delete-anim .delete-icon {
  transition: transform 0.3s ease;
}
.btn-delete-anim:hover:not(:disabled) .delete-icon {
  transform: scale(1.2) rotate(-10deg);
}
.btn-delete-anim.loading .delete-icon {
  animation: deleteShake 0.4s ease-in-out infinite;
}
@keyframes deleteShake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}
.btn-delete-anim.confirming {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
  animation: confirmPulse 0.8s ease-in-out infinite;
}
@keyframes confirmPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.2); }
  50% { box-shadow: 0 0 20px 8px rgba(239, 68, 68, 0.05); }
}

.btn-complete-flash {
  animation: completeFlash 0.6s ease;
}
@keyframes completeFlash {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 0 40px 10px rgba(16, 185, 129, 0.15); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-error-shake {
  animation: errorShake 0.5s ease;
}
@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.topic-item {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.topic-item:hover {
  transform: translateX(4px);
}

.forum-categories .cat-btn {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.forum-categories .cat-btn.active {
  transform: scale(1.02);
}

.modal-body .loading-skeleton {
  animation: skeletonPulse 1.2s ease-in-out infinite;
}
@keyframes skeletonPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.reply-item {
  animation: replyAppear 0.4s ease-out;
}
@keyframes replyAppear {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.topic-item {
  animation: topicAppear 0.35s ease-out forwards;
  opacity: 0;
}
.topic-item:nth-child(1) { animation-delay: 0.02s; }
.topic-item:nth-child(2) { animation-delay: 0.04s; }
.topic-item:nth-child(3) { animation-delay: 0.06s; }
.topic-item:nth-child(4) { animation-delay: 0.08s; }
.topic-item:nth-child(5) { animation-delay: 0.10s; }
.topic-item:nth-child(6) { animation-delay: 0.12s; }
.topic-item:nth-child(7) { animation-delay: 0.14s; }
.topic-item:nth-child(8) { animation-delay: 0.16s; }
.topic-item:nth-child(9) { animation-delay: 0.18s; }
.topic-item:nth-child(10) { animation-delay: 0.20s; }

@keyframes topicAppear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .sidebar { width: 60px; min-width: 60px; padding: 16px 10px; }
  .sidebar .brand .logo-text, .sidebar .brand .logo-sub,
  .sidebar .nav .nav-item .nav-label, .sidebar .nav .nav-item .nav-badge,
  .sidebar .sidebar-footer .user-info .user-name,
  .sidebar .sidebar-footer .user-info .user-email,
  .sidebar .sidebar-footer .logout-btn .nav-label { display: none; }
  .sidebar .sidebar-footer .user-info .avatar { width: 32px; height: 32px; font-size: 14px; }
  .sidebar .nav .nav-item { justify-content: center; padding: 10px; }
  .sidebar .nav .nav-item .nav-icon { width: 20px; height: 20px; }
  .sidebar .sidebar-footer .logout-btn { justify-content: center; }

  .main-content { padding: 16px 16px 24px 16px; }
  .domain-grid { grid-template-columns: 1fr; }
  .add-record-form .form-row { grid-template-columns: 1fr; }
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
  .domain-list-search .search-input { width: 140px; }
  .modal-overlay .modal { padding: 20px; margin: 12px; }
  .transfer-code-display .code { font-size: 20px; letter-spacing: 2px; }
  .modal-overlay .modal.modal-lg { max-width: 100%; margin: 12px; }
  .custom-select .select-dropdown { max-height: 160px; }
  .btn-action { min-height: 40px; min-width: 80px; padding: 8px 16px; font-size: 12px; }
  .mode-toggle .mode-track { width: 38px; height: 20px; }
  .mode-toggle .mode-track .mode-thumb { width: 14px; height: 14px; }
  .mode-toggle.active .mode-track .mode-thumb { left: 20px; }
  .dropdown .dropdown-menu { min-width: 160px; }
  .register-container, .claim-container, .settings-container { max-width: 100%; }

  .forum-header { flex-direction: column; align-items: stretch; }
  .forum-header .forum-title-area h1 { font-size: 18px; }
  .topic-item { flex-wrap: wrap; padding: 10px 12px; }
  .topic-item .topic-avatar { display: none; }
  .topic-item .topic-content .topic-title { font-size: 13px; }
  .topic-item .topic-content .topic-meta { font-size: 11px; gap: 8px; }
  .forum-categories .cat-btn { font-size: 11px; padding: 4px 12px; }
  .topic-detail-header .topic-title { font-size: 18px; }
  .topic-content-body .topic-text { font-size: 14px; }
  .reply-item { padding: 12px; }
  .new-topic-form { max-width: 100%; }
  .pin-modal .pin-input-group .pin-box { width: 40px; height: 48px; font-size: 22px; }
}

@media (max-width: 480px) {
  .dashboard-stats { grid-template-columns: 1fr; }
  .domain-list-search { width: 100%; }
  .domain-list-search .search-input { flex: 1; width: 100%; }
  .domain-list-header { flex-direction: column; align-items: stretch; }
  .dropdown .dropdown-menu { right: -8px; min-width: 150px; }
  .register-container, .claim-container, .settings-container { max-width: 100%; padding: 0 4px; }

  .topic-item .topic-content .topic-meta .topic-views { display: none; }
  .topic-item .topic-content .topic-title .topic-badge { font-size: 8px; padding: 0px 6px; }
  .forum-categories { gap: 4px; }
  .forum-categories .cat-btn { font-size: 10px; padding: 3px 10px; }
  .reply-form .reply-actions { flex-wrap: wrap; }
  .pin-modal .pin-input-group { gap: 8px; }
  .pin-modal .pin-input-group .pin-box { width: 36px; height: 44px; font-size: 18px; }
}