/* Meta Ray-Ban Display Stylesheet (600x600 Optical High-Contrast) */
:root {
  --display-size: 600px;
  --bg-color: #000000;
  --text-main: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.6);
  --accent-cyan: #38bdf8;
  --accent-green: #34d399;
  --accent-amber: #fbbf24;
  --accent-glow: rgba(56, 189, 248, 0.35);
  --swap-dist: 170px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: #000000;
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
}

/* 600x600 Glasses Virtual Display Canvas (Pure Black Zero-Chrome) */
.display-container {
  width: var(--display-size);
  height: var(--display-size);
  background-color: var(--bg-color);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Center Stage */
.stage-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.mirror-arena {
  position: relative;
  width: 400px;
  height: 260px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.digits-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 360px;
  height: 220px;
  position: relative;
}

.digit-slot {
  width: 140px;
  height: 200px;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slot-left {
  left: 20px;
}

.slot-right {
  right: 20px;
}

.digit {
  font-size: 165px;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  display: block;
  text-shadow: 
    0 0 20px rgba(56, 189, 248, 0.5),
    0 0 50px rgba(56, 189, 248, 0.25);
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
}

/* Keyframes: Left digit arcs upward over to the right */
@keyframes arcOverRight {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    z-index: 10;
  }
  35% {
    transform: translate3d(calc(var(--swap-dist) * 0.45), -95px, 0) scale(1.15);
    z-index: 10;
    text-shadow: 0 0 35px rgba(56, 189, 248, 0.9), 0 0 70px rgba(56, 189, 248, 0.5);
  }
  70% {
    transform: translate3d(calc(var(--swap-dist) * 0.85), -40px, 0) scale(1.06);
    z-index: 10;
  }
  100% {
    transform: translate3d(var(--swap-dist), 0, 0) scale(1);
    z-index: 10;
  }
}

/* Keyframes: Right digit slides horizontally underneath to the left */
@keyframes slideUnderLeft {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    z-index: 2;
    opacity: 1;
  }
  45% {
    transform: translate3d(calc(var(--swap-dist) * -0.5), 18px, 0) scale(0.92);
    z-index: 2;
    opacity: 0.88;
  }
  100% {
    transform: translate3d(calc(var(--swap-dist) * -1), 0, 0) scale(1);
    z-index: 2;
    opacity: 1;
  }
}

/* Animation trigger classes */
.digit.animating-arc-right {
  animation: arcOverRight 0.85s cubic-bezier(0.34, 1.25, 0.64, 1) forwards;
}

.digit.animating-slide-left {
  animation: slideUnderLeft 0.85s cubic-bezier(0.34, 1.25, 0.64, 1) forwards;
}

/* Gentle pulse when new random number is generated */
@keyframes numberPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.digit.pulse-in {
  animation: numberPulse 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hidden {
  display: none !important;
}

/* Custom Response Text Arena (600x600 Optical Waveguide Safe Zone) */
.text-arena {
  width: 520px;
  min-height: 260px;
  max-height: 360px;
  padding: 24px 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.response-text-display {
  font-weight: 800;
  color: #ffffff;
  line-height: 1.22;
  letter-spacing: 0.5px;
  word-break: break-word;
  text-shadow:
    0 0 18px rgba(56, 189, 248, 0.65),
    0 0 42px rgba(56, 189, 248, 0.3);
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
}

.response-text-display.size-short {
  font-size: 64px;
}

.response-text-display.size-medium {
  font-size: 46px;
}

.response-text-display.size-long {
  font-size: 34px;
}

@keyframes textPopIn {
  0% {
    transform: scale(0.82) translateY(10px);
    opacity: 0;
  }
  60% {
    transform: scale(1.04) translateY(-2px);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.response-text-display.pop-in {
  animation: textPopIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Unmute Overlay */
.unmute-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: opacity 0.3s ease;
}

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

.unmute-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 32px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.card-icon {
  font-size: 36px;
}

.card-msg {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}
