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

html, body {
  height: 100%;
  overflow: hidden;
  background: #0c0f0f;
  -webkit-font-smoothing: antialiased;
}

.screen {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.screen.active { display: flex; opacity: 1; }

/* Home */
#home {
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 3rem;
  font-family: system-ui, -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
  color: #e2e2e2;
}
.home-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(195,192,255,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(54,38,206,0.12) 0%, transparent 60%),
    #0c0f0f;
}
.home-header { text-align: center; z-index: 1; }
.eyebrow {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(207,196,197,0.6);
  margin-bottom: 1rem;
}
.home-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 200;
  line-height: 1.15;
  letter-spacing: 0.02em;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.25rem;
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
}
.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(207,196,197,0.65);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.lang-btn:hover { color: rgba(226,226,226,0.9); }
.lang-btn.active {
  color: rgba(226,226,226,0.95);
  background: rgba(54,38,206,0.28);
  box-shadow: 0 0 16px rgba(210,187,255,0.1);
}
.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  max-width: 900px;
  width: 100%;
  z-index: 1;
}
.scene-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem;
  padding: 1.75rem;
  text-align: left;
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s;
  color: #e2e2e2;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.scene-card:hover {
  transform: translateY(-3px);
  border-color: rgba(210,187,255,0.25);
}
.scene-icon { width: 48px; height: 48px; }
.scene-label { font-size: 1.1rem; font-weight: 400; }
.scene-desc { font-size: 0.8rem; color: rgba(207,196,197,0.55); }

.visualizer span {
  width: 4px; height: 8px;
  background: #d2bbff;
  border-radius: 2px;
  opacity: 0.3;
}
.visualizer.playing span {
  animation: viz 0.8s ease-in-out infinite alternate;
  opacity: 0.8;
}
@keyframes viz { from { height: 8px; } to { height: 28px; } }

@media (prefers-reduced-motion: reduce) {
  .scene-card,
  .visualizer.playing span {
    transition: none;
    animation: none;
  }
}
