/* 
 * تحدي الصحة 🧠❤️ - Styles & Custom 3D Flip Effects
 */

:root {
  --font-main: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  font-family: var(--font-main);
  -webkit-tap-highlight-color: transparent;
}

/* Floating animated background bubbles */
.bubble {
  position: absolute;
  border-radius: 9999px;
  filter: blur(40px);
  z-index: 0;
}
.bubble-1 {
  width: 320px;
  height: 320px;
  background: rgba(56, 189, 248, 0.25);
  top: -60px;
  right: -60px;
  animation: floatSlow 12s ease-in-out infinite alternate;
}
.bubble-2 {
  width: 280px;
  height: 280px;
  background: rgba(52, 211, 153, 0.22);
  bottom: 5%;
  left: -50px;
  animation: floatSlow 15s ease-in-out infinite alternate-reverse;
}
.bubble-3 {
  width: 220px;
  height: 220px;
  background: rgba(244, 114, 182, 0.18);
  top: 40%;
  right: 15%;
  animation: floatSlow 18s ease-in-out infinite alternate;
}
.bubble-4 {
  width: 260px;
  height: 260px;
  background: rgba(251, 191, 36, 0.15);
  bottom: -40px;
  right: 30%;
  animation: floatSlow 14s ease-in-out infinite alternate;
}

@keyframes floatSlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 40px) scale(1.1); }
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.animate-float {
  animation: float 3.5s ease-in-out infinite;
}

@keyframes bounceSlow {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.03); }
}
.animate-bounce-slow {
  animation: bounceSlow 2.5s ease-in-out infinite;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
.animate-fadeIn {
  animation: fadeIn 0.3s ease-out forwards;
}

/* Round length selector buttons */
.round-size-btn {
  background-color: #ffffff;
  color: #475569;
  border-color: #cbd5e1;
}
.round-size-btn.active {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

/* Multiple Choice Option Buttons */
.choice-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  border: 2px solid #e2e8f0;
  background-color: #ffffff;
  color: #1e293b;
  font-size: 0.875rem;
  font-weight: 700;
  text-align: right;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  user-select: none;
}

@media (min-width: 640px) {
  .choice-btn {
    font-size: 0.95rem;
    padding: 0.85rem 1.1rem;
  }
}

.choice-btn:hover:not(:disabled) {
  border-color: #38bdf8;
  background-color: #f0f9ff;
  transform: translateY(-1px);
}

.choice-btn:active:not(:disabled) {
  transform: scale(0.98);
}

/* Choice Letter Badge (أ، ب، ج، د) */
.choice-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  background-color: #f1f5f9;
  color: #475569;
  font-weight: 900;
  font-size: 0.875rem;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

/* Answer Selected States */
.choice-btn.correct {
  border-color: #10b981 !important;
  background-color: #ecfdf5 !important;
  color: #064e3b !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25) !important;
  animation: correctPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.choice-btn.correct .choice-letter {
  background-color: #10b981;
  color: #ffffff;
}

.choice-btn.incorrect {
  border-color: #f43f5e !important;
  background-color: #fff1f2 !important;
  color: #881337 !important;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.2) !important;
  animation: wrongShake 0.4s ease-in-out;
}

.choice-btn.incorrect .choice-letter {
  background-color: #f43f5e;
  color: #ffffff;
}

.choice-btn:disabled {
  cursor: default;
}

@keyframes correctPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

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