/*
  =========================================
  COSMOHUD DESIGN SYSTEM - 5001.TECH
  =========================================
  Futuristic Dystopian Cockpit Web Interface
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500;700&family=Orbitron:wght@500;700;900&family=Share+Tech+Mono&display=swap');

/* Color Variables & Custom Tokens */
:root {
  --bg-primary: #06080c;
  --bg-secondary: #0a0d14;
  --bg-panel: rgba(10, 13, 20, 0.75);
  
  --neon-cyan: #00f3ff;
  --neon-cyan-glow: rgba(0, 243, 255, 0.35);
  --neon-cyan-dim: rgba(0, 243, 255, 0.1);
  
  --neon-orange: #ff9d00;
  --neon-orange-glow: rgba(255, 157, 0, 0.35);
  --neon-orange-dim: rgba(255, 157, 0, 0.1);
  
  --neon-green: #39ff14;
  --neon-green-glow: rgba(57, 255, 20, 0.35);
  
  --neon-red: #ff0055;
  --neon-red-glow: rgba(255, 0, 85, 0.35);
  
  --text-main: #c4d1ec;
  --text-dim: #627293;
  
  --grid-line: rgba(0, 243, 255, 0.04);
  --grid-line-strong: rgba(0, 243, 255, 0.08);
}

/* Reset and Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-left: 1px solid rgba(0, 243, 255, 0.1);
}
::-webkit-scrollbar-thumb {
  background: var(--neon-cyan-dim);
  border: 1px solid var(--neon-cyan);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neon-cyan-glow);
}

/* Space Cockpit Background Grid & CRT Effects */
.hud-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: 
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
}

.hud-background::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 50% 50%, transparent 20%, rgba(6, 8, 12, 0.8) 80%),
    linear-gradient(to right, var(--grid-line-strong) 2px, transparent 2px) 0 0 / 200px 100%,
    linear-gradient(to bottom, var(--grid-line-strong) 2px, transparent 2px) 0 0 / 100% 200px;
  opacity: 0.8;
}

/* Scanline animation scrolling down the viewport */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  ), linear-gradient(
    90deg, 
    rgba(255, 0, 0, 0.06), 
    rgba(0, 255, 0, 0.02), 
    rgba(0, 0, 255, 0.06)
  );
  background-size: 100% 4px, 6px 100%;
  opacity: 0.7;
}

.scanline-bar {
  position: fixed;
  left: 0;
  right: 0;
  height: 10px;
  background: rgba(0, 243, 255, 0.08);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
  pointer-events: none;
  z-index: 9998;
  animation: scan 8s linear infinite;
  opacity: 0.5;
}

@keyframes scan {
  0% { top: -10px; }
  100% { top: 100%; }
}

/* Main Dashboard Outer Bracket Layout */
.hud-frame {
  position: relative;
  z-index: 10;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 12px;
}

/* Glitch Header and Typography styling */
.tech-font {
  font-family: 'Share Tech Mono', 'JetBrains Mono', monospace;
}

.header-font {
  font-family: 'Orbitron', system-ui, sans-serif;
  letter-spacing: 2px;
}

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

/* Glow Effects */
.glow-cyan {
  text-shadow: 0 0 8px var(--neon-cyan-glow);
}
.glow-orange {
  text-shadow: 0 0 8px var(--neon-orange-glow);
}
.glow-green {
  text-shadow: 0 0 8px var(--neon-green-glow);
}

.border-glow-cyan {
  box-shadow: 0 0 10px var(--neon-cyan-dim), inset 0 0 8px var(--neon-cyan-dim);
}

