/* GraTech Commander - Complete Styles */
/* By Suliman Alshammari @Grar00t */
/* "Your AI, Your Way, Your Language" 🌍 */

/* ═══════════════════════════════════════════════════════════════════════════════
   🎨 CSS VARIABLES & DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════════════════════ */

:root {
  /* Core Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --bg-elevated: #22222d;
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #6b6b7b;
  
  /* Accent Colors */
  --accent-primary: #00d4ff;
  --accent-secondary: #7c3aed;
  --accent-tertiary: #667eea;
  --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7c3aed 50%, #667eea 100%);
  --accent-glow: 0 0 20px rgba(0, 212, 255, 0.3);
  
  /* Status Colors */
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.15);
  --error: #ef4444;
  --error-light: rgba(239, 68, 68, 0.15);
  --info: #3b82f6;
  --info-light: rgba(59, 130, 246, 0.15);
  
  /* Special Colors */
  --gold: #ffd700;
  --gold-light: rgba(255, 215, 0, 0.15);
  
  /* Borders & Shadows */
  --border-color: #2a2a3a;
  --border-light: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.15);
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 15px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
  
  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-modal: 1000;
  --z-onboarding: 9999;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🔄 RESET & BASE STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Cairo', 'Inter', 'Noto Sans Arabic', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans SC', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* RTL/LTR Support */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="ltr"] {
  direction: ltr;
  text-align: left;
}

/* Focus Styles for Accessibility */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🎉 ONBOARDING WIZARD
   ═══════════════════════════════════════════════════════════════════════════════ */

.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s ease;
}

.onboarding-overlay.hidden { display: none; }

.onboarding-container {
  width: 90%;
  max-width: 700px;
  text-align: center;
  position: relative;
}

.onboarding-step {
  display: none;
  animation: slideIn 0.5s ease;
}

.onboarding-step.active { display: block; }

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

.logo-animation {
  font-size: 80px;
  animation: pulse 2s infinite;
  margin-bottom: 20px;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.gradient-text {
  background: linear-gradient(135deg, #00d4ff, #7c3aed, #00d4ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  font-size: 32px;
  margin-bottom: 15px;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.subtitle, .step-desc {
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 30px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 40px;
}

.feature-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 15px;
  padding: 20px 15px;
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  background: rgba(0,212,255,0.1);
}

.feature-card span { font-size: 30px; display: block; margin-bottom: 10px; }
.feature-card p { font-size: 13px; color: #fff; }

/* Onboarding Buttons */
.onboarding-btn {
  padding: 15px 40px;
  border-radius: 30px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.onboarding-btn.primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(0,212,255,0.3);
}

.onboarding-btn.primary:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(0,212,255,0.5);
}

.onboarding-btn.primary.pulse { animation: btnPulse 2s infinite; }

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(0,212,255,0.3); }
  50% { box-shadow: 0 4px 40px rgba(0,212,255,0.6); }
}

.onboarding-btn.secondary {
  background: rgba(255,255,255,0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.2);
}

.onboarding-btn.secondary:hover {
  background: rgba(255,255,255,0.15);
  color: white;
}

.onboarding-btn.large { padding: 20px 60px; font-size: 20px; }

.step-nav { display: flex; justify-content: center; gap: 20px; margin-top: 30px; }

/* Model Selection */
.model-selection, .api-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.model-option, .api-option {
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 15px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.model-option:hover, .api-option:hover,
.model-option.selected, .api-option.selected {
  border-color: var(--accent-primary);
  background: rgba(0,212,255,0.1);
}

.model-option.selected, .api-option.selected {
  box-shadow: 0 0 20px rgba(0,212,255,0.2);
}

.model-emoji { font-size: 40px; display: block; margin-bottom: 10px; }
.model-option h4, .api-option h4 { margin-bottom: 5px; }
.model-option p, .api-option p { color: var(--text-secondary); font-size: 13px; }

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
}

