/* Main styles for Quiz Generator web app */

/* ===== Base Styles ===== */
body {
  color: #334155;
  line-height: 1.6;
}

/* ===== Custom Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.slide-up {
  animation: slideUp 0.5s ease forwards;
}

/* ===== Card Design ===== */
.app-card {
  background-color: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(226, 232, 240, 0.8);
  overflow: hidden;
}

.app-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

/* Section dividers */
.section-divider {
  border-top: 1px solid #e2e8f0;
  margin: 2rem 0;
}

/* Content sections */
.content-section {
  margin-bottom: 2rem;
  animation: fadeIn 0.5s ease;
}

/* ===== Form Controls ===== */
.form-input {
  border-color: #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.form-input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
  transform: translateY(-1px);
}

/* ===== Button Styles ===== */
.btn-primary {
  background: linear-gradient(to right, #0ea5e9, #6366f1);
  color: white;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.2);
  background-size: 200% auto;
}

.btn-primary:hover {
  box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.3);
  background-position: right center;
  transform: translateY(-2px);
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.4);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background-color: #f8fafc;
  color: #334155;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
  background-color: #f1f5f9;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.btn-secondary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(226, 232, 240, 0.5);
}

.btn-secondary:active {
  transform: translateY(1px);
}

/* ===== Question Preview Styling ===== */
.question-card {
  padding: 1.25rem;
  border-radius: 0.5rem;
  background-color: #ffffff;
  margin-bottom: 1rem;
  border-left: 4px solid #0ea5e9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease-in-out;
}

.question-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.correct-answer {
  color: #10b981;
  font-weight: 500;
}

/* ===== Alerts ===== */
.alert {
  animation: fadeIn 0.4s ease-out;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-error {
  background-color: #fef2f2;
  border-left-color: #ef4444;
  color: #b91c1c;
}

.alert-success {
  background-color: #f0fdf4;
  border-left-color: #10b981;
  color: #047857;
}

.alert-warning {
  background-color: #fffbeb;
  border-left-color: #f59e0b;
  color: #b45309;
}

/* ===== Code and Pre ===== */
pre.code-block {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ===== Custom Form Controls ===== */
.checkbox-custom, .radio-custom {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
}

.checkbox-custom input[type="checkbox"], 
.radio-custom input[type="radio"] {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  background-color: #fff;
  border: 2px solid #cbd5e1;
  border-radius: 0.25rem;
  margin-right: 0.75rem;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-custom input[type="radio"] {
  border-radius: 50%;
}

.checkbox-custom input[type="checkbox"]:checked, 
.radio-custom input[type="radio"]:checked {
  background-color: #0ea5e9;
  border-color: #0ea5e9;
}

.checkbox-custom input[type="checkbox"]:checked::after {
  content: "✓";
  color: white;
  font-size: 0.875rem;
  position: absolute;
  top: -0.125rem;
  left: 0.125rem;
}

.radio-custom input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: white;
}
