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

body {
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  background: #1a0a30;
  font-family: 'Arial Rounded MT Bold', Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

#canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

/* Kamera önizleme */
#cam-preview {
  position: fixed;
  bottom: 14px;
  right: 14px;
  width: 144px;
  height: 108px;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 10;
}
#cam-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

/* Başlangıç ekranı */
#overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 42%, #1e0a38 0%, #050010 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  text-align: center;
  padding: 40px;
  color: #fff;
}

#overlay h1 {
  font-size: clamp(3rem, 10vw, 5.5rem);
  margin-bottom: 16px;
  text-shadow: 0 0 40px rgba(255, 130, 0, 0.8);
  letter-spacing: -1px;
}

#overlay p {
  font-size: clamp(1.1rem, 3.5vw, 1.7rem);
  opacity: 0.85;
  margin-bottom: 44px;
  line-height: 1.65;
  max-width: 520px;
}

#btn-start {
  font-size: clamp(1.3rem, 4vw, 2.2rem);
  font-weight: bold;
  padding: 18px 64px;
  border: none;
  border-radius: 64px;
  cursor: pointer;
  background: linear-gradient(135deg, #ff8c00, #ffd200);
  color: #2a1000;
  box-shadow: 0 6px 32px rgba(255, 185, 0, 0.6);
  transition: transform 0.1s, box-shadow 0.1s;
  letter-spacing: 0.5px;
}
#btn-start:hover  { transform: scale(1.04); }
#btn-start:active { transform: scale(0.96); box-shadow: 0 3px 16px rgba(255,185,0,0.4); }

/* Şarj çubuğu */
#charge-bar-wrap {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: min(360px, 70vw);
  z-index: 10;
  pointer-events: none;
}

#charge-label {
  color: #fff;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  font-weight: bold;
  text-align: center;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  opacity: 0.9;
  letter-spacing: 0.5px;
}

#charge-track {
  width: 100%;
  height: 22px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 11px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

#charge-fill {
  height: 100%;
  width: 0%;
  border-radius: 9px;
  background: linear-gradient(90deg, #44ee44, #ffaa00, #ff4400);
  background-size: 360px 100%;
  transition: width 0.08s linear;
  box-shadow: 0 0 12px rgba(255, 160, 0, 0.5);
}

#charge-fill.full {
  animation: chargePulse 0.3s ease-in-out infinite alternate;
}

@keyframes chargePulse {
  from { box-shadow: 0 0 12px rgba(255,80,0,0.6); }
  to   { box-shadow: 0 0 28px rgba(255,80,0,1.0); }
}