.badge.popular { background: var(--success); color: white; }
.badge.pro { background: #7c3aed; color: white; }
.badge.dev { background: var(--warning); color: black; }
.badge.fast { background: var(--accent-primary); color: black; }

/* BYOK Fields */
.byok-fields {
  background: rgba(255,255,255,0.05);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
}

.byok-fields.hidden { display: none; }

.input-field { margin-bottom: 15px; text-align: right; }
.input-field label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 14px; }

.input-field input {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 12px 15px;
  border-radius: 10px;
  font-family: inherit;
}

.input-field input:focus { outline: none; border-color: var(--accent-primary); }

/* Privacy Box */
.privacy-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(16,185,129,0.1);
  border: 1px solid var(--success);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
}

.privacy-box span { font-size: 24px; }
.privacy-box p { color: var(--success); font-size: 14px; }

/* Consent Options */
.consent-options {
  background: rgba(255,255,255,0.05);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: right;
}

.consent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
}

.consent-item:last-child { border-bottom: none; }
.consent-item input { width: 20px; height: 20px; accent-color: var(--accent-primary); }

/* Philosophy Quote */
.philosophy-quote {
  background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(124,58,237,0.1));
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
}

.philosophy-quote blockquote {
  font-size: 16px;
  font-style: italic;
  color: #fff;
  line-height: 1.8;
}

/* Success Icon */
.success-icon {
  font-size: 80px;
  animation: bounce 1s ease infinite;
  margin-bottom: 20px;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* Tips Box */
.tips-box {
  background: rgba(255,255,255,0.05);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
  text-align: right;
}

.tips-box h4 { margin-bottom: 15px; color: var(--accent-primary); }
.tips-box ul { list-style: none; padding: 0; }
.tips-box li { padding: 8px 0; color: var(--text-secondary); font-size: 14px; }
.tips-box li::before { content: "✓ "; color: var(--success); }

/* Skip Link */
.skip-link { margin-top: 20px; }
.skip-link a { color: #666; text-decoration: none; font-size: 13px; }
.skip-link a:hover { color: var(--text-secondary); }

/* Progress Dots */
.progress-dots {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: all 0.3s;
}

.dot.active {
  background: var(--accent-primary);
  width: 30px;
  border-radius: 5px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   📱 APP LAYOUT
   ═══════════════════════════════════════════════════════════════════════════════ */

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Top Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.top-bar-title {
  font-size: 18px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.language-selector select {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  cursor: pointer;
}

.top-bar-actions { display: flex; gap: 8px; }

.top-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.top-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* Main Layout */
.main-wrapper {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px;
}

[dir="ltr"] .sidebar { border-left: none; border-right: 1px solid var(--border-color); }

.logo {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.logo h1 {
  font-size: 26px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo .version { font-size: 12px; color: var(--text-muted); }

/* Navigation */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: inherit;
  font-family: inherit;
  font-size: 15px;
  transition: all 0.2s;
}

.nav-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-btn.active {
  background: var(--accent-gradient);
  color: white;
  font-weight: 600;
}

/* Sidebar Footer */
.sidebar-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 12px;
}

.sidebar-footer strong { display: block; color: var(--text-primary); font-size: 14px; margin-top: 5px; }
.footer-accounts { display: flex; justify-content: center; gap: 8px; margin-top: 5px; }
.footer-accounts a { color: var(--accent-primary); text-decoration: none; font-size: 12px; }
.footer-accounts a:hover { text-decoration: underline; }
.company-link, .email-link { display: block; margin-top: 5px; font-size: 11px; }
.company-link a, .email-link a { color: var(--gold); text-decoration: none; }

/* ═══════════════════════════════════════════════════════════════════════════════
   💬 MAIN CONTENT & VIEWS
   ═══════════════════════════════════════════════════════════════════════════════ */

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

.view {
  display: none;
  flex-direction: column;
  height: 100%;
  padding: 20px;
}

.view.active { display: flex; }

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.view-header h2 { font-size: 22px; }

/* Model Selector */
.model-selector {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-family: inherit;
  cursor: pointer;
}

/* Chat Container */
.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.welcome-message {
  text-align: center;
  padding: 50px;
  color: var(--text-secondary);
}

.welcome-message h3 { color: var(--text-primary); margin-bottom: 10px; font-size: 24px; }

/* Quick Prompts */
.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.quick-prompt {
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.3);
  color: var(--accent-primary);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: all 0.2s;
}

.quick-prompt:hover {
  background: rgba(0,212,255,0.2);
  transform: translateY(-2px);
}

/* Chat Input Area */
.chat-input-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-mode-selector { display: flex; gap: 8px; }

.mode-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.mode-btn:hover { border-color: var(--accent-primary); color: var(--text-primary); }
.mode-btn.active { background: var(--accent-gradient); color: white; border-color: transparent; }

#message-input {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 15px;
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: 15px;
  resize: none;
  min-height: 90px;
}

#message-input:focus { outline: none; border-color: var(--accent-primary); }
#message-input::placeholder { color: var(--text-muted); }

.input-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }

.action-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: all 0.2s;
}

