/* ==========================================================================
   3D Human Hand Gesture Controlled AI Robotic Car Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Orbitron:wght@600;700;800;900&family=Space+Grotesk:wght@500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #050811;
  font-family: 'Inter', sans-serif;
  color: #f8fafc;
}

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

/* Header HUD Bar */
.hud-header {
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(10, 16, 32, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 212, 255, 0.35);
  padding: 10px 18px;
  border-radius: 12px;
  pointer-events: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7), 0 0 20px rgba(0, 212, 255, 0.15);
}

.hud-title-wrap h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.05em;
}

.hud-title-wrap p {
  font-size: 0.72rem;
  color: #00d4ff;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Live Telemetry Card (Top Right) */
.hud-telemetry {
  display: flex;
  gap: 12px;
  background: rgba(10, 16, 32, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 10px 18px;
  border-radius: 12px;
  pointer-events: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.telemetry-label {
  font-size: 0.62rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.05em;
}

.telemetry-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #10b981;
}

.telemetry-value.cyan {
  color: #00d4ff;
}

.telemetry-value.amber {
  color: #f59e0b;
}

/* Floating Control Panel (Bottom Left) */
.controls-card {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 10;
  background: rgba(10, 16, 32, 0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 212, 255, 0.28);
  border-radius: 16px;
  padding: 16px 18px;
  width: 340px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 212, 255, 0.12);
}

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

.controls-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-label {
  font-size: 0.68rem;
  color: #00d4ff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.btn-ctrl {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-ctrl:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.45);
  color: #00d4ff;
  transform: translateY(-1px);
}

.btn-ctrl.active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.35), rgba(16, 185, 129, 0.25));
  border-color: #00d4ff;
  color: #fff;
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.4);
}

/* Color theme palette */
.customizer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.color-options {
  display: flex;
  gap: 8px;
}

.color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
}

.color-dot:hover {
  transform: scale(1.2);
}

.color-dot.selected {
  border-color: #00d4ff;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.8);
}

/* Bottom Interaction Hint Banner */
.hint-banner {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(10, 16, 32, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.72rem;
  color: #94a3b8;
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hint-banner span {
  color: #00d4ff;
}

/* Mouse Guidance Toast */
.mouse-mode-toast {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 212, 255, 0.2);
  border: 1px solid #00d4ff;
  color: #fff;
  padding: 8px 18px;
  border-radius: 24px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(12px);
  z-index: 20;
  display: none;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
  animation: pulse 1.5s infinite alternate;
}

/* Loading Overlay */
.loader-overlay {
  position: absolute;
  inset: 0;
  background: #050811;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.5s ease;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(0, 212, 255, 0.2);
  border-top-color: #00d4ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

.loader-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  color: #00d4ff;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

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

@media (max-width: 768px) {
  .controls-card {
    width: calc(100% - 32px);
    left: 16px;
    bottom: 16px;
  }
  .hud-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .hint-banner {
    display: none;
  }
}

/* Embedded Mode Styles (Hero Section Seamless View) */
html.is-embedded,
body.is-embedded {
  background: transparent !important;
  background-color: transparent !important;
}

body.is-embedded #canvas-container {
  background: transparent !important;
}

body.is-embedded .hud-header {
  display: none !important;
}

body.is-embedded .controls-card {
  display: none !important;
}

body.is-embedded .hint-banner {
  display: none !important;
}

body.is-embedded .mouse-mode-toast {
  display: none !important;
}

