:root {
  --primary-color: #1a73e8;
  --primary-hover: #1557b0;
  --dark-gray: #202124;
  --light-gray: #f1f3f4;
  --font-family: 'Outfit', sans-serif;
}

body {
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #000;
  width: 100vw;
  height: 100vh;
}

/* MindAR canvas styles */
#ar-container {
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Floating Actions HUD */
.hud-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  pointer-events: none; /* Let clicks pass through to Three.js/MindAR unless clicked on controls */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: auto;
}

.hud-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  pointer-events: auto;
  margin-bottom: 20px;
}

/* Scanner target reticle overlay */
.scanner-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 260px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 24px;
  pointer-events: none;
  z-index: 5;
}

.scanner-overlay::before,
.scanner-overlay::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: #ffffff;
  border-style: solid;
}

.scanner-overlay::before {
  top: -2px;
  left: -2px;
  border-width: 4px 0 0 4px;
  border-top-left-radius: 24px;
}

.scanner-overlay::after {
  bottom: -2px;
  right: -2px;
  border-width: 0 4px 4px 0;
  border-bottom-right-radius: 24px;
}

/* Button & Card Styling */
.btn-hud {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}

.btn-hud:hover {
  transform: scale(1.05);
}

/* Loading Overlay Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--dark-gray);
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Quiz Overlay Container */
#quiz-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(32, 33, 36, 0.95);
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  
  /* Slide/Fade Transitions utilizing modern spec */
  opacity: 0;
  visibility: hidden;
  transition-property: opacity, visibility;
  transition-duration: 0.4s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Opened state */
#quiz-screen.active {
  opacity: 1;
  visibility: visible;
}

#quiz-card {
  max-width: 500px;
  width: 100%;
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  border: none;
  background-color: #ffffff;
  overflow: hidden;
  transform: translateY(40px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#quiz-screen.active #quiz-card {
  transform: translateY(0);
}

@starting-style {
  #quiz-screen.active {
    opacity: 0;
  }
  #quiz-screen.active #quiz-card {
    transform: translateY(40px);
  }
}

.quiz-option-btn {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid #dadce0;
  background-color: #ffffff;
  color: #3c4043;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.quiz-option-btn:hover {
  background-color: var(--light-gray);
  border-color: #bdc1c6;
}

.quiz-option-btn.correct {
  background-color: #e6f4ea;
  border-color: #137333;
  color: #137333;
}

.quiz-option-btn.incorrect {
  background-color: #fce8e6;
  border-color: #c5221f;
  color: #c5221f;
}

/* Animation Mixer progress indicator */
.progress-bar-hud {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill-hud {
  height: 100%;
  width: 0%;
  background: var(--primary-color);
  transition: width 0.1s linear;
}