.action-btn:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--accent-primary); }

.send-button {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 14px 36px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
}

.send-button:hover { transform: scale(1.02); }

/* ═══════════════════════════════════════════════════════════════════════════════
   📊 OTHER VIEWS (GitHub, Azure, Settings, etc.)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* GitHub Stats */
.github-stats, .models-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card, .model-card {
  background: var(--bg-secondary);
  padding: 25px;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border-color);
}

.stat-icon { font-size: 30px; display: block; margin-bottom: 10px; }
.stat-card h3 { font-size: 28px; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card p { color: var(--text-secondary); margin-top: 5px; }

/* Status */
.status {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
}

.status.online { background: rgba(16,185,129,0.2); color: var(--success); }

/* Settings */
.settings-content { max-width: 600px; }
.setting-group { margin-bottom: 25px; }
.setting-group label { display: block; margin-bottom: 10px; color: var(--text-secondary); }

.setting-group input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 15px;
  border-radius: var(--radius-md);
  font-family: inherit;
}

.setting-group input:focus { outline: none; border-color: var(--accent-primary); }

.save-btn {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 16px;
}

.settings-note { margin-top: 15px; color: var(--text-secondary); font-size: 13px; }

/* Azure Info */
.azure-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.info-card {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.info-card h4 { color: var(--text-secondary); margin-bottom: 10px; }
.info-card code {
  background: var(--bg-tertiary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  word-break: break-all;
}

/* Vault */
.vault-categories { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }

.vault-cat {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.vault-cat:hover, .vault-cat.active { background: var(--accent-gradient); color: white; border-color: transparent; }

.vault-items { display: flex; flex-direction: column; gap: 15px; }

.vault-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.vault-item-icon { font-size: 30px; }
.vault-item-info { flex: 1; }
.vault-item-info h4 { margin-bottom: 5px; }
.vault-item-info p { color: var(--text-secondary); font-size: 13px; }
.hidden-key { background: var(--bg-tertiary); padding: 5px 10px; border-radius: 5px; font-size: 11px; margin-top: 5px; display: inline-block; }

.copy-btn, .add-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.add-btn { background: var(--accent-gradient); color: white; border: none; padding: 10px 20px; }

/* Notes */
.notes-content { display: flex; gap: 20px; height: calc(100vh - 200px); }
.notes-sidebar { width: 280px; background: var(--bg-secondary); border-radius: var(--radius-md); padding: 15px; display: flex; flex-direction: column; }

.notes-search input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px;
  border-radius: var(--radius-md);
  font-family: inherit;
  margin-bottom: 15px;
}

.notes-list { flex: 1; overflow-y: auto; }

.note-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-bottom: 5px;
}

.note-item:hover, .note-item.active { background: var(--bg-tertiary); }
.note-item.active { border-right: 3px solid var(--accent-primary); }
.note-emoji { font-size: 20px; }
.note-preview h5 { font-size: 13px; margin-bottom: 3px; }
.note-preview p { font-size: 11px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.note-editor {
  flex: 1;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.note-title {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  font-family: inherit;
  font-weight: 600;
  margin-bottom: 10px;
}

.note-title:focus { outline: none; }

.note-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.tag { background: var(--accent-gradient); color: white; padding: 4px 12px; border-radius: var(--radius-full); font-size: 11px; }
.add-tag { background: var(--bg-tertiary); border: 1px dashed var(--border-color); color: var(--text-secondary); padding: 4px 12px; border-radius: var(--radius-full); cursor: pointer; }

.note-content {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.8;
  resize: none;
}

.note-content:focus { outline: none; }

.note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  margin-top: 15px;
}

.note-date { color: var(--text-secondary); font-size: 12px; }
.note-actions { display: flex; gap: 10px; }
.note-action { background: var(--bg-tertiary); border: 1px solid var(--border-color); color: var(--text-secondary); padding: 8px 15px; border-radius: var(--radius-sm); cursor: pointer; font-family: inherit; font-size: 12px; }

/* Accounts */
.account-card {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.account-card.primary { border-color: var(--gold); background: linear-gradient(135deg, rgba(255,215,0,0.1), transparent); }
.account-avatar { font-size: 35px; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; background: var(--bg-tertiary); border-radius: 50%; }
.account-info { flex: 1; }
.account-info h3 { margin-bottom: 5px; }
.account-info p { color: var(--accent-primary); font-size: 13px; }
.account-type { display: block; color: var(--text-secondary); font-size: 12px; margin-top: 5px; }
.account-status { color: var(--success); font-size: 13px; }

/* Safety */
.safety-philosophy { text-align: center; margin-bottom: 30px; }

.philosophy-card {
  background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(124,58,237,0.1));
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  padding: 25px;
}

.philosophy-card h3 { margin-bottom: 15px; }
.philosophy-card blockquote { font-size: 18px; font-style: italic; color: var(--text-primary); line-height: 1.8; }

.risk-levels h3 { margin-bottom: 15px; }

.risk-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}

.risk-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  border: 2px solid var(--border-color);
}

