/* ==========================================================================
   GESTURA AI - Futuristic Automotive Laboratory Core Stylesheet
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-primary: #060913;
  --bg-secondary: #0b1224;
  --bg-card: rgba(14, 23, 47, 0.75);
  --bg-card-hover: rgba(20, 34, 68, 0.85);
  --bg-hud: rgba(6, 11, 25, 0.88);
  --bg-overlay: rgba(3, 6, 15, 0.85);

  /* Accents */
  --cyan-core: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.35);
  --cyan-subtle: rgba(0, 240, 255, 0.12);
  --blue-electric: #2563eb;
  --blue-neon: #38bdf8;
  --blue-deep: #1d4ed8;

  /* Thermodynamic Pressure Colors */
  --high-pressure: #ef4444;       /* Hot gas / High-side red */
  --high-pressure-glow: rgba(239, 68, 68, 0.4);
  --low-pressure: #06b6d4;        /* Cold liquid-vapor / Low-side cyan */
  --low-pressure-glow: rgba(6, 182, 212, 0.4);
  --warm-liquid: #f59e0b;         /* Liquid line amber */

  /* Neutral & Functional */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(56, 189, 248, 0.22);
  --border-focus: rgba(0, 240, 255, 0.65);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.35);
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Typography */
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-tech: 'Rajdhani', 'Orbitron', 'Inter', monospace, sans-serif;

  /* Shadows & Glassmorphism */
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.55);
  --neon-shadow: 0 0 15px var(--cyan-glow);
  --card-radius: 12px;
  --pill-radius: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Futuristic Laboratory Grid Background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(37, 99, 235, 0.15), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(0, 240, 255, 0.08), transparent 40%),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  pointer-events: none;
  z-index: 0;
}

#app-root {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   Header & Futuristic Navigation Bar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-hud);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  transition: var(--transition-normal);
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand Identity */
.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(37, 99, 235, 0.4));
  border: 1px solid var(--cyan-core);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px var(--cyan-glow);
  position: relative;
  overflow: hidden;
}

.brand-logo-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--cyan-core);
}

.brand-text h1 {
  font-family: var(--font-family-tech);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-text h1 span {
  color: var(--cyan-core);
  text-shadow: 0 0 10px var(--cyan-glow);
}

.brand-text p {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  font-family: var(--font-family-tech);
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-item-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-family-tech);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.nav-item-btn:hover {
  color: var(--cyan-core);
  background: var(--cyan-subtle);
  border-color: rgba(0, 240, 255, 0.3);
}

.nav-item-btn.active {
  color: var(--cyan-core);
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--cyan-core);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.nav-item-btn svg {
  width: 16px;
  height: 16px;
}

/* Top Right Action & System Status */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(11, 18, 36, 0.7);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.85rem;
  border-radius: var(--pill-radius);
  font-size: 0.78rem;
  font-family: var(--font-family-tech);
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

/* Gesture Master Toggle Button */
.gesture-toggle-btn {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-family-tech);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition-fast);
}

.gesture-toggle-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--cyan-core);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.gesture-toggle-btn.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(37, 99, 235, 0.35));
  border-color: var(--cyan-core);
  color: var(--cyan-core);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.gesture-toggle-btn .badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(0, 240, 255, 0.2);
  color: var(--cyan-core);
  text-transform: uppercase;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.45rem;
  border-radius: 8px;
  cursor: pointer;
}

/* ==========================================================================
   Main Content Layout & Page Containers
   ========================================================================== */
.main-viewport {
  flex: 1;
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem;
}

.page-view {
  display: none;
  animation: fadeIn 0.35s ease-out forwards;
}

.page-view.active {
  display: block;
}

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

/* ==========================================================================
   Standard Cybernetic UI Components
   ========================================================================== */

/* Buttons */
.btn-cyber {
  position: relative;
  background: linear-gradient(135deg, var(--blue-electric), var(--cyan-core));
  color: #050b1a;
  font-family: var(--font-family-tech);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.6rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 0 15px var(--cyan-glow);
  transition: var(--transition-fast);
  overflow: hidden;
}

.btn-cyber:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.6);
  color: #000;
}

.btn-cyber-outline {
  background: transparent;
  color: var(--cyan-core);
  border: 1px solid var(--cyan-core);
  font-family: var(--font-family-tech);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.65rem 1.3rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: var(--transition-fast);
}

.btn-cyber-outline:hover {
  background: var(--cyan-subtle);
  box-shadow: 0 0 15px var(--cyan-glow);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-family-tech);
  font-size: 0.9rem;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: var(--text-secondary);
}

/* Glassmorphism Cards */
.cyber-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-normal);
}

.cyber-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan-core), transparent);
  opacity: 0.3;
  transition: var(--transition-fast);
}

.cyber-card:hover {
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 10px 35px 0 rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 240, 255, 0.15);
}

.cyber-card:hover::before {
  opacity: 0.9;
}

/* Section Headings */
.section-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-family-tech);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyan-core);
  background: var(--cyan-subtle);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-family-tech);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 680px;
  margin-top: 0.35rem;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-hud);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-family: var(--font-family-tech);
}

/* Notification Toast */
#notification-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  background: var(--bg-hud);
  border: 1px solid var(--cyan-core);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 15px var(--cyan-glow);
  padding: 0.9rem 1.4rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  max-width: 380px;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.3s ease;
  pointer-events: none;
}

#notification-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-hud);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .main-viewport {
    padding: 1rem;
  }
}
