* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: linear-gradient(180deg, #0a0e27 0%, #0d2b3e 50%, #091a2a 100%);
  color: #c8e6e0;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  position: relative;
}

#caustics-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
}

#scene-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#scene-container canvas {
  display: block;
}

/* Header */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(10, 14, 39, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(127, 219, 202, 0.1);
}

.header-title {
  font-weight: 100;
  font-size: 14px;
  letter-spacing: 6px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #e8e0d4, #7fdbca, #e8e0d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vtech-badge {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
  color: #0a0e27;
  background: linear-gradient(135deg, #e8e0d4, #7fdbca);
  padding: 2px 8px;
  border-radius: 3px;
}

.sim-indicator {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(127, 219, 202, 0.6);
  display: flex;
  align-items: center;
  gap: 6px;
}

.blink-dot {
  width: 6px;
  height: 6px;
  background: #7fdbca;
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Shell prompt */
#shell-prompt {
  position: fixed;
  bottom: 25%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 3px;
  color: rgba(127, 219, 202, 0.5);
  text-transform: uppercase;
  animation: promptFade 3s ease-in-out infinite;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

@keyframes promptFade {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* Control Panel */
#control-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: auto;
}

#control-panel.hidden {
  opacity: 0;
  transform: translateY(40px);
  pointer-events: none;
}

.panel-inner {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px 20px 16px;
  background: radial-gradient(ellipse at center top, rgba(30, 40, 55, 0.95), rgba(15, 20, 35, 0.98));
  border-top: 1px solid rgba(127, 219, 202, 0.15);
  border-radius: 24px 24px 0 0;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.concentric-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  pointer-events: none;
  opacity: 0.04;
  background: repeating-radial-gradient(circle at center, transparent 0px, transparent 28px, rgba(127, 219, 202, 0.5) 29px, transparent 30px);
}

/* Mode Ring */
.mode-ring {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.mode-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid rgba(127, 219, 202, 0.1);
  background: rgba(127, 219, 202, 0.03);
  transition: all 0.3s ease;
  min-width: 70px;
}

.mode-option:hover {
  border-color: rgba(127, 219, 202, 0.3);
  background: rgba(127, 219, 202, 0.06);
}

.mode-option.active {
  border-color: rgba(127, 219, 202, 0.6);
  background: rgba(127, 219, 202, 0.1);
  box-shadow: 0 0 20px rgba(127, 219, 202, 0.15), inset 0 0 10px rgba(127, 219, 202, 0.05);
}

.mode-icon {
  font-size: 20px;
}

.mode-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(127, 219, 202, 0.6);
}

.mode-option.active .mode-label {
  color: #7fdbca;
}

/* Activate Button */
#activate-btn {
  display: block;
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 2px solid rgba(127, 219, 202, 0.4);
  background: radial-gradient(circle, rgba(127, 219, 202, 0.08), rgba(10, 14, 39, 0.9));
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  overflow: visible;
}

#activate-btn:hover {
  border-color: rgba(127, 219, 202, 0.7);
  box-shadow: 0 0 30px rgba(127, 219, 202, 0.2);
}

#activate-btn.active {
  border-color: rgba(255, 170, 50, 0.8);
  background: radial-gradient(circle, rgba(255, 170, 50, 0.2), rgba(30, 20, 10, 0.9));
  box-shadow: 0 0 40px rgba(255, 170, 50, 0.3);
}

.activate-text {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 2px;
  color: #7fdbca;
  position: relative;
  z-index: 3;
}

#activate-btn.active .activate-text {
  color: #ffaa32;
}

.activate-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(127, 219, 202, 0.3);
  animation: pulse 3s ease-in-out infinite;
}

#activate-btn.active .activate-pulse {
  border-color: rgba(255, 170, 50, 0.4);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

.activate-waves {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  pointer-events: none;
}

