/* =======================================================
   PANTALLA DE ACCESO - Quiz de Verificación
   ======================================================= */

.access-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #F0F9FF 0%, #BAE6FD 50%, #7DD3FC 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  overflow-y: auto;
}

.access-container {
  max-width: 800px;
  width: 100%;
  animation: fadeInScale 0.6s ease;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.access-header {
  text-align: center;
  color: var(--river-deep);
  margin-bottom: 25px;
}

.access-icon {
  font-size: 5rem;
  margin-bottom: 10px;
  animation: bounce 2s ease-in-out infinite;
}

.access-header h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 10px;
  text-shadow: 0 4px 12px rgba(12,74,110,0.1);
  color: var(--river-deep);
}

.access-header p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
  color: var(--river-deep);
}

.access-quiz-board {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 20px 50px rgba(12,74,110,0.12);
  border: 4px solid var(--sky-2);
}

.access-hud {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.2rem;
}

.access-hud .hud-item {
  background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 100%);
  padding: 10px 20px;
  border-radius: 999px;
  border: 3px solid var(--sky-2);
  box-shadow: 0 4px 0 rgba(14,165,233,0.15);
  color: var(--river-deep);
  font-weight: 700;
}

.access-question-card {
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  border-radius: 20px;
  padding: 32px 24px;
  border: 3px solid var(--river);
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(14,165,233,0.08);
  position: relative;
  min-height: 220px;
}

.access-question-card::before {
  content: '?';
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 80px;
  font-weight: 700;
  color: rgba(14,165,233,0.08);
  font-family: 'Fredoka', sans-serif;
}

.access-question-text {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--river-deep);
  margin-bottom: 28px;
  text-align: center;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.access-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.access-option-btn {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 3px solid var(--sky-2);
  border-radius: 16px;
  padding: 18px 24px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all .3s ease;
  text-align: left;
  box-shadow: 0 4px 0 rgba(14,165,233,0.15);
  position: relative;
  overflow: hidden;
}

.access-option-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(14,165,233,0.15), transparent);
  transition: left .5s;
}

.access-option-btn:hover:not(:disabled)::before {
  left: 100%;
}

.access-option-btn:hover:not(:disabled) {
  transform: translateY(-4px);
  border-color: var(--river);
  box-shadow: 0 8px 0 rgba(14,165,233,0.2), 0 10px 20px rgba(14,165,233,0.1);
}

.access-option-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(14,165,233,0.15);
}

.access-option-btn.correct {
  background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
  border-color: #10B981;
  animation: correctPulse .6s ease;
  box-shadow: 0 4px 0 rgba(16,185,129,0.3), 0 8px 20px rgba(16,185,129,0.25);
}

.access-option-btn.correct::after {
  content: '✓';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: #059669;
  animation: checkmark .4s ease;
}

.access-option-btn.incorrect {
  background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
  border-color: #EF4444;
  animation: shake .4s ease;
  box-shadow: 0 4px 0 rgba(239,68,68,0.3);
}

.access-option-btn.incorrect::after {
  content: '✗';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: #DC2626;
  animation: xmark .4s ease;
}

.access-option-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

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

@keyframes checkmark {
  0% { transform: translateY(-50%) scale(0); }
  50% { transform: translateY(-50%) scale(1.3); }
  100% { transform: translateY(-50%) scale(1); }
}

@keyframes xmark {
  0% { transform: translateY(-50%) scale(0) rotate(0deg); }
  50% { transform: translateY(-50%) scale(1.3) rotate(180deg); }
  100% { transform: translateY(-50%) scale(1) rotate(180deg); }
}

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

.access-feedback {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  min-height: 2em;
  margin-top: 16px;
  transition: all .3s;
  padding: 10px 20px;
  border-radius: 12px;
}

.access-feedback.correct {
  color: #059669;
  background: rgba(209,250,229,0.6);
}

.access-feedback.incorrect {
  color: #DC2626;
  background: rgba(254,226,226,0.6);
}

/* Resultado del acceso */
.access-result {
  position: fixed;
  inset: 0;
  background: rgba(12,74,110,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
  animation: fadeIn .3s ease;
  backdrop-filter: blur(8px);
}

.access-result[hidden] {
  display: none;
}

.access-result-card {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 50px 40px;
  text-align: center;
  max-width: 520px;
  box-shadow: 0 25px 60px rgba(12,74,110,0.25);
  border: 4px solid var(--sky-2);
  animation: popIn .6s cubic-bezier(.34,1.56,.64,1);
}

.access-result-emoji {
  font-size: 6rem;
  margin-bottom: 15px;
}

.access-result-emoji.success {
  animation: bounce 1s infinite;
}

.access-result-emoji.denied {
  animation: shake 0.5s ease;
}

.access-result-card h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.2rem;
  color: var(--river-deep);
  margin-bottom: 20px;
}

.access-result-card p {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: #334155;
}

.access-result-card p strong {
  color: var(--river-deep);
  font-size: 1.5rem;
}

.access-result-text {
  font-size: 1.2rem;
  color: var(--river-deep);
  font-style: italic;
  margin-top: 20px;
  padding: 16px 24px;
  background: rgba(14,165,233,0.08);
  border-radius: 12px;
  border: 2px dashed var(--river);
  font-weight: 600;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from {
    transform: scale(.5) rotate(-10deg);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* Responsive */
@media (max-width: 600px) {
  .access-quiz-board {
    padding: 24px 20px;
  }
  
  .access-question-card {
    padding: 24px 18px;
    min-height: 260px;
  }
  
  .access-option-btn {
    padding: 14px 18px;
    font-size: 1rem;
  }
  
  .access-result-card {
    padding: 40px 28px;
  }
}
