:root{
  --gold:#ffd700;
  --red:#ff2b2b;
  --pink:#ff69b4;
  --glass: rgba(0,0,0,0.45);
}

*{ box-sizing:border-box; }
body{
  margin:0;
  overflow:hidden;
  background:#000;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

#canvas-container{
  width:100%;
  height:100vh;
  display:block;
}

#ui-layer{
  position:absolute;
  left:0; right:0;
  bottom:26px;
  display:flex;
  justify-content:center;
  pointer-events:none;
  z-index:100;
}

.hud{
  width:min(820px, calc(100% - 28px));
  padding:14px 16px;
  border-radius:18px;
  background: linear-gradient(180deg, rgba(0,0,0,0.62), rgba(0,0,0,0.32));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 18px 60px rgba(0,0,0,0.55),
    0 0 60px rgba(255,215,0,0.08);
  backdrop-filter: blur(10px);
}

.title{
  text-align:center;
  font-weight:900;
  letter-spacing:2px;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 0 22px rgba(255,215,0,0.25);
  margin-bottom:6px;
}

.guide{
  text-align:center;
  color: rgba(255,255,255,0.62);
  font-size: 12.5px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.9);
  margin-bottom:10px;
}
.hint{
  opacity:0.55;
  margin-left:8px;
  font-size: 12px;
}

.row{
  display:flex;
  gap:12px;
  justify-content:center;
  align-items:center;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border-radius:999px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,215,0,0.35);
  color: var(--gold);
  font-weight:800;
  letter-spacing:0.7px;
  text-transform: uppercase;
  box-shadow: 0 0 22px rgba(255,215,0,0.20);
}

button{
  pointer-events:auto;
  cursor:pointer;
  user-select:none;

  padding: 12px 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,215,0,0.65);
  color:#fff;
  font-weight:900;
  letter-spacing:1px;

  background: radial-gradient(120% 120% at 50% 0%, rgba(255,70,70,0.95), rgba(139,0,0,0.95));
  box-shadow:
    0 18px 50px rgba(255,0,0,0.18),
    0 0 40px rgba(255,215,0,0.14);
  transform: translateZ(0);
  animation: pulse 1.35s infinite;
}

@keyframes pulse{
  0%{ transform: scale(1); filter: brightness(1); }
  50%{ transform: scale(1.05); filter: brightness(1.07); }
  100%{ transform: scale(1); filter: brightness(1); }
}

#camera-preview{
  position:absolute;
  top:14px;
  right:14px;
  width:120px;
  height:90px;
  border-radius:12px;
  opacity:0.68;
  transform: scaleX(-1);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
  z-index:120;
}

.input_video{ display:none; }

#copyright{
  position:absolute;
  bottom:10px;
  right:14px;
  color: rgba(255,255,255,0.25);
  font-size:12px;
  font-style:italic;
  pointer-events:none;
  z-index:110;
}

#error-log{
  display:none;
  position:absolute;
  top:10px;
  left:10px;
  z-index:999;
  max-width:min(560px, calc(100% - 20px));
  white-space:pre-wrap;
  padding:10px 12px;
  border-radius:12px;
  color:#ff6b6b;
  border:1px solid rgba(255,107,107,0.35);
  background: rgba(0,0,0,0.75);
}
