/* Geneva 3D Drone Flight Tour Stylesheet */

:root {
  --primary-cyan: #00f0ff;
  --primary-glow: rgba(0, 240, 255, 0.4);
  --accent-orange: #ff7700;
  --accent-red: #ff3344;
  --swiss-red: #da291c;
  --bg-hud: rgba(10, 16, 26, 0.65);
  --bg-hud-card: rgba(15, 23, 42, 0.85);
  --border-hud: rgba(0, 240, 255, 0.25);
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
  --font-hud: 'Chakra Petch', sans-serif;
  --font-ui: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #050811;
  color: var(--text-main);
  font-family: var(--font-ui);
}

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

canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* FPV Drone HUD Overlay */
.hud-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 28px;
  box-sizing: border-box;
}

/* Vignette and Scanline subtle effect */
.hud-layer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.6);
  z-index: -1;
}

.font-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

/* Top Bar */
.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.hud-stat-box {
  background: var(--bg-hud);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-hud);
  border-radius: 6px;
  padding: 8px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--primary-cyan);
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff66;
  box-shadow: 0 0 8px #00ff66;
  animation: pulse 2s infinite;
}

.rec-pill {
  color: var(--accent-red);
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-red);
  animation: blink 1s infinite alternate;
}

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

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.hud-value {
  font-size: 13px;
  margin-top: 3px;
  color: #cad5e2;
}

/* Compass Tape */
.compass-wrapper {
  position: relative;
  width: 380px;
  background: var(--bg-hud);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-hud);
  border-radius: 6px;
  padding: 6px 12px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.compass-marker {
  color: var(--accent-orange);
  font-size: 12px;
  line-height: 1;
}

.compass-tape {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  letter-spacing: 1.5px;
}

.compass-tape span:nth-child(even) {
  color: rgba(255,255,255,0.25);
}

.heading-readout {
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-cyan);
  margin-top: 2px;
}

/* Center HUD / Reticle & Gauges */
.hud-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 580px;
  height: 380px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crosshair-reticle {
  position: relative;
  width: 80px;
  height: 80px;
}

.reticle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 1.5px solid rgba(0, 240, 255, 0.6);
  border-radius: 50%;
}

.reticle-line {
  position: absolute;
  background: rgba(0, 240, 255, 0.5);
}

.reticle-line.h {
  width: 20px;
  height: 1.5px;
  top: 50%;
  transform: translateY(-50%);
}

.reticle-line.h.left { left: 0; }
.reticle-line.h.right { right: 0; }

.reticle-line.v {
  width: 1.5px;
  height: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.reticle-line.v.top { top: 0; }
.reticle-line.v.bottom { bottom: 0; }

/* Artificial Horizon Pitch Ladder */
.pitch-ladder {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(0, 240, 255, 0.65);
  transition: transform 0.1s linear;
}

.pitch-bar {
  letter-spacing: 2px;
}

/* Telemetry Gauges */
.telemetry-gauge {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-hud);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-hud);
  border-radius: 4px;
  padding: 8px 10px;
  width: 85px;
}

.telemetry-gauge.left-gauge {
  left: 20px;
}

.telemetry-gauge.right-gauge {
  right: 20px;
}

.gauge-label {
  font-family: var(--font-hud);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.gauge-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-cyan);
  margin: 4px 0;
}

.gauge-bar-v {
  width: 6px;
  height: 90px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.gauge-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to top, var(--primary-cyan), #00ffaa);
  border-radius: 3px;
  transition: height 0.2s ease;
}

/* Bottom Center: Active Landmark Cinematic Card */
.hud-bottom-center {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 8px;
}

.landmark-card {
  pointer-events: auto;
  max-width: 680px;
  width: 100%;
  background: var(--bg-hud-card);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-left: 5px solid var(--primary-cyan);
  border-radius: 8px;
  padding: 14px 22px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 255, 0.15);
  transition: all 0.4s ease;
  animation: slideUp 0.5s ease-out;
}

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

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

.landmark-tag {
  background: rgba(0, 240, 255, 0.15);
  color: var(--primary-cyan);
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
}

.drone-loc-coords {
  color: var(--accent-orange);
  font-size: 12px;
}

.landmark-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.landmark-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: #c9d1d9;
  word-break: keep-all;
}

/* Bottom Left & Right HUD */
.hud-bottom-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  background: var(--bg-hud);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-hud);
  border-radius: 6px;
  padding: 8px 14px;
  width: fit-content;
}

.hud-item .dim {
  color: var(--text-muted);
}