/* Futuristic HUD Panel Elements */
.hud-panel {
  background: var(--bg-panel);
  border: 1px solid rgba(0, 243, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Angled cut layout (Futuristic aesthetic) */
.angled-panel {
  clip-path: polygon(
    0 0, 
    calc(100% - 16px) 0, 
    100% 16px, 
    100% 100%, 
    16px 100%, 
    0 calc(100% - 16px)
  );
  border: none; /* We use a pseudo-element border to support clip-path borders */
}

.angled-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: transparent;
  padding: 1px; /* border width */
  clip-path: polygon(
    0 0, 
    calc(100% - 16px) 0, 
    100% 16px, 
    100% 100%, 
    16px 100%, 
    0 calc(100% - 16px)
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Color thematic borders for angled panels */
.panel-cyan::before {
  background: linear-gradient(135deg, var(--neon-cyan) 0%, rgba(0, 243, 255, 0.1) 40%, rgba(0, 243, 255, 0.1) 80%, var(--neon-cyan) 100%);
}
.panel-orange::before {
  background: linear-gradient(135deg, var(--neon-orange) 0%, rgba(255, 157, 0, 0.1) 40%, rgba(255, 157, 0, 0.1) 80%, var(--neon-orange) 100%);
}
.panel-green::before {
  background: linear-gradient(135deg, var(--neon-green) 0%, rgba(57, 255, 20, 0.1) 40%, rgba(57, 255, 20, 0.1) 80%, var(--neon-green) 100%);
}

/* Panel Header design with sci-fi grid mark */
.panel-header {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(0, 243, 255, 0.05);
  border-bottom: 1px solid rgba(0, 243, 255, 0.1);
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--neon-cyan);
}

.panel-header.orange-theme {
  background: rgba(255, 157, 0, 0.05);
  border-bottom: 1px solid rgba(255, 157, 0, 0.1);
  color: var(--neon-orange);
}

.panel-header .tech-dots {
  display: flex;
  gap: 3px;
}

.panel-header .dot {
  width: 4px;
  height: 4px;
  background-color: currentColor;
  opacity: 0.6;
}

.panel-header .dot.blink {
  animation: blinker 1.5s infinite;
}

@keyframes blinker {
  50% { opacity: 0; }
}

.panel-content {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  position: relative;
}

/* Cockpit Header Structure */
.cockpit-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border: 1px solid rgba(0, 243, 255, 0.2);
  background: rgba(10, 13, 20, 0.85);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.05);
  position: relative;
}

/* Glowing Top Bracket line decoration */
.cockpit-header::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--neon-cyan), transparent);
  box-shadow: 0 0 10px var(--neon-cyan);
}

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

.branding svg {
  height: 38px;
  width: auto;
}

.system-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border-right: 1px solid rgba(0, 243, 255, 0.15);
  padding-right: 20px;
}

.meta-item:last-child {
  border-right: none;
  padding-right: 0;
}

.meta-label {
  color: var(--text-dim);
}

.meta-val {
  color: var(--neon-cyan);
}

