/* Nerd Preview CSS - Mobile-first design */

.ability-preview-container {
  margin: 20px 0;
  padding: 15px;
  background: linear-gradient(135deg, #1a1f3a 0%, #0d1225 100%);
  border-radius: 12px;
  border: 2px solid rgba(0, 226, 255, 0.3);
  box-shadow: 
    0 0 20px rgba(0, 226, 255, 0.2),
    inset 0 0 15px rgba(0, 0, 0, 0.4);
}

.ability-preview-title {
  text-align: center;
  color: #00e2ff;
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 226, 255, 0.5);
}

.ability-preview-boards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.preview-board-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.preview-board-label {
  color: #a6f9ff;
  font-size: 0.8em;
  font-weight: 500;
  text-align: center;
  opacity: 0.9;
}

.ability-arrow {
  color: #FFD700;
  font-size: 1.5em;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  animation: bounceArrow 2s ease-in-out infinite;
}

@keyframes bounceArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* PREVIEW BOARD */
.preview-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 2px;
  background: linear-gradient(135deg, #151a32 30%, #1b2d56 100%);
  padding: 8px;
  border-radius: 8px;
  border: 2px solid rgba(255, 215, 0, 0.4);
  box-shadow: 
    0 0 15px rgba(255, 215, 0, 0.3),
    0 0 10px rgba(0, 0, 0, 0.6);
}

