/* ==========================================================================
   GEOCAMPASS NAVIGATOR DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

:root {
  /* Core Color Palette */
  --bg-primary: #080c14;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  
  /* Glassmorphism Backgrounds & Borders */
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-glow: rgba(6, 182, 212, 0.2);
  
  /* Glowing Accent Colors */
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.4);
  --accent-blue: #3b82f6;
  --accent-blue-glow: rgba(59, 130, 246, 0.3);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.4);
  --accent-rose: #f43f5e;
  --accent-rose-glow: rgba(244, 63, 94, 0.4);
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.4);
  
  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Layout Sizing & Insets */
  --header-height: 60px;
  --nav-height: 70px;
  --border-radius-lg: 16px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
  --box-shadow-glow: 0 0 25px rgba(6, 182, 212, 0.15);
}

/* ==========================================================================
   1. Reset & Global Configurations
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none; /* Make UI feel native by blocking highlights */
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 15px;
}

#app {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  position: relative;
  background: radial-gradient(circle at 50% 30%, #111e35 0%, var(--bg-primary) 70%);
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Utility classes */
.w-full { width: 100%; }
.font-tech { font-family: 'Orbitron', monospace; font-weight: 500; }
.subtle-text { color: var(--text-secondary); font-size: 0.85rem; }
.hidden { display: none !important; }

/* ==========================================================================
   2. Header & Status Telemetry
   ========================================================================== */
.app-header {
  height: var(--header-height);
  padding: 0 16px;
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(8, 12, 20, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 100;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: logo-pulse 2s infinite ease-in-out;
}

.logo-area h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-indicators {
  display: flex;
  gap: 8px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.status-pill .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

/* Status States */
.status-inactive {
  color: var(--text-muted);
}
.status-inactive .status-dot {
  background-color: var(--text-muted);
  box-shadow: none;
}

.status-calibrating {
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.2);
}
.status-calibrating .status-dot {
  background-color: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
  animation: status-pulse 1.2s infinite ease-in-out;
}

.status-active {
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.2);
}
.status-active .status-dot {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: status-pulse 1.8s infinite ease-in-out;
}

.status-manual {
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.2);
}
.status-manual .status-dot {
  background-color: var(--accent-blue);
  box-shadow: 0 0 8px var(--accent-blue);
}

/* ==========================================================================
   3. Screen Panels & Tabs Layout
   ========================================================================== */
.tab-content {
  flex: 1;
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px;
}

.tab-panel {
  display: none;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 16px;
  animation: tab-fade-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tab-panel.active {
  display: flex;
}

@keyframes tab-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   4. Compass Radar Navigation Screen
   ========================================================================== */
#tab-radar {
  padding: 10px;
  justify-content: space-between;
  overflow: hidden; /* Radar page shouldn't scroll */
}

.radar-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 250px;
  margin-bottom: 12px;
}

#radar-canvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* Permission Banner overlay */
.banner {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 2px solid var(--accent-cyan);
  padding: 16px;
  text-align: center;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: slide-down 0.4s ease forwards;
}

.banner-content {
  max-width: 500px;
  margin: 0 auto;
}

.banner h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--accent-cyan);
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.banner p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

@keyframes slide-down {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* Tactical HUD Card */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.hud-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.hud-card.active-nav {
  border-color: var(--glass-border-glow);
  box-shadow: var(--box-shadow-glow);
}

.hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.target-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#hud-target-name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-card.active-nav #hud-target-name {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.target-indicator-arrow {
  color: var(--text-muted);
  transition: transform 0.2s linear, color 0.3s ease;
}

.hud-card.active-nav .target-indicator-arrow {
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 5px var(--accent-cyan-glow));
}

.hud-body {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  text-align: center;
}

.hud-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.metric-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

#hud-distance {
  color: var(--accent-cyan);
}

.hud-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
}

.relative-direction {
  color: var(--accent-amber);
  font-weight: 600;
}

.accuracy-badge {
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-secondary);
}

/* Desktop Simulator Controls */
.control-card {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--border-radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.control-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.badge {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-input {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  outline: none;
  -webkit-appearance: none;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-blue);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  transition: transform 0.1s ease;
}

.range-input::-webkit-slider-thumb:active {
  transform: scale(1.2);
}

.slider-labels {
  min-width: 65px;
  text-align: right;
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  color: var(--accent-blue);
}

/* ==========================================================================
   5. Buttons & Input Styling
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
}
.btn-primary:hover {
  background: #22d3ee;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.2);
}
.btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
}

.btn-preset {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-weight: 500;
  padding: 8px 12px;
  font-size: 0.8rem;
  border-radius: var(--border-radius-sm);
  text-align: left;
}
.btn-preset:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--text-primary);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="number"] {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
  background: rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   6. Saved Places List Tab Screen
   ========================================================================== */
.tab-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.tab-header-row h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.places-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.list-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  gap: 16px;
  color: var(--text-muted);
}

