/* Pairing screen overlay */
.pairing-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0f0f10;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.pairing-overlay.pairing-hidden {
  opacity: 0;
  pointer-events: none;
}

.pairing-label {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(14px, 2.5vw, 24px);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 240, 232, 0.5);
  margin-bottom: clamp(16px, 3vh, 40px);
}

.pairing-code {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 16px);
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: clamp(48px, 12vw, 160px);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #f4f0e8;
  line-height: 1;
}

.pairing-code-separator {
  font-size: 0.5em;
  color: rgba(244, 240, 232, 0.25);
  user-select: none;
}

.pairing-code-char {
  display: inline-block;
  min-width: 0.7em;
  text-align: center;
}

.pairing-countdown {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(11px, 1.8vw, 16px);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: rgba(244, 240, 232, 0.3);
  margin-top: clamp(16px, 3vh, 40px);
}

.pairing-countdown-bar {
  width: clamp(120px, 20vw, 280px);
  height: 3px;
  background: rgba(244, 240, 232, 0.08);
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}

.pairing-countdown-fill {
  height: 100%;
  background: rgba(0, 170, 255, 0.6);
  border-radius: 2px;
  transition: width 1s linear;
}

/* Connected animation overlay */
.pairing-connected {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(20px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #00ff7f;
  opacity: 0;
  animation: pairing-connected-in 0.6s ease forwards;
}

@keyframes pairing-connected-in {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Subtle glow pulse on the code */
.pairing-code-active {
  animation: pairing-glow 3s ease-in-out infinite;
}

@keyframes pairing-glow {
  0%, 100% { text-shadow: 0 0 20px rgba(0, 170, 255, 0); }
  50% { text-shadow: 0 0 30px rgba(0, 170, 255, 0.15); }
}
