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

body {
  background: #0a0a12;
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
  color: #e0d8f0;
  user-select: none;
  -webkit-user-select: none;
}

canvas {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 12px 20px 8px;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(10,10,18,0.85) 0%, rgba(10,10,18,0) 100%);
}

#title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 28px;
  letter-spacing: 2px;
  color: #f0e8ff;
  text-shadow: 0 0 30px rgba(160,120,255,0.4);
}

.infinity {
  font-size: 24px;
}

#tagline {
  font-size: 12px;
  color: rgba(200,180,240,0.5);
  font-style: italic;
  margin-top: 2px;
  letter-spacing: 1px;
}

#depth-indicator {
  position: fixed;
  top: 70px;
  left: 16px;
  z-index: 10;
  font-size: 14px;
  font-weight: 500;
  color: rgba(200,180,255,0.8);
  pointer-events: none;
  text-shadow: 0 0 10px rgba(120,80,200,0.5);
}

#breadcrumb {
  position: fixed;
  top: 92px;
  left: 16px;
  z-index: 10;
  font-size: 11px;
  color: rgba(180,160,220,0.6);
  pointer-events: none;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#top-controls {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
}

#top-controls button {
  background: rgba(30,25,50,0.8);
  border: 1px solid rgba(120,100,180,0.3);
  color: #c0b0e0;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

#top-controls button:hover {
  background: rgba(60,45,100,0.8);
  border-color: rgba(160,130,240,0.5);
}

#mode-toggle {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(120,100,180,0.3);
}

.mode-btn {
  background: rgba(30,25,50,0.8) !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 6px 10px !important;
  font-size: 11px !important;
}

.mode-btn.active {
  background: rgba(100,70,180,0.6) !important;
  color: #fff !important;
}

#controls {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
}

#btn-toggle-controls {
  background: rgba(30,25,50,0.7);
  border: 1px solid rgba(120,100,180,0.25);
  color: #a090c0;
  padding: 4px 20px;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  backdrop-filter: blur(10px);
}

#controls-panel {
  background: rgba(18,15,35,0.9);
  border: 1px solid rgba(120,100,180,0.2);
  border-radius: 12px;
  padding: 14px 20px;
  display: none;
  min-width: 280px;
  backdrop-filter: blur(20px);
}

#controls-panel.open {
  display: block;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}

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

.control-row label {
  width: 60px;
  text-align: right;
  color: #a090c0;
  font-size: 12px;
}

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: rgba(120,100,180,0.3);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #a080e0;
  cursor: pointer;
}

#volume-display {
  font-size: 11px;
  color: #8070a0;
  width: 30px;
}

.toggle-btn {
  background: rgba(40,30,70,0.8);
  border: 1px solid rgba(120,100,180,0.3);
  color: #a090c0;
  padding: 4px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: rgba(100,70,180,0.5);
  color: #e0d0ff;
  border-color: rgba(160,120,255,0.5);
}

.hint-row {
  justify-content: center;
}

.hint {
  font-size: 10px;
  color: rgba(160,140,200,0.4);
  letter-spacing: 1px;
}

#footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 6px;
  font-size: 10px;
  color: rgba(140,120,180,0.35);
  z-index: 10;
  pointer-events: none;
}

#footer a {
  color: rgba(160,130,220,0.5);
  text-decoration: none;
  pointer-events: all;
}

#footer a:hover {
  color: rgba(180,150,240,0.8);
}

@media (max-width: 600px) {
  #title { font-size: 20px; }
  #tagline { font-size: 10px; }
  #top-controls { top: 60px; right: 8px; gap: 4px; }
  #top-controls button { padding: 5px 8px; font-size: 11px; }
  .mode-btn { font-size: 10px !important; padding: 5px 7px !important; }
  #depth-indicator { top: 58px; font-size: 12px; }
  #breadcrumb { top: 76px; font-size: 10px; }
  #controls-panel { min-width: 240px; }
}