.hud-item .highlight {
  color: var(--primary-cyan);
  font-weight: 700;
}

.hud-bottom-right {
  pointer-events: auto;
  display: flex;
  gap: 10px;
  align-self: flex-end;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 6px;
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.btn-record-full {
  background: linear-gradient(135deg, #00c853, #009624);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 18px rgba(0, 200, 83, 0.4);
}

.btn-record-full:hover {
  background: linear-gradient(135deg, #00e676, #00c853);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.6);
  transform: translateY(-1px);
}

.btn-record {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-record:hover {
  background: linear-gradient(135deg, #f44336, #c62828);
  box-shadow: 0 0 16px rgba(255, 51, 68, 0.5);
  transform: translateY(-1px);
}

/* Full Tour Recording Modal */
.record-progress-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 150;
  background: rgba(4, 8, 16, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-hud-card);
  border: 1px solid var(--primary-cyan);
  border-radius: 12px;
  width: 480px;
  max-width: 90%;
  padding: 24px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 240, 255, 0.25);
  animation: slideUp 0.3s ease-out;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.modal-title {
  font-family: var(--font-hud);
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00f0ff, #00e676);
  border-radius: 6px;
  transition: width 0.2s ease;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
}

.progress-details {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--primary-cyan);
  margin-bottom: 14px;
}

.modal-hint {
  font-size: 12.5px;
  line-height: 1.5;
  color: #8b949e;
  margin-bottom: 14px;
}

.mt-2 {
  margin-top: 10px;
}

.btn-record.recording {
  background: linear-gradient(135deg, #ff9800, #e65100);
  animation: pulseRecord 1s infinite alternate;
}

@keyframes pulseRecord {
  from { box-shadow: 0 0 10px rgba(255, 152, 0, 0.4); }
  to { box-shadow: 0 0 24px rgba(255, 152, 0, 0.8); }
}

.btn-secondary {
  background: var(--bg-hud-card);
  backdrop-filter: blur(8px);
  color: #e6edf3;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
}

/* Interactive Control Dock (Right Side) */
.control-dock {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 320px;
  background: var(--bg-hud-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-hud);
  border-radius: 10px;
  z-index: 20;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
}

.control-dock.minimized .dock-body {
  display: none;
}

.dock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  background: rgba(0, 240, 255, 0.05);
  border-radius: 10px 10px 0 0;
}

.dock-title {
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--primary-cyan);
}

.dock-minimize-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}

.dock-minimize-btn:hover {
  color: #ffffff;
}

.dock-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.dock-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* Landmark Quick Buttons Grid */
.landmark-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.btn-landmark {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #c9d1d9;
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-landmark:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--primary-cyan);
  color: #ffffff;
}

.btn-landmark.active {
  background: rgba(0, 240, 255, 0.22);
  border-color: var(--primary-cyan);
  color: #00f0ff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.lm-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-family: var(--font-hud);
  font-size: 10px;
  color: var(--primary-cyan);
}

.btn-landmark.active .lm-num {
  background: var(--primary-cyan);
  color: #000;
}

/* Button Groups */
.btn-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.btn-mode, .btn-cam, .btn-tod {
  padding: 7px 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: #8b949e;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-mode:hover, .btn-cam:hover, .btn-tod:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-mode.active, .btn-cam.active, .btn-tod.active {
  background: var(--primary-cyan);
  color: #050811;
  border-color: var(--primary-cyan);
  font-weight: 700;
}

.btn-toggle-audio {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle-audio.active {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mt-1 {
  margin-top: 6px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-label {
  font-size: 11.5px;
  color: var(--text-muted);
}

input[type="range"] {
  flex: 1;
  accent-color: var(--primary-cyan);
  cursor: pointer;
}

/* Manual Key Help */
.manual-help {
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(0, 240, 255, 0.3);
  border-radius: 6px;
  padding: 10px;
}

.help-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary-cyan);
  margin-bottom: 6px;
}

.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  font-size: 10.5px;
  color: #cad5e2;
}

kbd {
  display: inline-block;
  padding: 1px 4px;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 3px;
  font-size: 9.5px;
  color: #58a6ff;
}

/* Toast Message */
.toast {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(16, 24, 40, 0.95);
  border: 1px solid var(--primary-cyan);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 240, 255, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .control-dock {
    width: 280px;
    top: 14px;
    right: 14px;
  }
  .landmark-card {
    max-width: 90%;
  }
  .hud-center {
    width: 440px;
    height: 320px;
  }
}