.preview-cell {
  width: 32px;
  height: 32px;
  background: linear-gradient(145deg, #1e2744 70%, #253555 100%);
  border: 1px solid rgba(58, 68, 134, 0.4);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 0.8em;
  font-weight: 700;
  font-family: 'Audiowide', 'Orbitron', sans-serif;
  color: #fff;
  box-shadow: 
    0 0 3px rgba(255, 215, 0, 0.2),
    0 0 2px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

/* Character token styling */
.preview-token.nerd {
  background: radial-gradient(circle at 30% 30%, #FFFACD 10%, #FFD700 60%);
  color: #000000;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  box-shadow: 
    0 0 8px #FFD700,
    0 0 16px #FFD70088;
  border: 1.5px solid #B8860B;
  font-weight: 900;
  text-shadow: 0 0 8px #FFD700, 0 0 4px #000;
  position: absolute;
  z-index: 10;
}

/* SVG decoration for nerd in preview */
.preview-token.nerd::before {
  content: '';
  position: absolute;
  width: 36px;
  height: 36px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-image: url('../../svg/nerd-decoration.svg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: -1;
}

/* Value change indicators */
.preview-token.nerd.value-changed {
  animation: nerdValueChange 2s ease-in-out infinite;
}

@keyframes nerdValueChange {
  0%, 100% {
    box-shadow: 
      0 0 8px #FFD700,
      0 0 16px #FFD70088;
  }
  50% {
    box-shadow: 
      0 0 12px #FFFF99,
      0 0 24px #FFFF9988,
      0 0 36px #FFFF9944;
    transform: scale(1.1);
  }
}

/* MATH QUIZ ELEMENTS */

/* Quiz showcase display area */
.quiz-showcase {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  min-height: 80px;
  padding: 15px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
}

.quiz-question {
  font-size: 1.2em;
  font-weight: bold;
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  text-align: center;
  margin-bottom: 8px;
}

.quiz-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.quiz-option {
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(255, 215, 0, 0.1) 100%);
  color: #FFD700;
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 40px;
  text-align: center;
}

.quiz-option.correct {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.4) 100%);
  border-color: #22C55E;
  color: #22C55E;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.quiz-option.incorrect {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.4) 100%);
  border-color: #EF4444;
  color: #EF4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

/* Timer bar */
.quiz-timer-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 215, 0, 0.2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  margin: 8px 0;
}

.quiz-timer-bar {
  height: 100%;
  background: linear-gradient(90deg, #FFD700 0%, #FFC107 50%, #FFEB3B 100%);
  width: 66%; /* Shows partial time remaining */
  transition: width 3s linear;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
  animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Score display */
.quiz-score-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  margin: 8px 0;
  font-size: 0.9em;
  font-weight: bold;
}

.current-score {
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.max-score {
  color: #FFFF99;
  opacity: 0.8;
}

/* Outcome indicators */
.quiz-outcome {
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  font-weight: bold;
  font-size: 0.8em;
  margin: 5px 0;
  animation: outcomeGlow 2s ease-in-out infinite;
}

.quiz-outcome.perfect {
  background: rgba(34, 197, 94, 0.2);
  border: 2px solid #22C55E;
  color: #22C55E;
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.quiz-outcome.good {
  background: rgba(59, 130, 246, 0.2);
  border: 2px solid #3B82F6;
  color: #3B82F6;
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.quiz-outcome.poor {
  background: rgba(239, 68, 68, 0.2);
  border: 2px solid #EF4444;
  color: #EF4444;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

@keyframes outcomeGlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Mathematical symbols floating effect */
.math-symbols {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  animation: floatingSymbols 3s ease-in-out infinite;
  pointer-events: none;
}

.math-symbol {
  font-size: 1.1em;
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  animation: symbolFloat 2s ease-in-out infinite;
}

.math-symbol:nth-child(1) { animation-delay: 0s; }
.math-symbol:nth-child(2) { animation-delay: 0.4s; }
.math-symbol:nth-child(3) { animation-delay: 0.8s; }

@keyframes floatingSymbols {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes symbolFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(5deg); }
}

/* Health change visualization */
.health-change {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
}

.health-arrow {
  font-size: 1.2em;
  font-weight: bold;
}

.health-arrow.positive {
  color: #22C55E;
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.health-arrow.negative {
  color: #EF4444;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.health-value {
  font-weight: bold;
  font-size: 1.1em;
}

/* Quiz scenarios display */
.quiz-scenarios {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

.quiz-scenario {
  padding: 6px;
  border-radius: 4px;
  text-align: center;
  font-size: 0.7em;
  font-weight: bold;
  border: 1px solid;
}

.quiz-scenario.perfect-scenario {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22C55E;
  color: #22C55E;
}

.quiz-scenario.good-scenario {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3B82F6;
  color: #3B82F6;
}

.quiz-scenario.poor-scenario {
  background: rgba(239, 68, 68, 0.1);
  border-color: #EF4444;
  color: #EF4444;
}

/* Knowledge gain visualization */
.knowledge-boost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 6px;
  margin: 8px 0;
}

.knowledge-icon {
  font-size: 1.2em;
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  animation: knowledgeGlow 2s ease-in-out infinite;
}

@keyframes knowledgeGlow {
  0%, 100% { 
    transform: scale(1);
    color: #FFD700;
  }
  50% { 
    transform: scale(1.1);
    color: #FFFF99;
  }
}

.knowledge-text {
  font-size: 0.9em;
  color: #FFD700;
  font-weight: bold;
}

/* RESPONSIVE DESIGN */
@media (max-width: 480px) {
  .preview-cell {
    width: 28px;
    height: 28px;
    font-size: 0.7em;
  }
  
  .preview-token.nerd {
    width: 22px;
    height: 22px;
    font-size: 0.7em;
  }
  
  .quiz-question {
    font-size: 1em;
  }
  
  .quiz-option {
    padding: 4px 8px;
    font-size: 0.8em;
    min-width: 35px;
  }
  
  .quiz-showcase {
    gap: 8px;
    min-height: 70px;
    padding: 12px;
  }
  
  .preview-board {
    padding: 6px;
    gap: 1.5px;
  }
}

@media (max-width: 360px) {
  .preview-cell {
    width: 24px;
    height: 24px;
    font-size: 0.65em;
  }
  
  .preview-token.nerd {
    width: 20px;
    height: 20px;
    font-size: 0.6em;
  }
  
  .quiz-question {
    font-size: 0.9em;
  }
  
  .quiz-option {
    padding: 3px 6px;
    font-size: 0.7em;
    min-width: 30px;
  }
  
  .preview-board {
    padding: 5px;
    gap: 1px;
  }
  
  .ability-preview-container {
    padding: 12px;
  }
  
  .quiz-scenarios {
    grid-template-columns: 1fr;
    gap: 4px;
  }
} 