:root {
  --fade: 0.6s ease;
  --panel-bg: rgba(10, 10, 14, 0.55);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text: #f5f5f7;
  --text-dim: rgba(245, 245, 247, 0.55);
  --accent: #7dd3fc;
}

* {
  box-sizing: border-box;
}

/* Visually hidden: kept in the DOM (and reachable by screen readers /
   search crawlers) but not rendered. Used for the h1/header so the
   page still has semantic structure without ruining the visual. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #000;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Yu Gothic", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  background: #000;
}

#clock {
  position: fixed;
  top: 28px;
  right: 40px;
  font-size: 56px;
  font-weight: 200;
  letter-spacing: 0.06em;
  opacity: 0.28;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  transition: opacity var(--fade);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
  user-select: none;
}

#controls {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: opacity var(--fade), transform var(--fade);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

#controls button {
  appearance: none;
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  min-width: 40px;
}

#controls button:hover {
  background: rgba(255, 255, 255, 0.08);
}

#controls button .icon {
  font-size: 16px;
  display: inline-block;
  line-height: 1;
}

#controls button.muted .icon::after {
  content: "";
}

#hint {
  position: fixed;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  pointer-events: none;
  transition: opacity var(--fade);
  white-space: nowrap;
  z-index: 10;
}

/* Idle state — fade chrome out, hide cursor */
body.idle {
  cursor: none;
}

body.idle #controls {
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
  pointer-events: none;
}

body.idle #hint {
  opacity: 0;
}

body.idle #clock {
  opacity: 0.18;
}

@media (max-width: 560px) {
  #clock {
    font-size: 36px;
    top: 18px;
    right: 20px;
  }
  #controls {
    bottom: 20px;
    padding: 8px 10px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: calc(100vw - 24px);
  }
  #controls button {
    padding: 6px 12px;
    font-size: 13px;
  }
}
