
/* ═══════════════════════════════════════════════════════════════
   PREMIUM QUIZ RESULT PAGE - LearnFrisian
   ═══════════════════════════════════════════════════════════════ */

/* ── Confetti canvas overlay ──────────────────────────────────── */
#lf-confetti-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 99999;
}

/* ── Results container premium restyle ────────────────────────── */
.wpProQuiz_content .wpProQuiz_results {
  background: linear-gradient(145deg, #0a1628 0%, #1a1a2e 40%, #16213e 100%) !important;
  border-radius: 28px !important;
  padding: 48px 40px 40px !important;
  margin: 30px auto !important;
  max-width: 580px !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 20px 60px rgba(0,0,0,0.5),
    0 0 80px rgba(0,178,212,0.08),
    inset 0 1px 0 rgba(255,255,255,0.05) !important;
  position: relative;
  overflow: visible !important;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  animation: lf-resultSlideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.wpProQuiz_content .wpProQuiz_results::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: 29px;
  background: linear-gradient(135deg, rgba(0,178,212,0.3), rgba(255,165,0,0.2), rgba(0,178,212,0.1));
  z-index: -1;
  opacity: 0;
  animation: lf-borderGlow 2s ease-in-out 0.5s forwards;
}

/* ── Trophy icon injection ────────────────────────────────────── */
.wpProQuiz_content.ld-quiz-result-passed .wpProQuiz_results::after {
  content: '';
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%);
  width: 76px;
  height: 76px;
  background: linear-gradient(135deg, #FFB800, #FF8C00);
  border-radius: 50%;
  box-shadow:
    0 4px 20px rgba(255,140,0,0.4),
    0 0 40px rgba(255,165,0,0.15),
    inset 0 -2px 6px rgba(0,0,0,0.15);
  z-index: 10;
  animation: lf-trophyPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

/* ── Trophy SVG via background ────────────────────────────────── */
.wpProQuiz_content.ld-quiz-result-passed .wpProQuiz_results::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C13.1 2 14 2.9 14 4V4.29C16.89 5.15 19 7.82 19 11V15L21 17V18H3V17L5 15V11C5 7.82 7.11 5.15 10 4.29V4C10 2.9 10.9 2 12 2ZM7.5 3L5 6.5L7 7L8.5 4L7.5 3ZM16.5 3L15.5 4L17 7L19 6.5L16.5 3Z'/%3E%3C/svg%3E");
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='white' d='M32 8l6 14h15l-12 9 5 15-14-10-14 10 5-15-12-9h15z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 38px 38px;
}

/* ── "Well done!" text premium styling ────────────────────────── */
.wpProQuiz_results .endgreentext {
  color: transparent !important;
  background: linear-gradient(135deg, #00E5A0, #00B8D4, #FFB800) !important;
  background-size: 200% auto !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  font-size: 42px !important;
  font-weight: 900 !important;
  letter-spacing: -0.5px !important;
  margin: 20px 0 8px !important;
  opacity: 0;
  animation: lf-textFadeUp 0.7s ease-out 0.6s forwards,
             lf-gradientShift 4s ease-in-out infinite 1.3s !important;
}

/* ── "Try again" text styling ─────────────────────────────────── */
.wpProQuiz_results .endredtext {
  color: transparent !important;
  background: linear-gradient(135deg, #FF6B6B, #FF8E53) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  font-size: 38px !important;
  font-weight: 800 !important;
  margin: 20px 0 8px !important;
  opacity: 0;
  animation: lf-textFadeUp 0.7s ease-out 0.6s forwards !important;
}

/* ── Subtitle / score area ────────────────────────────────────── */
.wpProQuiz_results .wpProQuiz_resultsList {
  padding: 0 !important;
  margin: 0 0 12px !important;
}

.wpProQuiz_results .wpProQuiz_resultsList li {
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

/* ── Divider line ─────────────────────────────────────────────── */
.wpProQuiz_results .wpProQuiz_resultsList::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,178,212,0.3), rgba(255,165,0,0.3), transparent);
  margin: 16px 0 24px;
  opacity: 0;
  animation: lf-dividerFade 0.8s ease 0.9s forwards;
}

/* ── Action buttons container ─────────────────────────────────── */
.wpProQuiz_results .ld-quiz-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: center !important;
  align-items: center !important;
  margin-top: 8px !important;
  opacity: 0;
  animation: lf-buttonsSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
}