#activate-btn.active .activate-waves::before,
#activate-btn.active .activate-waves::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 170, 50, 0.4);
  animation: soundWave 1.5s ease-out infinite;
}

#activate-btn.active .activate-waves::after {
  animation-delay: 0.75s;
}

@keyframes soundWave {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* Region Selector */
.region-selector {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}

.region-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(127, 219, 202, 0.1);
  background: rgba(127, 219, 202, 0.03);
  color: rgba(127, 219, 202, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
}

.region-btn:hover {
  border-color: rgba(127, 219, 202, 0.3);
}

.region-btn.active {
  border-color: rgba(127, 219, 202, 0.5);
  background: rgba(127, 219, 202, 0.08);
  color: #7fdbca;
}

/* Volume */
.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 0 10px;
  position: relative;
  z-index: 2;
}

.vol-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(127, 219, 202, 0.4);
}

.volume-track {
  flex: 1;
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
}

.volume-track input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 3;
}

.volume-track input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: rgba(127, 219, 202, 0.15);
  border-radius: 2px;
}

.volume-track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #7fdbca;
  margin-top: -7px;
  box-shadow: 0 0 10px rgba(127, 219, 202, 0.5);
}

.volume-track input[type="range"]::-moz-range-track {
  height: 4px;
  background: rgba(127, 219, 202, 0.15);
  border-radius: 2px;
}

.volume-track input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #7fdbca;
  border: none;
  box-shadow: 0 0 10px rgba(127, 219, 202, 0.5);
}

.vol-db {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  color: rgba(127, 219, 202, 0.5);
  min-width: 40px;
  text-align: right;
}

/* Status */
.status-area {
  display: flex;
  gap: 16px;
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(127, 219, 202, 0.08);
  padding-top: 10px;
}

.status-left {
  flex: 1;
}

.status-line {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.5px;
  color: rgba(127, 219, 202, 0.4);
  line-height: 1.8;
}

.status-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

#oscilloscope {
  border: 1px solid rgba(127, 219, 202, 0.1);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
}

.battery-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.battery-icon {
  display: flex;
  align-items: center;
}

.battery-body {
  width: 22px;
  height: 10px;
  border: 1px solid rgba(127, 219, 202, 0.4);
  border-radius: 2px;
  padding: 1px;
  position: relative;
}

.battery-fill {
  height: 100%;
  width: 100%;
  background: #7fdbca;
  border-radius: 1px;
  transition: width 1s ease, background 1s ease;
}

.battery-fill.low {
  background: #ff6b35;
}

.battery-tip {
  width: 2px;
  height: 5px;
  background: rgba(127, 219, 202, 0.4);
  border-radius: 0 1px 1px 0;
}

.battery-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  color: rgba(127, 219, 202, 0.4);
}

.listening-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #7fdbca;
  border-radius: 50%;
  animation: pulse 0.8s ease-in-out infinite;
  vertical-align: middle;
  margin-right: 4px;
}

/* Footer */
#footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  text-align: center;
  padding: 8px 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  color: rgba(127, 219, 202, 0.25);
  background: rgba(10, 14, 39, 0.8);
  transition: opacity 0.3s ease;
}

#footer a {
  color: rgba(127, 219, 202, 0.5);
  text-decoration: none;
}

#footer a:hover {
  color: #7fdbca;
}

.footer-sep {
  margin: 0 6px;
}

.footer-small {
  font-size: 8px;
}

/* Mobile */
@media (max-width: 600px) {
  .header-title {
    font-size: 10px;
    letter-spacing: 3px;
  }
  
  .mode-option {
    min-width: 60px;
    padding: 8px 10px;
  }
  
  .mode-icon {
    font-size: 18px;
  }
  
  .region-btn {
    font-size: 8px;
    padding: 5px 8px;
  }
  
  #footer {
    font-size: 8px;
  }
  
  .panel-inner {
    padding: 16px 12px 12px;
  }
}