/* ==============================================================================
   HIGHRISE BOT STUDIO - HIGH-END PROFESSIONAL THEME
   Obsidian & Electric Twilight Design System
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-cosmic: #07090e;
  --bg-obsidian: #0c1017;
  --bg-surface: #121824;
  --bg-surface-elevated: #172030;
  --bg-surface-hover: #1e293d;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-active: rgba(99, 102, 241, 0.35);
  --border-glow: rgba(99, 102, 241, 0.2);

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-secondary: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-cosmic);
  color: var(--text-primary);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Glassmorphism & Surface Cards */
.glass-panel {
  background: rgba(18, 24, 36, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
}

.glass-card {
  background: linear-gradient(180deg, rgba(23, 32, 48, 0.6) 0%, rgba(18, 24, 36, 0.75) 100%);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.28);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px -5px rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
}

/* Sidebar Navigation Buttons */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
  border-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.1);
  font-weight: 600;
}

.nav-link.active i {
  color: #818cf8;
}

/* Stat Cards */
.metric-box {
  background: linear-gradient(135deg, rgba(23, 32, 48, 0.5) 0%, rgba(18, 24, 36, 0.7) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 1.15rem;
  padding: 1.25rem 1.4rem;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.metric-box::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* Status Badges */
.badge-online {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-reconnecting {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-offline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.dot-pulse {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* Audio Visualizer Bar Animation */
.visualizer-bar {
  width: 3px;
  background: linear-gradient(180deg, #818cf8 0%, #06b6d4 100%);
  border-radius: 2px;
  animation: pulseBar 1.2s infinite ease-in-out alternate;
}

@keyframes pulseBar {
  0% { height: 4px; }
  100% { height: 26px; }
}

.visualizer-bar:nth-child(2) { animation-delay: 0.15s; }
.visualizer-bar:nth-child(3) { animation-delay: 0.35s; }
.visualizer-bar:nth-child(4) { animation-delay: 0.2s; }
.visualizer-bar:nth-child(5) { animation-delay: 0.4s; }

/* Interactive Terminal Box */
.terminal-window {
  background: #080b11;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.85rem;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.7);
  font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #07090e;
}
::-webkit-scrollbar-thumb {
  background: #1e293d;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Inputs & Form Controls */
.custom-input {
  background: rgba(18, 24, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.custom-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

/* Action Buttons */
.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.825rem;
  border-radius: 0.75rem;
  padding: 0.6rem 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
  background: rgba(23, 32, 48, 0.8);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.825rem;
  border-radius: 0.75rem;
  padding: 0.6rem 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(30, 41, 61, 1);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.825rem;
  border-radius: 0.75rem;
  padding: 0.6rem 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.25);
  cursor: pointer;
}

.btn-danger:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ==============================================================================
   RESPONSIVE MOBILE & TOUCH DEVICE ENHANCEMENTS
   ============================================================================== */

@media (max-width: 768px) {
  /* Prevent iOS Safari auto-zoom on focus while keeping clean layout */
  .custom-input, select, textarea {
    font-size: 15px !important;
  }

  /* Compact glass panels for small screens */
  .glass-panel {
    border-radius: 0.85rem;
  }

  .metric-box {
    padding: 1rem 1.1rem;
    border-radius: 0.85rem;
  }

  /* Touch tap targets */
  .btn-primary, .btn-secondary, .btn-danger {
    min-height: 38px;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  /* Smooth momentum scrolling */
  .overflow-y-auto, .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .metric-box {
    padding: 0.85rem 0.95rem;
  }

  .glass-panel {
    border-radius: 0.75rem;
  }
}
