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

body {
  background: #f4f1ea;
  color: #2b2b2b;
  font-family: 'Arial', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

#app {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#video-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

#webcam {
  display: block;
  width: 800px;
  height: 600px;
  object-fit: cover;
  transform: scaleX(-1);
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#hit-flash {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.05s;
  z-index: 100;
}

#hit-flash.flash {
  background: #f2e3c6;
  opacity: 0.2;
  transition: none;
}

#status {
  font-size: 14px;
  color: #6b6b6b;
  height: 20px;
}

#controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

#start-btn {
  background: #c8a46b;
  color: #2b2b2b;
  border: 1px solid #9b7a4f;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background 0.2s, transform 0.1s;
}

#start-btn:hover {
  background: #b8935c;
}

#start-btn:active {
  transform: scale(0.97);
}

#record-btn, #save-btn {
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
}

#record-btn { background: #c8a46b; color: #2b2b2b; border: 1px solid #9b7a4f; }
#record-btn:hover:not(:disabled) { background: #b8935c; }
#record-btn:active { transform: scale(0.97); }
#record-btn.recording { background: #b8935c; animation: pulse 1s infinite; }
#record-btn:disabled, #save-btn:disabled { opacity: 0.35; cursor: default; }

#save-btn { background: #c8a46b; color: #2b2b2b; border: 1px solid #9b7a4f; }
#save-btn:hover:not(:disabled) { background: #b8935c; }
#save-btn:active { transform: scale(0.97); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

#footer {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: #aaa;
  text-align: center;
  line-height: 1.8;
  white-space: nowrap;
}

#footer a { color: #aaa; text-decoration: underline; cursor: pointer; }
#footer a:hover { color: #888; }
#footer .sep { opacity: 0.4; }

#policy {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

#policy-box {
  background: #fff;
  color: #333;
  border-radius: 10px;
  padding: 28px 32px;
  max-width: 440px;
  line-height: 1.6;
  font-size: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

#policy-box h3 { margin-bottom: 12px; font-size: 16px; }

label {
  font-size: 14px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="range"] {
  width: 100px;
  accent-color: #a67c52;
}