* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Debug reset button */
.debug-reset {
  position: fixed;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.5);
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  z-index: 9999;
  transition: all 0.2s ease;
}

.debug-reset:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #004c54 0%, #0a0a0a 50%, #004c54 100%);
  min-height: 100vh;
  color: #fff;
}

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

.stage {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.hidden {
  display: none !important;
}

/* Landing Page */
.landing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.sad-eagle {
  font-size: 80px;
  filter: grayscale(50%);
  animation: sadBounce 2s ease-in-out infinite;
}

@keyframes sadBounce {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

.tears {
  font-size: 30px;
  margin-top: -30px;
  animation: tearDrop 1.5s ease-in-out infinite;
}

@keyframes tearDrop {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.5; transform: translateY(10px); }
}

h1 {
  font-size: 2rem;
  color: #a8a8a8;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
  color: #888;
  font-size: 1rem;
  font-style: italic;
}

.btn-primary {
  background: #a5acaf;
  color: #004c54;
  border: none;
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.btn-primary:hover {
  background: #fff;
  transform: scale(1.05);
}

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

/* Form Styles */
.form-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-container h2 {
  color: #a5acaf;
  margin-bottom: 5px;
}

.form-subtitle {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.input-group label {
  color: #a5acaf;
  font-size: 0.9rem;
  font-weight: 500;
}

.input-group input {
  padding: 12px 15px;
  border: 2px solid #333;
  border-radius: 8px;
  background: #1a1a1a;
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-color: #a5acaf;
}

.input-status {
  font-size: 0.85rem;
  min-height: 20px;
  transition: all 0.3s ease;
}

.input-status.error {
  color: #ff6b6b;
}

.input-status.success {
  color: #51cf66;
}

.input-group input.error {
  border-color: #ff6b6b;
  animation: shake 0.5s ease-in-out;
}

.input-group input.success {
  border-color: #51cf66;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* Captcha Styles */
.captcha-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.captcha-container h2 {
  color: #a5acaf;
}

.captcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0;
}

.captcha-cell {
  aspect-ratio: 1;
  background: #1a1a1a;
  border: 3px solid #333;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.captcha-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.captcha-cell:hover {
  border-color: #555;
}

.captcha-cell.selected {
  border-color: #51cf66;
}

.captcha-cell.selected::after {
  content: '✓';
  position: absolute;
  top: 5px;
  right: 5px;
  color: #51cf66;
  font-weight: bold;
  font-size: 1.2rem;
  text-shadow: 0 0 3px #000, 0 0 5px #000;
}

.captcha-fun-fact {
  background: #1a1a1a;
  border: 2px solid #004c54;
  border-radius: 8px;
  padding: 12px 15px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: #a5acaf;
  font-style: italic;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.captcha-fun-fact:empty {
  display: none;
}

.captcha-fun-fact.visible {
  opacity: 1;
}

.captcha-status {
  min-height: 24px;
  font-size: 0.9rem;
  color: #ff6b6b;
}

/* Pin Pad Styles */
.pin-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.pin-container h2 {
  color: #a5acaf;
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
}

.pin-digit {
  width: 50px;
  height: 60px;
  background: #1a1a1a;
  border: 2px solid #333;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: bold;
  color: #fff;
}

.pin-digit.filled {
  border-color: #a5acaf;
}

.pin-status {
  min-height: 24px;
  font-size: 0.85rem;
  color: #888;
  font-style: italic;
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 280px;
  margin: 0 auto;
}

.pin-key {
  aspect-ratio: 1;
  background: #1a1a1a;
  border: 2px solid #333;
  border-radius: 12px;
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-key:hover {
  background: #2a2a2a;
  border-color: #555;
}

.pin-key:active {
  transform: scale(0.95);
  background: #333;
}

.pin-key.shuffling {
  animation: pinShuffle 0.3s ease-out;
}

@keyframes pinShuffle {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.pin-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 10px;
}

.btn-secondary {
  background: transparent;
  color: #888;
  border: 2px solid #444;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  border-color: #666;
  color: #fff;
}

.pin-actions .btn-primary {
  margin-top: 0;
  padding: 12px 30px;
}

/* Figurine Hunt Styles */
.figurine-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.figurine-container h2 {
  color: #a5acaf;
}

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px 0;
}

.loader {
  width: 50px;
  height: 50px;
  border: 4px solid #333;
  border-top-color: #a5acaf;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  color: #888;
  font-size: 0.95rem;
  font-style: italic;
}

.riddle-box {
  background: #1a1a1a;
  border: 2px solid #333;
  border-radius: 12px;
  padding: 25px 20px;
  margin: 15px 0;
}

.riddle-text {
  color: #a5acaf;
  font-size: 1rem;
  line-height: 1.8;
  font-style: italic;
}

.figurine-container .input-group {
  margin: 10px 0;
}

.figurine-container .input-group input {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 1.2rem;
}

/* Lake Challenge Styles */
.lake-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lake-container h2 {
  color: #a5acaf;
}

.trivia-question {
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 20px 0;
  padding: 20px;
  background: #1a1a1a;
  border: 2px solid #333;
  border-radius: 12px;
}

.attempts-counter {
  color: #666;
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 10px;
}

.lake-trivia .input-group {
  margin: 15px 0;
}

.lake-trivia .input-group input {
  text-align: center;
  font-size: 1.2rem;
}

/* Lake Reveal */
.reveal-text {
  color: #888;
  font-size: 1rem;
  font-style: italic;
  margin-bottom: 20px;
}

.lake-image-container {
  margin: 20px 0;
}

.lake-image {
  width: 100%;
  max-width: 350px;
  border-radius: 12px;
  border: 3px solid #333;
}

.lake-caption {
  color: #a5acaf;
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 15px;
}

.lake-reveal .input-group {
  margin: 15px 0;
}

.lake-reveal .input-group input {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1.1rem;
}

/* RFID Hint Styles */
.rfid-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rfid-container h2 {
  color: #a5acaf;
}

.rfid-subtitle {
  color: #888;
  font-size: 1rem;
  font-style: italic;
}

.rfid-hint-box {
  background: #1a1a1a;
  border: 2px solid #333;
  border-radius: 12px;
  padding: 30px 20px;
  margin: 15px 0;
}

.rfid-hint {
  color: #888;
  font-size: 1rem;
  margin-bottom: 10px;
}

.rfid-hint-emphasis {
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 25px;
}

.rfid-animation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 25px 0;
  font-size: 2.5rem;
}

.card-icon {
  animation: cardPulse 2s ease-in-out infinite;
}

.tap-icon {
  animation: tapBlink 1s ease-in-out infinite;
  font-size: 1.5rem;
}

.box-icon {
  animation: boxShake 2s ease-in-out infinite;
}

@keyframes cardPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

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

@keyframes boxShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

.rfid-instruction {
  color: #a5acaf;
  font-size: 1.1rem;
  font-weight: bold;
  margin-top: 15px;
}

.rfid-container .input-group {
  margin: 10px 0;
}

.rfid-container .input-group input {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1rem;
}

/* Victory Styles */
.victory-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
  padding: 40px 20px;
}

.victory-title {
  font-size: 2.5rem;
  color: #51cf66;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: victoryPulse 1s ease-in-out infinite;
}

@keyframes victoryPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.victory-subtitle {
  color: #888;
  font-size: 1.2rem;
  font-style: italic;
}

.victory-message {
  color: #a5acaf;
  font-size: 1.1rem;
  font-weight: bold;
  background: #1a1a1a;
  padding: 20px 30px;
  border-radius: 12px;
  border: 2px solid #51cf66;
}

.gift-card-code {
  display: block;
  margin-top: 10px;
  font-family: 'Courier New', monospace;
  font-size: 1.4rem;
  color: #51cf66;
  letter-spacing: 2px;
  padding: 10px;
  background: #0a0a0a;
  border-radius: 6px;
  user-select: all;
}

.victory-roast {
  color: #666;
  font-size: 0.9rem;
  font-style: italic;
  margin-top: 10px;
}

.eagles-cry {
  font-size: 4rem;
  margin-top: 20px;
  animation: sadBounce 2s ease-in-out infinite;
}

/* Confetti */
.confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}