.risk-card.safe { border-color: var(--success); }
.risk-card.low { border-color: #fbbf24; }
.risk-card.medium { border-color: #f97316; }
.risk-card.high { border-color: var(--error); }
.risk-card.critical { border-color: #dc2626; background: rgba(220,38,38,0.1); }

.risk-icon { font-size: 30px; display: block; margin-bottom: 10px; }

.emergency-section {
  text-align: center;
  padding: 20px;
  background: rgba(220,38,38,0.1);
  border-radius: var(--radius-md);
  border: 2px dashed var(--error);
  margin-top: 30px;
}

.emergency-btn {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
  border: none;
  padding: 20px 50px;
  border-radius: var(--radius-md);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.emergency-btn:hover { transform: scale(1.05); }
.emergency-note { color: var(--text-secondary); margin-top: 10px; font-size: 13px; }

/* Demo Notice */
.demo-notice {
  background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(124,58,237,0.1));
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 10px 20px;
  margin-top: 15px;
  font-size: 14px;
}

/* Usage Badge */
.usage-badge {
  background: var(--success);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  margin-left: 10px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Settings Section */
.settings-section {
  background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(0,212,255,0.1));
  border: 1px solid var(--success);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 25px;
}

.settings-section h3 {
  color: var(--success);
  margin-bottom: 5px;
}

.settings-info {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Loading Message */
.message.loading {
  background: var(--bg-tertiary);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   📱 RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .model-selection, .api-options { grid-template-columns: 1fr; }
  .gradient-text { font-size: 24px; }
  .risk-grid { grid-template-columns: repeat(3, 1fr); }
  .github-stats, .models-grid { grid-template-columns: 1fr; }
  .notes-content { flex-direction: column; }
  .notes-sidebar { width: 100%; max-height: 200px; }
  .sidebar { width: 200px; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .risk-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🎨 SCROLLBAR
   ═══════════════════════════════════════════════════════════════════════════════ */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════════════════
   ✨ ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════════ */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