/* Language Switcher HUD widget */
.language-selector {
  display: flex;
  background: rgba(6, 8, 12, 0.8);
  border: 1px solid rgba(0, 243, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  padding: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 4px 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 2px;
}

.lang-btn.active {
  background: var(--neon-cyan-dim);
  color: var(--neon-cyan);
  text-shadow: 0 0 5px var(--neon-cyan-glow);
  font-weight: bold;
}

.lang-btn:hover:not(.active) {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

/* Main Dashboard Space Layout Grid */
.dashboard-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 320px 1fr 380px;
  gap: 12px;
  height: calc(100vh - 100px);
}

/* Center Cockpit Area */
.center-cockpit {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.hero-panel {
  flex: 3;
  display: flex;
  flex-direction: column;
  position: relative;
}

.hero-canvas-container {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.45;
  pointer-events: auto;
}

.hero-canvas {
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  pointer-events: none;
}

.hero-content * {
  pointer-events: auto;
}

.hero-sub {
  color: var(--neon-orange);
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.hero-title {
  font-size: 42px;
  line-height: 1.1;
  font-weight: 900;
  margin-bottom: 16px;
  background: linear-gradient(to right, #fff, #c4d1ec, var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  max-width: 600px;
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
  opacity: 0.95;
}

/* Neon buttons */
.hud-btn {
  background: var(--neon-cyan-dim);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  padding: 10px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
  align-self: flex-start;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.hud-btn:hover {
  background: var(--neon-cyan);
  color: var(--bg-primary);
  box-shadow: 0 0 15px var(--neon-cyan-glow);
}

.hud-btn-orange {
  background: var(--neon-orange-dim);
  border: 1px solid var(--neon-orange);
  color: var(--neon-orange);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.hud-btn-orange:hover {
  background: var(--neon-orange);
  color: var(--bg-primary);
  box-shadow: 0 0 15px var(--neon-orange-glow);
}

/* Streaming terminal log panel */
.terminal-panel {
  flex: 2;
  display: flex;
  flex-direction: column;
}

.terminal-logs {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 243, 255, 0.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-entry {
  display: flex;
  gap: 8px;
}

.log-time {
  color: var(--text-dim);
  flex-shrink: 0;
}

.log-tag {
  flex-shrink: 0;
  font-weight: bold;
}

.log-tag.tag-ok { color: var(--neon-green); }
.log-tag.tag-warn { color: var(--neon-orange); }
.log-tag.tag-info { color: var(--neon-cyan); }
.log-tag.tag-crit { color: var(--neon-red); }

.log-msg {
  color: var(--text-main);
  word-break: break-all;
}

/* Left Sidebar - Telemetry Panel */
.telemetry-widgets {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  overflow-y: auto;
  padding-right: 4px;
}

.telemetry-row {
  margin-bottom: 16px;
}

.telemetry-row:last-child {
  margin-bottom: 0;
}

.telemetry-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.telemetry-value-glow {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--neon-cyan-glow);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: bold;
}

.telemetry-value-glow.orange {
  color: var(--neon-orange);
  text-shadow: 0 0 8px var(--neon-orange-glow);
}

.meter-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 243, 255, 0.1);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.meter-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan-glow);
  transition: width 0.4s ease-out;
}

.meter-fill.orange {
  background: var(--neon-orange);
  box-shadow: 0 0 10px var(--neon-orange-glow);
}

/* Node grid item representation */
.nodes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.node-item {
  background: rgba(0, 243, 255, 0.02);
  border: 1px solid rgba(0, 243, 255, 0.1);
  padding: 8px 4px;
  text-align: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.node-led {
  width: 6px;
  height: 6px;
  background-color: var(--text-dim);
  border-radius: 50%;
  box-shadow: none;
  transition: all 0.2s ease;
}

.node-led.active {
  background-color: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
}

.node-led.warning {
  background-color: var(--neon-orange);
  box-shadow: 0 0 8px var(--neon-orange);
}

.node-led.down {
  background-color: var(--neon-red);
  box-shadow: 0 0 8px var(--neon-red);
}

/* Right Sidebar - Lab Experiments cards */
.experiments-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  overflow-y: auto;
  padding-right: 4px;
}

.exp-card {
  background: rgba(10, 13, 20, 0.8);
  border: 1px solid rgba(0, 243, 255, 0.1);
  border-left: 3px solid var(--neon-cyan);
  padding: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.exp-card.orange-theme {
  border-left-color: var(--neon-orange);
}

.exp-card:hover {
  background: rgba(0, 243, 255, 0.03);
  border-color: rgba(0, 243, 255, 0.35);
  border-left-width: 5px;
  transform: translateX(4px);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.05);
}

.exp-card.orange-theme:hover {
  background: rgba(255, 157, 0, 0.03);
  border-color: rgba(255, 157, 0, 0.35);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.exp-id {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
}

.exp-status {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 6px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid currentColor;
}

.status-active {
  color: var(--neon-green);
}
.status-standby {
  color: var(--neon-orange);
}
.status-deprecated {
  color: var(--neon-red);
}

.exp-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 4px;
  color: #fff;
}

.exp-desc {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.4;
  opacity: 0.85;
}

/* Audio toggle indicator */
.audio-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.audio-indicator:hover {
  color: var(--neon-cyan);
}

.audio-icon-paths path {
  fill: currentColor;
}

/* GDPR Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 10000;
  background: rgba(6, 8, 12, 0.95);
  border: 1px solid var(--neon-orange);
  box-shadow: 0 0 25px var(--neon-orange-glow);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transform: translateY(120%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.cookie-banner.visible {
  transform: translateY(0);
}

/* Danger hazard border strip styling for cookie alert */
.cookie-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(
    -45deg,
    var(--neon-orange),
    var(--neon-orange) 10px,
    #000 10px,
    #000 20px
  );
}

.cookie-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.cookie-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--neon-orange);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-desc {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.5;
  max-width: 800px;
}
.cookie-btns {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* Close X button inside Cookie Banner */
.banner-close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-family: 'Share Tech Mono', monospace;
  font-size: 20px;
  font-weight: bold;
  line-height: 1;
  transition: all 0.2s ease;
  z-index: 10002;
}

.banner-close-btn:hover {
  color: var(--neon-red);
  text-shadow: 0 0 8px var(--neon-red-glow);
}

/* Floating Retract button to edit consent */
.cookie-retract-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9990;
  background: var(--bg-panel);
  border: 1px solid rgba(0, 243, 255, 0.2);
  color: var(--neon-cyan);
  padding: 6px 12px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  opacity: 0.7;
}