.subtle-icon {
  color: var(--text-muted);
  opacity: 0.6;
}

.list-placeholder p {
  font-size: 0.9rem;
  max-width: 280px;
}

/* Dynamic Saved Item Card */
.saved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.saved-item.is-primary {
  border-color: rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.04);
}

.item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0; /* Ensures text-truncation works in flex items */
}

/* Track Toggle Checkbox */
.checkbox-container {
  display: block;
  position: relative;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: rgba(255, 255, 255, 0.1);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #000;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.item-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-item.is-primary .item-name {
  color: var(--accent-cyan);
}

.primary-badge {
  background: rgba(6, 182, 212, 0.2);
  color: var(--accent-cyan);
  font-family: 'Orbitron', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.item-distance {
  color: var(--accent-cyan);
  font-weight: 700;
}

.item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-icon.is-primary {
  color: var(--accent-cyan);
}

.btn-icon.is-primary:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.2);
}

.btn-icon.btn-delete:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}

/* ==========================================================================
   7. Address Search Tab Screen
   ========================================================================== */
.search-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.search-section h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.search-bar {
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
}

.search-input-wrapper input {
  width: 100%;
  padding-left: 40px;
  padding-right: 36px;
  height: 44px;
  border-radius: var(--border-radius-md);
  font-size: 0.95rem;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

/* Loader / Geocoding Spinner */
.spinner-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 0;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Search results items */
.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
  border-radius: var(--border-radius-md);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
}

.search-result-item {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.search-result-item:hover {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.15);
}

.result-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Glass panel wrappers on Search Tab */
.manual-entry-card, .presets-card {
  padding: 16px;
  margin-bottom: 20px;
}

.manual-entry-card h3, .presets-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

/* Landmark Presets grid */
.presets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

/* ==========================================================================
   8. Save Current Location Modal Dialog
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 6, 10, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
  animation: modal-fade-in 0.2s ease forwards;
}

.modal {
  width: 100%;
  max-width: 360px;
  padding: 20px;
  animation: modal-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  color: var(--accent-cyan);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.modal-coordinates-preview {
  font-family: 'Orbitron', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 10px;
  border-radius: 4px;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-slide-up {
  from { transform: translateY(20px) scale(0.95); }
  to { transform: translateY(0) scale(1); }
}

/* ==========================================================================
   9. Bottom Tab Navigation Bar
   ========================================================================== */
.app-nav {
  height: var(--nav-height);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(8, 12, 20, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid var(--glass-border);
  display: flex;
  width: 100%;
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  gap: 4px;
  transition: all 0.25s ease;
  padding-top: 8px;
}

.nav-icon {
  opacity: 0.65;
  transition: all 0.25s ease;
}

.nav-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
}

/* Active Navigation Item states */
.nav-item.active {
  color: var(--accent-cyan);
}

.nav-item.active .nav-icon {
  opacity: 1;
  filter: drop-shadow(0 0 6px var(--accent-cyan-glow));
}

.nav-item:active {
  transform: translateY(-2px);
}

/* ==========================================================================
   10. Core Dynamic Keyframe Animations
   ========================================================================== */
@keyframes logo-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 10px var(--accent-cyan);
  }
  50% {
    transform: scale(1.3);
    box-shadow: 0 0 16px var(--accent-cyan), 0 0 24px rgba(6, 182, 212, 0.3);
  }
}

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

/* ==========================================================================
   11. Media Queries & Responsive Design Adaptations
   ========================================================================== */
@media (min-width: 480px) {
  /* Increase scaling limits on larger displays or tablets */
  body {
    font-size: 16px;
  }
  .tab-panel {
    max-width: 540px;
    margin: 0 auto;
  }
  .app-header {
    padding: 0 24px;
  }
  .status-pill {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* Ensure radar fits correctly on tall screens vs compact screens */
@media (max-height: 600px) {
  :root {
    --header-height: 48px;
    --nav-height: 58px;
  }
  .logo-area h1 {
    font-size: 0.95rem;
  }
  .hud-card {
    padding: 10px;
    gap: 8px;
  }
  .hud-body {
    gap: 4px;
  }
  .metric-value {
    font-size: 1rem;
  }
  .radar-container {
    min-height: 180px;
  }
}
