/* Math Quiz Plugin Styles */
.math-quiz-container {
  font-family: 'Noto Sans Sinhala', 'Iskoola Pota', sans-serif;
  max-width: 100%;
  margin: 30px 0;
  padding: 0;
}

.quiz-box {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  color: white;
  text-align: center;
}

.quiz-title {
  font-size: 1.4em;
  margin: 0 0 20px 0;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
  line-height: 1.4;
}

.quiz-question {
  background: rgba(255,255,255,0.2);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 1.8em;
  font-weight: bold;
}

.math-problem {
  display: inline-block;
  letter-spacing: 2px;
}

.quiz-input-area {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 15px;
  align-items: center;
}

.answer-input {
  padding: 12px 15px;
  border: none;
  border-radius: 6px;
  font-size: 1.1em;
  width: 150px;
  text-align: center;
  font-family: inherit;
}

.submit-btn {
  padding: 12px 20px;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  background: #ff5252;
  box-shadow: 0 4px 12px rgba(255,107,107,0.4);
}

.btn-icon {
  font-size: 1.2em;
  transition: transform 0.2s;
}

.submit-btn:hover .btn-icon {
  transform: translateX(3px);
}

.error-message {
  background: rgba(255,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.5);
  padding: 12px;
  border-radius: 6px;
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: shake 0.5s;
}

.error-icon {
  font-size: 1.2em;
}

.error-text {
  font-size: 0.95em;
}

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

.loading-spinner {
  text-align: center;
  padding: 20px;
}

.spinner {
  border: 4px solid rgba(255,255,255,0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

.result-message {
  background: rgba(255,255,255,0.25);
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  animation: fadeIn 0.5s;
}

.success-text {
  margin: 5px 0;
  font-size: 1em;
  line-height: 1.4;
}

.winner-code-section {
  margin-top: 20px;
  padding: 20px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  animation: slideUp 0.5s;
}

.code-display {
  background: #fff;
  color: #333;
  padding: 20px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 2.2em;
  font-weight: bold;
  letter-spacing: 4px;
  font-family: 'Courier New', monospace;
  text-align: center;
}

.winner-code {
  display: inline-block;
  padding: 5px 10px;
}

.copy-btn {
  padding: 12px 25px;
  background: #4ecdc4;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  font-family: inherit;
  transition: background 0.3s;
  font-weight: bold;
}

.copy-btn:hover {
  background: #45b7b8;
}

.copy-feedback {
  display: none;
  margin-left: 10px;
  color: #4ecdc4;
  font-weight: bold;
}

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

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .quiz-box {
    padding: 20px;
  }
  
  .quiz-title {
    font-size: 1.2em;
  }
  
  .quiz-question {
    font-size: 1.5em;
  }
  
  .answer-input {
    width: 120px;
  }
  
  .submit-btn {
    padding: 10px 15px;
  }
}