/* ── Premium button styles ────────────────────────────────────── */
.wpProQuiz_results .wpProQuiz_button {
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: #fff !important;
  border-radius: 16px !important;
  padding: 14px 28px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0.8px !important;
  text-transform: none !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  backdrop-filter: blur(10px) !important;
  position: relative;
  overflow: hidden;
}

.wpProQuiz_results .wpProQuiz_button::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0,178,212,0.15), rgba(255,165,0,0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.wpProQuiz_results .wpProQuiz_button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 30px rgba(0,178,212,0.25) !important;
  border-color: rgba(0,178,212,0.4) !important;
}

.wpProQuiz_results .wpProQuiz_button:hover::before {
  opacity: 1;
}

.wpProQuiz_results .wpProQuiz_button:active {
  transform: translateY(0) scale(0.98) !important;
}

/* ── Continue button special styling ──────────────────────────── */
.wpProQuiz_results .quiz_continue_link #quiz_continue_link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #00B8D4, #0088a3) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 16px !important;
  padding: 16px 36px !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: 1.2px !important;
  text-transform: none !important;
  text-decoration: none !important;
  writing-mode: horizontal-tb !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  box-shadow: 0 4px 20px rgba(0,184,212,0.3) !important;
  position: relative;
  overflow: hidden;
  min-width: 180px;
}

.wpProQuiz_results .quiz_continue_link #quiz_continue_link::after {
  content: ' \2192';
  margin-left: 8px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.wpProQuiz_results .quiz_continue_link #quiz_continue_link:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 35px rgba(0,184,212,0.45) !important;
  background: linear-gradient(135deg, #00C9E5, #0099b5) !important;
}

.wpProQuiz_results .quiz_continue_link #quiz_continue_link:hover::after {
  transform: translateX(4px);
}

/* ── Hide the Results header (already hidden, reinforce) ──────── */
.wpProQuiz_results .wpProQuiz_header {
  display: none !important;
}

/* ── Sparkle particles ────────────────────────────────────────── */
.lf-sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  animation: lf-sparkleFloat 3s ease-in-out infinite;
}

/* ═══ KEYFRAMES ═══════════════════════════════════════════════════ */

@keyframes lf-resultSlideIn {
  0% { opacity: 0; transform: translateY(30px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes lf-borderGlow {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes lf-trophyPop {
  0% { transform: translateX(-50%) scale(0) rotate(-20deg); opacity: 0; }
  60% { transform: translateX(-50%) scale(1.15) rotate(5deg); }
  100% { transform: translateX(-50%) scale(1) rotate(0deg); opacity: 1; }
}

@keyframes lf-textFadeUp {
  0% { opacity: 0; transform: translateY(15px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes lf-gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}

@keyframes lf-dividerFade {
  0% { opacity: 0; transform: scaleX(0.3); }
  100% { opacity: 1; transform: scaleX(1); }
}

@keyframes lf-buttonsSlideUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes lf-sparkleFloat {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
  50% { opacity: 1; transform: translateY(-30px) scale(1); }
}

@keyframes lf-pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(0,184,212,0.2); }
  50% { box-shadow: 0 0 40px rgba(0,184,212,0.35); }
}

/* ── Floating orbs background decoration ──────────────────────── */
.lf-result-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0;
  animation: lf-orbFloat 6s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes lf-orbFloat {
  0%, 100% { opacity: 0.15; transform: translate(0, 0) scale(1); }
  33% { opacity: 0.25; transform: translate(10px, -15px) scale(1.1); }
  66% { opacity: 0.15; transform: translate(-10px, 10px) scale(0.9); }
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  .wpProQuiz_content .wpProQuiz_results {
    padding: 40px 24px 32px !important;
    margin: 24px 12px !important;
    border-radius: 22px !important;
  }

  .wpProQuiz_results .endgreentext {
    font-size: 32px !important;
  }

  .wpProQuiz_results .endredtext {
    font-size: 28px !important;
  }

  .wpProQuiz_results .ld-quiz-actions {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .wpProQuiz_results .wpProQuiz_button,
  .wpProQuiz_results .quiz_continue_link #quiz_continue_link {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }
}
