/* FrenZY - Hybrid game. FrenZ-FrenZY bar. BORN YOUR WAY. */

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

body {
  font-family: 'Outfit', system-ui, sans-serif;
  overflow: hidden;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

#app {
  width: 100vw;
  height: 100vh;
  position: relative;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.screen.active {
  display: flex;
}

/* Customize screen */
#customize {
  flex-direction: column;
}

.customize-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ff006e 0%, #8338ec 30%, #3a86ff 60%, #06d6a0 90%, #ffd166 100%);
  background-size: 300% 300%;
  animation: gradientFlow 12s ease infinite;
  z-index: -1;
}

.customize-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 30%, rgba(0,0,0,0.35) 100%);
}

@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.customize-content {
  text-align: center;
  padding: 2rem;
  max-width: 400px;
}

.customize-content h1 {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
  margin-bottom: 0.25rem;
}

.customize-content .tagline {
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 2rem;
}

.option-group {
  margin-bottom: 1.5rem;
}

.option-group label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.8);
  margin-bottom: 0.5rem;
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.opt {
  padding: 0.6rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.2);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.opt:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.8);
}

.opt[aria-pressed="true"] {
  background: #fff;
  color: #8338ec;
  border-color: #fff;
}

.cta {
  margin-top: 1.5rem;
  padding: 1rem 2.5rem;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  border: none;
  background: #fff;
  color: #8338ec;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(0,0,0,0.4);
}

.game-links {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.game-links a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
}

.game-links a:hover { text-decoration: underline; }

/* Rhythm screen */
#rhythm {
  flex-direction: column;
  background: #0a0a14;
}

#canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#rhythm-ui {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2rem;
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  pointer-events: none;
  z-index: 2;
}

#tap-hint {
  position: absolute;
  bottom: 45%;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 2;
  animation: fadeHint 3s forwards;
}

@keyframes fadeHint {
  0%, 30% { opacity: 0; }
  40% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

#tap-zone {
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 1;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Win screen */
#win {
  flex-direction: column;
}

.win-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #06d6a0 0%, #3a86ff 50%, #ff006e 100%);
  background-size: 200% 200%;
  animation: gradientFlow 8s ease infinite;
  z-index: -1;
}

.win-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(0,0,0,0.3) 100%);
}

.win-content {
  text-align: center;
  padding: 2rem;
}

.win-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
  margin-bottom: 1rem;
}

.win-score {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.95);
  margin-bottom: 1.5rem;
}
