@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;700;800&display=swap');

:root {
  --accent: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.28);
  --bg-dark: #050811;
  --card-bg: rgba(10, 15, 29, 0.88);
  --card-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(24px);
}

* {
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

body {
  background-color: var(--bg-dark);
  color: #f8fafc;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background Presets: Stealth Tactical & Carbon Matrix */
.bg-deep_obsidian {
  background: radial-gradient(circle at 50% 0%, #101726 0%, #04060c 85%);
}

.bg-mesh_glow {
  background: radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.14) 0px, transparent 40%),
              radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.14) 0px, transparent 40%),
              radial-gradient(at 50% 100%, rgba(244, 63, 94, 0.08) 0px, transparent 40%),
              #050811;
}

.bg-cyber_grid {
  background-color: #04060c;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
}

.bg-carbon_tactical {
  background-color: #060913;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 0);
  background-size: 16px 16px;
}

/* Tactical Glass Cards */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border);
  border-radius: 0.875rem;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.6);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.8);
}

.glass-card-glow {
  border-color: var(--accent);
  box-shadow: 0 0 25px var(--accent-glow);
}

/* Circular SVG Gauge Rings */
.gauge-ring {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.gauge-circle-bg {
  stroke: rgba(255, 255, 255, 0.05);
}

.gauge-circle-progress {
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Tactical Segmented Navigation */
.mode-pill {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-pill.active {
  background: var(--accent);
  color: #030712;
  font-weight: 700;
  box-shadow: 0 0 20px var(--accent-glow);
}

.mode-pill:not(.active) {
  color: #94a3b8;
}

.mode-pill:not(.active):hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

/* Custom Accent Buttons */
.btn-accent {
  background: var(--accent);
  color: #030712;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.18s ease;
}

.btn-accent:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 22px var(--accent-glow);
}

.text-accent {
  color: var(--accent);
}

.border-accent {
  border-color: var(--accent);
}

/* Status Lights */
.pulse-online {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pulse-offline {
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Tactical Terminal Styling */
.terminal-window {
  background: #020408;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Host OS Cockpit & Fullscreen Terminal */
.xterm-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  padding: 1rem !important;
  background: #04070d !important;
}

#host-xterm-container .xterm {
  height: 100%;
  padding: 8px;
}

#host-xterm-container .xterm-viewport {
  border-radius: 0.75rem;
}

.subtab-pill {
  transition: all 0.2s ease;
}

.subtab-pill.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.subtab-pill:not(.active) {
  color: #94a3b8;
}

/* Mobile Bottom Nav & Drawer Styling */
.mobile-nav-pill {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-pill.active {
  color: var(--accent);
}

.mobile-nav-pill.active i {
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.drawer-nav-item {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.drawer-nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}

/* Mobile & Touch Optimizations */
@media (max-width: 640px) {
  .glass-card {
    border-radius: 0.75rem;
  }
  
  .terminal-window {
    font-size: 11px;
  }
}

/* Smooth Slide Animations */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.animate-slide-in-right {
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
