/* === GUESS THE MEMORY – FULLY RESPONSIVE BABY PINK THEME === */
.quiz-body {
  margin: 0; padding: 0; font-family: 'Dancing Script', cursive;
  background: linear-gradient(135deg, #ffeef8, #fff5f9);
  color: #d81b60;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;
}

/* === ROOT FONT SCALING === */
html {
  font-size: 16px;
}

/* === FLOATING HEARTS BACKGROUND === */
.quiz-body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: 
    radial-gradient(circle at 15% 70%, rgba(255,182,215,0.4) 8%, transparent 9%),
    radial-gradient(circle at 75% 25%, rgba(255,220,230,0.3) 10%, transparent 11%),
    radial-gradient(circle at 40% 50%, rgba(255,105,180,0.25) 7%, transparent 8%),
    radial-gradient(circle at 60% 80%, rgba(255,182,193,0.35) 9%, transparent 10%);
  background-size: 300px 300px;
  animation: floatHearts 25s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes floatHearts {
  0% { background-position: 0 0, 100px 200px, 300px 100px, 200px 300px; }
  100% { background-position: 100px 100px, 0 300px, 200px 400px, 300px 200px; }
}

/* === QUIZ CONTAINER === */
.quiz-container {
  text-align: center;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* === TITLE & SUBTITLE === */
.quiz-title {
  font-size: clamp(2.5rem, 8vw, 4.2rem);
  background: linear-gradient(45deg, #ff4081, #ff79b0, #ffd1dc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 0.5rem;
  text-shadow: 0 4px 15px rgba(255,64,129,0.2);
  animation: floatTitle 3s ease-in-out infinite;
}

.quiz-subtitle {
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  color: #ec407a;
  margin-bottom: 1.5rem;
  font-style: italic;
  animation: pulse 2s ease-in-out infinite;
}

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

@keyframes pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* === QUIZ CARD === */
.quiz-card {
  background: rgba(255,255,255,0.95);
  border-radius: 32px;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  width: 100%;
  max-width: 520px;
  margin: 1.5rem auto;
  border: 4px solid #ffd1dc;
  box-shadow: 
    0 15px 40px rgba(236,64,122,0.15),
    0 0 30px rgba(255,105,180,0.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.quiz-card::before {
  content: '♥ Meenal ♥';
  position: absolute;
  top: 12px; right: 16px;
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: #ff79b0;
  animation: heartBeat 1.5s ease-in-out infinite;
}

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

.quiz-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 
    0 20px 50px rgba(236,64,122,0.2),
    0 0 40px rgba(255,105,180,0.15);
}

/* === QUESTION TEXT === */
.question-number {
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  color: #ff4081;
  margin-bottom: 0.8rem;
  font-weight: bold;
  text-shadow: 0 2px 5px rgba(255,64,129,0.1);
}

.question {
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: #ec407a;
  margin: 0 0 1.2rem;
  line-height: 1.5;
  font-weight: 700;
}

/* === INPUT FIELD === */
.answer-input {
  width: 100%;
  height: clamp(54px, 14vw, 68px);
  padding: 0 1.2rem;
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  border: 3px solid #ffd1dc;
  border-radius: 20px;
  font-family: 'Dancing Script', cursive;
  text-align: center;
  margin: 1rem auto 0;
  outline: none;
  background: rgba(255,255,255,0.9);
  transition: all 0.4s ease;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
  display: block;
  line-height: normal;
  box-sizing: border-box;
}

.answer-input::placeholder {
  color: #ec407a;
  font-style: italic;
  opacity: 0.8;
  font-size: inherit;
}

.answer-input:focus {
  border-color: #ff4081;
  box-shadow: 
    0 0 25px rgba(255,64,129,0.4),
    inset 0 2px 10px rgba(0,0,0,0.1);
  background: white;
  transform: scale(1.02);
}

/* === SUBMIT BUTTON === */
.golden-btn {
  background: linear-gradient(45deg, #ff79b0, #ff4081, #ec407a);
  color: white;
  border: none;
  padding: clamp(0.7rem, 3vw, 1rem) clamp(2rem, 6vw, 3rem);
  font-size: clamp(1.2rem, 4.5vw, 1.6rem);
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 
    0 8px 20px rgba(236,64,122,0.3),
    0 0 20px rgba(255,64,129,0.2);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  position: relative;
  overflow: hidden;
  margin: 1.5rem auto 0;
  display: block;
  min-width: 160px;
}

.golden-btn::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.golden-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 
    0 15px 30px rgba(236,64,122,0.4),
    0 0 30px rgba(255,64,129,0.3);
}

.golden-btn:active::before {
  width: 300px; height: 300px;
}

/* === FEEDBACK === */
.feedback {
  margin-top: 1rem;
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  min-height: 1.8rem;
  font-weight: bold;
  text-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.feedback.correct {
  color: #ff4081;
  animation: bounce 0.6s ease;
}

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

/* === PROGRESS BAR === */
.progress-container {
  width: 90%;
  max-width: 520px;
  margin: 1.5rem auto;
}

.progress-bar {
  height: clamp(10px, 3vw, 16px);
  background: rgba(255,182,215,0.3);
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #ffd1dc;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff79b0, #ff4081, #ec407a);
  border-radius: 8px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* === CONFETTI CANVAS === */
#confetti-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none;
  z-index: 100;
  display: block;
}

/* === MOBILE OPTIMIZATIONS === */
@media (max-width: 480px) {
  .quiz-body { padding: 0.5rem; }
  .quiz-card { margin: 1rem auto; padding: 1.2rem; }
  .answer-input { height: 56px; }
  .golden-btn { padding: 0.7rem 1.8rem; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .quiz-container { max-width: 700px; }
  .quiz-card { max-width: 600px; }
}

/* === LANDSCAPE MOBILE === */
@media (max-height: 500px) and (orientation: landscape) {
  .quiz-title { font-size: 2.5rem; }
  .question { font-size: 1.4rem; }
  .answer-input { height: 50px; }
  .golden-btn { padding: 0.6rem 2rem; font-size: 1.3rem; }
}

/* === BACK BUTTON POSITION === */
.back-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  padding: 12px 28px;
  font-size: 1.1rem;
  animation: pulseGlow 2.5s ease-in-out infinite;
}

/* Reuse golden-btn from previous */
.golden-btn {
  position: relative;
  padding: 14px 36px;
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  background: linear-gradient(45deg, #ffd700, #ffb800, #ff9900, #cc7a00);
  background-size: 300% 300%;
  border: none;
  border-radius: 50px;
  box-shadow: 
    0 8px 20px rgba(255, 215, 0, 0.4),
    0 0 0 4px rgba(255, 215, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s ease;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
  z-index: 1;
}

.golden-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-25deg);
  z-index: -1;
}

.golden-btn:hover::before {
  left: 100%;
  transition: left 0.7s ease;
}

.golden-btn:hover {
  background-position: 100% 0;
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(255, 215, 0, 0.5), 0 0 0 6px rgba(255, 215, 0, 0.3);
}

.golden-btn:active {
  transform: translateY(-1px);
}

@keyframes pulseGlow {
  0%, 100% { 
    box-shadow: 
      0 8px 20px rgba(255, 215, 0, 0.4),
      0 0 0 4px rgba(255, 215, 0, 0.2),
      inset 0 2px 4px rgba(255, 255, 255, 0.3);
  }
  50% { 
    box-shadow: 
      0 12px 30px rgba(255, 215, 0, 0.6),
      0 0 0 8px rgba(255, 215, 0, 0.4),
      inset 0 2px 4px rgba(255, 255, 255, 0.5);
  }
}

/* Mobile Adjustment */
@media (max-width: 480px) {
  .back-btn {
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 1rem;
  }
}
/* LOADING SPINNER */
.spinner-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 182, 193, 0.95);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
  color: white;
  font-family: 'Dancing Script', cursive;
  font-size: 1.5rem;
  text-align: center;
}

.spinner {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
}

.heart-spin {
  font-size: 2rem;
  animation: spin 1.2s linear infinite;
}

.heart-spin:nth-child(2) { animation-delay: 0.1s; }
.heart-spin:nth-child(3) { animation-delay: 0.2s; }
.heart-spin:nth-child(4) { animation-delay: 0.3s; }
.heart-spin:nth-child(5) { animation-delay: 0.4s; }
.heart-spin:nth-child(6) { animation-delay: 0.5s; }

@keyframes spin {
  0% { transform: rotate(0deg) scale(1); opacity: 0.6; }
  50% { transform: rotate(180deg) scale(1.3); opacity: 1; }
  100% { transform: rotate(360deg) scale(1); opacity: 0.6; }
}

/* Button spinner */
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}