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

:root {
  --fg: #0a0a0a;
  --bg: #fafafa;
  --accent: #1a1a1a;
  --muted: #888;
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
  font-family: 'Space Mono', monospace;
  color: var(--fg);
}

canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

#ui {
  position: fixed;
  top: 28px;
  left: 32px;
  z-index: 10;
  pointer-events: none;
  user-select: none;
}

#logo {
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  display: block;
  opacity: 0;
  animation: fadeUp 1.2s ease forwards 0.3s;
}

#logo-en {
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  color: var(--muted);
  display: block;
  margin-top: 4px;
  opacity: 0;
  animation: fadeUp 1.2s ease forwards 0.6s;
}

#tagline {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-top: 10px;
  opacity: 0;
  animation: fadeUp 1.2s ease forwards 0.9s;
}

#controls {
  position: fixed;
  bottom: 32px;
  left: 32px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  animation: fadeUp 1.2s ease forwards 1.2s;
}

.ctrl-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ctrl-group label {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--muted);
  width: 62px;
  flex-shrink: 0;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 110px;
  height: 1px;
  background: #ccc;
  outline: none;
  border: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fg);
  cursor: pointer;
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.4);
}

input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fg);
  border: none;
  cursor: pointer;
}

#mantra {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 10;
  text-align: right;
  pointer-events: none;
  user-select: none;
}

#mantra-text {
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  opacity: 0;
  transition: opacity 1.5s ease;
  font-style: italic;
}

#mantra-text.visible {
  opacity: 1;
}

#contact {
  display: block;
  margin-top: 10px;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  pointer-events: all;
}

#contact:hover {
  opacity: 1;
}

#sound-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--muted);
  opacity: 0;
  animation: fadeUp 1.2s ease forwards 2s;
  transition: opacity 0.8s ease;
  pointer-events: none;
  text-transform: uppercase;
}

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