:root {
  --bg-deep: #071018;
  --glass-bg: rgba(12, 22, 34, 0.76);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-highlight: rgba(140, 235, 220, 0.35);
  --text-main: #f2f7f6;
  --text-muted: #93a8b3;
  --accent-gold: #f5b942;
  --accent-crimson: #e85d56;
  --accent-jade: #4fd1a5;
  --accent-amber: #f28e3c;
  --accent-violet: #b67cf8;
  --accent-grand: #e2eeff;
  --accent-taiko: #2ec4b6;
  --accent-handpan: #56cfe1;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
}

#nature-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  cursor: crosshair;
  z-index: 1;
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.42);
}

/* Start Overlay */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(14, 30, 42, 0.82), rgba(5, 11, 18, 0.96));
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.overlay-card {
  max-width: 590px;
  padding: 2.5rem 2.75rem;
  text-align: center;
  background: rgba(14, 26, 38, 0.88);
  border: 1px solid rgba(79, 209, 165, 0.32);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), 0 0 40px rgba(79, 209, 165, 0.12);
}

.nature-emblem {
  font-size: 3.1rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 4px 14px rgba(79, 209, 165, 0.45));
  animation: swayEmblem 4s ease-in-out infinite;
}

@keyframes swayEmblem {
  0%, 100% { transform: translateY(0px) rotate(-4deg); }
  50% { transform: translateY(-7px) rotate(6deg); }
}

.overlay-card h1 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 400;
  color: #f0fcf9;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: var(--accent-jade);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.8rem;
}

.feature-pills span {
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(79, 209, 165, 0.09);
  border: 1px solid rgba(79, 209, 165, 0.22);
  color: #dcf7f0;
}

.primary-btn {
  background: linear-gradient(135deg, #4fd1a5, #f5b942);
  color: #09161b;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.85rem 2.4rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(79, 209, 165, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(245, 185, 66, 0.45);
}

/* HUD Top */
.hud-top {
  position: fixed;
  top: 12px;
  left: 14px;
  right: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.hud-top > * {
  pointer-events: auto;
}

/* Scene Switcher Tabs */
.scene-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
}

.scene-tab {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.scene-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.scene-tab.active {
  color: #08151a;
  background: linear-gradient(135deg, #4fd1a5, #f5b942);
  box-shadow: 0 3px 12px rgba(79, 209, 165, 0.3);
}

.telemetry-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 7px 16px;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 72px;
}

.telemetry-label {
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.telemetry-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 82px;
  accent-color: var(--accent-jade);
  cursor: pointer;
}

.controls-panel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
}

.control-group {
  display: flex;
  flex-direction: column;
  padding: 0 4px;
}

.control-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

select {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 0.78rem;
  outline: none;
  cursor: pointer;
}

select option {
  background: #0d1a26;
  color: var(--text-main);
}

.hud-btn {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hud-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.hud-btn.active {
  background: rgba(79, 209, 165, 0.2);
  border-color: var(--accent-jade);
  color: #c8ffea;
}

.hud-btn.loop-active {
  background: rgba(182, 124, 248, 0.25);
  border-color: var(--accent-violet);
  color: #ead6ff;
}

.icon-btn {
  width: 30px;
  height: 30px;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
}

/* Bottom HUD */
.hud-bottom {
  position: fixed;
  bottom: 12px;
  left: 14px;
  right: 14px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  pointer-events: none;
}

.hud-bottom > * {
  pointer-events: auto;
}

.dock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.instrument-dock {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  flex-wrap: wrap;
  justify-content: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.instrument-dock.hidden-dock {
  display: none;
}

.dock-section-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.inst-btn, .drum-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  padding: 6px 10px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.16s ease;
}

.inst-btn:hover, .drum-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.inst-btn.active, .drum-btn.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.leaf-dot {
  width: 11px;
  height: 11px;
  border-radius: 50% 0 50% 50%;
  transform: rotate(-35deg);
  display: inline-block;
}

.lily-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.harp-dot { background: var(--accent-gold); box-shadow: 0 0 7px var(--accent-gold); }
.strings-dot { background: var(--accent-crimson); box-shadow: 0 0 7px var(--accent-crimson); }
.flute-dot { background: var(--accent-jade); box-shadow: 0 0 7px var(--accent-jade); }
.piano-dot { background: var(--accent-amber); box-shadow: 0 0 7px var(--accent-amber); }
.chorus-dot { background: var(--accent-violet); box-shadow: 0 0 7px var(--accent-violet); }
.grand-dot { background: var(--accent-grand); box-shadow: 0 0 9px var(--accent-grand); }

.taiko-dot { background: var(--accent-taiko); box-shadow: 0 0 7px var(--accent-taiko); }
.handpan-dot { background: var(--accent-handpan); box-shadow: 0 0 7px var(--accent-handpan); }
.marimba-dot { background: #f4a261; box-shadow: 0 0 7px #f4a261; }
.bamboo-dot { background: #80ed99; box-shadow: 0 0 7px #80ed99; }

.inst-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.inst-name {
  font-size: 0.74rem;
  font-weight: 600;
}

.inst-type {
  font-size: 0.63rem;
  color: var(--text-muted);
}

kbd {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 1px 4px;
  color: #e2e8f0;
}

.keyboard-dock {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 5px 14px;
  font-size: 0.72rem;
  flex-wrap: wrap;
  justify-content: center;
}

.drone-section {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dock-label {
  color: var(--text-muted);
}

.drone-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.7rem;
  cursor: pointer;
}

.drone-btn.active {
  background: rgba(79, 209, 165, 0.22);
  border-color: var(--accent-jade);
  color: #b8ffea;
}

.shortcut-hints {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.suite-links {
  display: flex;
  gap: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  padding-left: 12px;
}

.suite-links a {
  color: var(--accent-jade);
  text-decoration: none;
  font-weight: 500;
}

.suite-links a:hover {
  text-decoration: underline;
}

/* Help Modal */
.glass-dialog {
  margin: auto;
  max-width: 700px;
  width: 92%;
  background: rgba(10, 20, 32, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-highlight);
  border-radius: 18px;
  color: var(--text-main);
  padding: 1.5rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
}

.glass-dialog::backdrop {
  background: rgba(4, 9, 15, 0.68);
  backdrop-filter: blur(4px);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
}

.dialog-header h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.3rem;
  color: #f0fcf9;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.guide-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem 1.15rem;
}

.guide-card h4 {
  color: var(--accent-gold);
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
}

.guide-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #d4e4e8;
}

@media (max-width: 1024px) {
  .hud-top {
    flex-wrap: wrap;
    justify-content: center;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
}
