/* sigmashake-arcade/public/sigma-beat/styles.css */
/* Cyberpunk Neon Aesthetic for Sigma Beat Revolution */

:root {
  --bg-dark: #080a12;
  --cyan: #00f0ff;
  --pink: #ff007f;
  --green: #39ff14;
  --yellow: #ffe600;
  --red: #ff2a2a;
  --purple: #8a2be2;
  --font-display: 'Orbitron', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  font-family: var(--font-body);
  color: #ffffff;
}

#app-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

/* Background Mirrored Video */
#webcam-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Mirror camera for natural reflection */
  z-index: 1;
  opacity: 0.38;
}

#video-tint {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(8, 10, 18, 0.4) 0%, rgba(8, 10, 18, 0.85) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Super Saiyan Beast Mode Flash */
#beast-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 230, 0, 0.45) 0%, rgba(255, 0, 127, 0.3) 70%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.5s ease-out;
}

#beast-flash.active {
  opacity: 1;
  animation: flashPulse 0.6s infinite alternate;
}

@keyframes flashPulse {
  0% { opacity: 0.6; }
  100% { opacity: 0.15; }
}

/* Game Canvas */
#game-canvas {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  height: 100%;
  z-index: 3;
}

/* HUD Top Header */
#hud-top {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 680px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.hud-stat-box {
  background: rgba(15, 20, 35, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-box {
  min-width: 110px;
}

.combo-box {
  min-width: 80px;
  animation: comboPulse 0.3s ease-out;
}

.hud-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.6);
}

.hud-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.workout-box {
  flex-direction: row;
  gap: 16px;
  padding: 8px 16px;
}

.stat-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mini-label {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.55);
}

.mini-value {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
}

.mini-unit {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.4);
}

/* Hype Meter */
#hype-meter-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 600px;
  padding: 0 16px;
  margin-top: 2px;
}

.hype-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
}

.hype-title {
  color: var(--yellow);
  text-shadow: 0 0 8px rgba(255, 230, 0, 0.5);
}

#beast-mode-banner {
  color: var(--pink);
  font-size: 11px;
  animation: beastTextBlink 0.5s infinite alternate;
}

@keyframes beastTextBlink {
  0% { transform: scale(0.98); opacity: 0.8; }
  100% { transform: scale(1.04); opacity: 1; text-shadow: 0 0 12px var(--pink); }
}

#hype-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 230, 0, 0.25);
}

#hype-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--green) 50%, var(--yellow) 85%, var(--pink) 100%);
  box-shadow: 0 0 12px var(--yellow);
  transition: width 0.15s ease-out;
}

/* Coach Banner */
#coach-banner {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-top: auto;
  margin-bottom: 12px;
  background: rgba(10, 15, 25, 0.7);
  padding: 6px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

#coach-text {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.reps-subtext {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}

/* Quick Controls */
#quick-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  gap: 8px;
}

.btn-ctrl {
  background: rgba(20, 25, 45, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #ffffff;
  padding: 6px 10px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ctrl:hover {
  background: rgba(40, 50, 85, 0.9);
  border-color: var(--cyan);
}

/* Touch Pads */
#touch-controls {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 600px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 12px 20px 12px;
}

.touch-pad {
  background: rgba(18, 24, 40, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
  backdrop-filter: blur(10px);
  transition: transform 0.1s ease, border-color 0.1s ease;
}

.touch-pad:active {
  transform: scale(0.94);
}

.pad-left { border-color: rgba(0, 240, 255, 0.4); }
.pad-down { border-color: rgba(57, 255, 20, 0.4); }
.pad-up { border-color: rgba(255, 230, 0, 0.4); }
.pad-right { border-color: rgba(255, 0, 127, 0.4); }

.pad-left:active { background: rgba(0, 240, 255, 0.3); }
.pad-down:active { background: rgba(57, 255, 20, 0.3); }
.pad-up:active { background: rgba(255, 230, 0, 0.3); }
.pad-right:active { background: rgba(255, 0, 127, 0.3); }

.pad-arrow {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 2px;
}

.pad-sub {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Modals */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 7, 14, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: rgba(16, 22, 38, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 240, 255, 0.15);
}

.badge-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: rgba(0, 240, 255, 0.12);
  color: var(--cyan);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  margin-bottom: 12px;
}

.game-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.05;
  color: #ffffff;
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.6);
}

.title-sub {
  color: var(--pink);
  text-shadow: 0 0 20px rgba(255, 0, 127, 0.8);
}

.game-tagline {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 10px;
  line-height: 1.4;
}

.how-to-play {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0;
  text-align: left;
}

.move-card {
  background: rgba(25, 32, 54, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
}

.move-icon {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 4px;
}

.move-card strong {
  font-family: var(--font-display);
  font-size: 11px;
}

.move-card small {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
  text-align: left;
}

.setting-item label {
  display: block;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
}

.input-select {
  width: 100%;
  background: rgba(25, 32, 54, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  outline: none;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
}

.status-msg {
  font-size: 12px;
  color: var(--cyan);
  margin-bottom: 16px;
  min-height: 18px;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--pink) 100%);
  border: none;
  border-radius: 14px;
  color: #ffffff;
  padding: 14px 20px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1.5px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 0, 127, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 240, 255, 0.5);
}

.btn-primary:active {
  transform: translateY(1px);
}

.controls-hint {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 12px;
}

/* Results Screen */
.results-card {
  max-width: 480px;
}

.results-grade {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
  color: var(--yellow);
  text-shadow: 0 0 30px rgba(255, 230, 0, 0.8);
  margin-top: 4px;
}

.results-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.results-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.res-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.res-label {
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}

.res-val {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
}

.rep-breakdown-row {
  display: flex;
  justify-content: space-around;
  font-size: 12px;
  background: rgba(15, 20, 35, 0.5);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 20px;
}

/* Glowing utilities */
.glow-yellow { color: var(--yellow); text-shadow: 0 0 10px rgba(255, 230, 0, 0.6); }
.glow-cyan { color: var(--cyan); text-shadow: 0 0 10px rgba(0, 240, 255, 0.6); }
.glow-pink { color: var(--pink); text-shadow: 0 0 10px rgba(255, 0, 127, 0.6); }
.glow-green { color: var(--green); text-shadow: 0 0 10px rgba(57, 255, 20, 0.6); }

.hidden {
  display: none !important;
}
