.root {
  position: fixed;
  inset: 0;
  background: #000;
  overflow: hidden;
}

.controls {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.recordBtn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: #dc2626;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recordBtn:hover {
  transform: scale(1.08);
  background: #ef4444;
}

.recordBtn:active {
  transform: scale(0.95);
}

.recordBtnInner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
}

.stopBtn {
  composes: recordBtn;
  background: #dc2626;
}

.stopBtn .recordBtnInner {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

.countdown {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.countdownNumber {
  font-size: 160px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 60px rgba(217, 70, 239, 0.8), 0 0 120px rgba(217, 70, 239, 0.4);
  animation: countPulse 1s ease-out;
}

@keyframes countPulse {
  0% { transform: scale(1.4); opacity: 0.5; }
  30% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.recordingIndicator {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
}

.recordingDot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #dc2626;
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.recordingText {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.frameCount {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.resultOverlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.resultTitle {
  font-size: 32px;
  color: #d946ef;
  margin: 0;
  text-shadow: 0 0 30px rgba(217, 70, 239, 0.5);
}

.resultInfo {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.resultActions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.actionBtn {
  padding: 14px 32px;
  border: 2px solid #d946ef;
  border-radius: 8px;
  background: rgba(217, 70, 239, 0.2);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.actionBtn:hover {
  background: rgba(217, 70, 239, 0.4);
}

.actionBtn:active {
  transform: scale(0.97);
}

.actionBtnSecondary {
  composes: actionBtn;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
}

.actionBtnSecondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.copiedMsg {
  font-size: 14px;
  color: #00ffcc;
  min-height: 20px;
}

.loadingOverlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.spinner {
  width: 56px;
  height: 56px;
  border: 4px solid rgba(217, 70, 239, 0.2);
  border-top-color: #d946ef;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loadingText {
  font-size: 22px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.backBtn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.backBtn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}