.cookie-retract-btn:hover {
  opacity: 1;
  border-color: var(--neon-cyan);
  background: var(--neon-cyan-dim);
  box-shadow: 0 0 10px var(--neon-cyan-glow);
}

/* Hide floating config button when the banner is active */
.cookie-banner.visible ~ .cookie-retract-btn {
  display: none;
}

/* Cyber Link styles for GDPR details */
.hud-link {
  color: var(--neon-orange);
  text-decoration: none;
  font-family: 'Share Tech Mono', monospace;
  font-weight: bold;
  transition: all 0.2s ease;
  border-bottom: 1px dashed currentColor;
}

.hud-link:hover {
  color: #fff;
  text-shadow: 0 0 5px var(--neon-orange-glow);
  border-bottom-style: solid;
}

/* Dialog Modal Preference Customization */
dialog.cookie-modal {
  margin: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 0 35px var(--neon-cyan-glow);
  color: var(--text-main);
  max-width: 500px;
  width: calc(100vw - 32px);
  padding: 0;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

dialog.cookie-modal::backdrop {
  background: rgba(3, 4, 6, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-header {
  background: rgba(0, 243, 255, 0.05);
  border-bottom: 1px solid rgba(0, 243, 255, 0.15);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: bold;
  color: var(--neon-cyan);
  text-transform: uppercase;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--neon-red);
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  text-shadow: 0 0 8px var(--neon-red-glow);
  transform: scale(1.1);
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.preference-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 243, 255, 0.08);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-radius: 4px;
}

.pref-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pref-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: bold;
  color: #fff;
}

.pref-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Switch Toggle Styling */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 243, 255, 0.2);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 11px;
}

.slider::before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-dim);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--neon-cyan-dim);
  border-color: var(--neon-cyan);
}

input:checked + .slider::before {
  transform: translateX(22px);
  background-color: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan-glow);
}

input:disabled + .slider {
  opacity: 0.5;
  cursor: not-allowed;
}

input:disabled + .slider::before {
  background-color: var(--text-dim);
}

.modal-footer {
  border-top: 1px solid rgba(0, 243, 255, 0.1);
  padding: 16px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(0, 243, 255, 0.02);
}

/* Text elements translations hidden display control */
[data-lang] {
  display: none;
}

body.lang-en [data-lang="en"] {
  display: inherit;
}

body.lang-it [data-lang="it"] {
  display: inherit;
}

/* Flex versions for conditional displays */
body.lang-en flex[data-lang="en"], 
body.lang-en div[data-lang="en"].flex {
  display: flex;
}

body.lang-it flex[data-lang="it"], 
body.lang-it div[data-lang="it"].flex {
  display: flex;
}

/* Inline/text block translations */
body.lang-en span[data-lang="en"] {
  display: inline;
}

body.lang-it span[data-lang="it"] {
  display: inline;
}

/* Responsive Rules for Small Devices */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: visible;
  }
  
  body {
    height: auto;
    overflow-y: auto;
  }
  
  .hud-frame {
    height: auto;
    overflow-y: visible;
  }
  
  .telemetry-widgets, .experiments-grid {
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  .cockpit-header {
    flex-direction: column;
    height: auto;
    padding: 12px;
    gap: 12px;
  }
  
  .system-meta {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  
  .meta-item {
    border-right: none;
    padding-right: 0;
  }
  
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
  }
}
