:root {
  --surface-0: #000000;
  --surface-1: #141414;
  --surface-2: #1a1a1a;
  --surface-3: #222222;
  --surface-4: #2a2a2a;
  --surface-5: #333333;
  --border-1: rgba(255,255,255,0.06);
  --border-2: rgba(255,255,255,0.10);
  --text-primary: #ffffff;
  --text-secondary: #ffffff;
  --text-tertiary: #d6d6d6;
  --text-muted: #707070;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99,102,241,0.25);
  --accent-soft: rgba(99,102,241,0.12);
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --sidebar-width: 280px;
  --header-h: 56px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --transition-fast: 0.15s cubic-bezier(0.4,0,0.2,1);
  --transition-base: 0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.35s cubic-bezier(0.4,0,0.2,1);
  --sidebar-dark: #000;
  --sidebar-light: #f5f5f5;
  --scroll-btn-bg: rgba(20, 20, 20, 0.88);
  --safe-area-inset-top: env(safe-area-inset-top, 0px);
  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-inset-left: env(safe-area-inset-left, 0px);
  --safe-area-inset-right: env(safe-area-inset-right, 0px);
}

[data-theme="light"] {
  --surface-0: #f5f5f5;
  --surface-1: #ffffff;
  --surface-2: #f9f9f9;
  --surface-3: #f0f0f0;
  --surface-4: #e8e8e8;
  --surface-5: #e0e0e0;
  --border-1: rgba(0,0,0,0.06);
  --border-2: rgba(0,0,0,0.10);
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-tertiary: #6e6e6e;
  --text-muted: #a0a0a0;
  --accent-glow: rgba(99,102,241,0.15);
  --accent-soft: rgba(99,102,241,0.08);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --scroll-btn-bg: rgba(255, 255, 255, 0.88);
}

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

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--surface-0);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
}

#app { display: flex; height: 100vh; width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Shared Keyframes */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes messageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dropdownIn { from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(0.97); } to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes pulseGlow { 0%,100% { transform: scale(0.9); opacity: 0.6; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* Shared components */
.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: none; border: none; color: var(--text-tertiary);
  cursor: pointer; transition: all var(--transition-fast); flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text-primary); }
.icon-btn:active { transform: scale(0.95); }

.shortcut {
  margin-left: auto; font-size: 13px; color: var(--text-muted);
  background: var(--surface-3); padding: 2px 6px; border-radius: 4px;
  font-family: inherit; border: none;
}
