* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #0b0612;
  color: #fff;
  min-height: 100vh;
  overflow: hidden;
}

#app {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen {
  width: 100%;
  min-height: 100vh;
  padding: 4vh 4vw;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
}

.hidden {
  display: none !important;
}

/* Pair screen */
#pair-screen {
  background: radial-gradient(ellipse at top, #3a1657 0%, #0b0612 60%);
}

.brand {
  text-align: center;
  max-width: 640px;
}

.brand-emoji {
  font-size: 64px;
}

.brand h1 {
  font-size: 56px;
  margin: 8px 0 12px;
  background: linear-gradient(90deg, #ff6b9d, #c06c84);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  letter-spacing: -1px;
}

.hint {
  font-size: 22px;
  color: #c9bed3;
  margin: 0;
  line-height: 1.4;
}

.qr-box {
  width: min(42vh, 420px);
  aspect-ratio: 1;
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 30px 60px rgba(255, 107, 157, 0.25);
}

.qr-box canvas {
  width: 100% !important;
  height: 100% !important;
}

.qr-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid #eee;
  border-top-color: #ff6b9d;
  animation: spin 0.9s linear infinite;
}

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

.url {
  font-size: 16px;
  color: #8a7a99;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  margin: 0;
  word-break: break-all;
  text-align: center;
}

.status {
  font-size: 20px;
  color: #ff6b9d;
  margin: 0;
  font-weight: 600;
}

/* Video screen */
#video-screen {
  padding: 0;
  background: #000;
}

#video {
  width: 100%;
  height: 100vh;
  object-fit: contain;
  background: #000;
}

.video-hud {
  position: fixed;
  top: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.video-hud h2 {
  margin: 0;
  font-size: 28px;
}

.video-hud span {
  font-size: 18px;
  color: #ddd;
}

/* Done + error cards */
.done-card,
.error-card {
  background: #1b0e2a;
  border: 1px solid rgba(255, 107, 157, 0.3);
  border-radius: 24px;
  padding: 48px;
  text-align: center;
  max-width: 560px;
}

.done-check {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3dd68c, #22a06b);
  color: #fff;
  font-size: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 20px 40px rgba(61, 214, 140, 0.3);
}

.done-card h2,
.error-card h2 {
  font-size: 36px;
  margin: 0 0 8px;
}

.done-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin: 32px 0;
}

.done-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.done-stats strong {
  font-size: 48px;
  color: #ff6b9d;
}

.done-stats span {
  color: #8a7a99;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, #ff6b9d, #c06c84);
  border: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  padding: 16px 40px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(255, 107, 157, 0.35);
}

.btn-primary:active {
  transform: scale(0.98);
}
