:root {
  --why-color: #0000ff;    /* Blue */
  --what-color: #87ceeb;   /* Light Blue */
  --how-color: #ff0000;    /* Red */
  --where-color: #ff8c00;  /* Orange */
  --when-color: #ffcc00;   /* Yellow */
  --who-color: #ffffff;    /* White */

  /* Background gradients for each section */
  --why-bg: linear-gradient(180deg, #0a1128 0%, #001f54 50%, #034078 100%);    /* Night sky - deep navy to rich blue */
  --what-bg: #87ceeb;   /* Light Blue - solid for now */
  --how-bg: #ff0000;    /* Red - solid for now */
  --where-bg: #ff8c00;  /* Orange - solid for now */
  --when-bg: #ffcc00;   /* Yellow - solid for now */
  --who-bg: #ffffff;    /* White - solid for now */
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f0f0f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a1a;
  transition: background 0.5s ease;
}

body.dark-mode {
  background: #000000;
}

#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Navigation */
#nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 100;
  padding: 12px 16px;
  background: transparent;
  border-radius: 50px;
  mix-blend-mode: difference;
}

#nav button {
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 25px;
  transition: all 0.3s ease;
}

#nav button:hover,
#nav button.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Content overlay */
#content-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.4s ease;
}

#content-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

#close-content {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 28px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s;
}

#close-content:hover {
  background: rgba(255, 255, 255, 0.2);
}

#content-inner {
  max-width: 800px;
  padding: 40px;
  text-align: center;
}

/* Face content styles */
.face-content h1 {
  font-size: clamp(2rem, 8vw, 4rem);
  margin-bottom: 20px;
  font-weight: 700;
}

.face-content p {
  font-size: clamp(1rem, 3vw, 1.5rem);
  opacity: 0.7;
}

/* Hint text */
#hint {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  transition: opacity 0.5s;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #nav {
    bottom: 10px;
    gap: 4px;
    padding: 8px 12px;
    max-width: 95vw;
    overflow-x: auto;
    justify-content: flex-start;
  }

  #nav button {
    padding: 8px 14px;
    font-size: 12px;
    flex-shrink: 0;
  }
}

/* Landscape mobile adjustments */
@media (max-width: 932px) and (max-height: 450px) and (orientation: landscape) {
  #canvas-container {
    align-items: flex-start;
    padding-top: 10vh;
  }

  #nav {
    bottom: 5px;
    padding: 6px 10px;
  }

  #nav button {
    padding: 6px 12px;
    font-size: 11px;
  }
}
