/* ============================================
   Quiz Break - Animations
   qb-animations.css
   ============================================ */

/* =================== KEYFRAMES =================== */
@keyframes qb-float-1 {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

@keyframes qb-float-2 {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50% { transform: translateY(-10px) rotate(-3deg); }
}

@keyframes qb-float-3 {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-18px) rotate(1deg); }
}

@keyframes qb-pulse-ring {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

@keyframes qb-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes qb-slide-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes qb-slide-down {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes qb-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes qb-scale-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes qb-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes qb-bounce-in {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes qb-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes qb-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes qb-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes qb-orbit {
  from { transform: rotate(0deg) translateX(60px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(60px) rotate(-360deg); }
}

@keyframes qb-counter-flash {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* =================== ANIMATION CLASSES =================== */
.qb-animate-float-1 { animation: qb-float-1 4s ease-in-out infinite; }
.qb-animate-float-2 { animation: qb-float-2 5s ease-in-out infinite; }
.qb-animate-float-3 { animation: qb-float-3 3.5s ease-in-out infinite; }

.qb-animate-gradient {
  background-size: 200% 200%;
  animation: qb-gradient-shift 8s ease infinite;
}

.qb-animate-spin { animation: qb-spin 20s linear infinite; }

/* =================== SCROLL REVEAL =================== */
.qb-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.qb-reveal.qb-visible {
  opacity: 1;
  transform: translateY(0);
}

.qb-reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.qb-reveal-left.qb-visible {
  opacity: 1;
  transform: translateX(0);
}

.qb-reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.qb-reveal-right.qb-visible {
  opacity: 1;
  transform: translateX(0);
}

.qb-reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.qb-reveal-scale.qb-visible {
  opacity: 1;
  transform: scale(1);
}

/* Delay utilities */
.qb-delay-1 { transition-delay: 0.1s !important; }
.qb-delay-2 { transition-delay: 0.2s !important; }
.qb-delay-3 { transition-delay: 0.3s !important; }
.qb-delay-4 { transition-delay: 0.4s !important; }
.qb-delay-5 { transition-delay: 0.5s !important; }
.qb-delay-6 { transition-delay: 0.6s !important; }

/* =================== HERO ORBS =================== */
.qb-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.qb-orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(91,79,233,0.3);
  top: -100px;
  left: -100px;
  animation: qb-float-1 8s ease-in-out infinite;
}

.qb-orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(78,205,196,0.2);
  bottom: -50px;
  right: -50px;
  animation: qb-float-2 10s ease-in-out infinite;
}

.qb-orb-3 {
  width: 250px;
  height: 250px;
  background: rgba(255,107,107,0.15);
  top: 50%;
  right: 20%;
  animation: qb-float-3 7s ease-in-out infinite;
}

/* =================== LOADING STATES =================== */
.qb-loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% auto;
  animation: qb-shimmer 1.5s linear infinite;
}

/* =================== QUIZ TRANSITION =================== */
.qb-quiz-slide-enter {
  animation: qb-slide-up 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.qb-quiz-result-enter {
  animation: qb-bounce-in 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =================== HOVER MICRO-INTERACTIONS =================== */
.qb-hover-lift {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.qb-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(91,79,233,0.15);
}

.qb-hover-glow:hover {
  box-shadow: 0 0 0 4px rgba(91,79,233,0.15), 0 8px 32px rgba(91,79,233,0.2);
}

/* =================== SVG DIVIDERS =================== */
.qb-svg-divider {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-bottom: -1px;
}

.qb-svg-divider svg { display: block; }

/* =================== BACKGROUND SHAPES =================== */
.qb-bg-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.qb-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
}

.qb-shape-1 {
  width: 600px;
  height: 600px;
  background: var(--qb-primary);
  top: -200px;
  right: -200px;
  animation: qb-float-1 12s ease-in-out infinite;
}

.qb-shape-2 {
  width: 400px;
  height: 400px;
  background: var(--qb-accent-teal);
  bottom: -100px;
  left: -100px;
  animation: qb-float-2 10s ease-in-out infinite;
}

.qb-shape-3 {
  width: 200px;
  height: 200px;
  background: var(--qb-accent);
  top: 40%;
  left: 10%;
  animation: qb-float-3 8s ease-in-out infinite;
}

/* =================== COUNTER ANIMATION =================== */
.qb-count-flash { animation: qb-counter-flash 0.3s ease; }

/* =================== PROGRESS BAR =================== */
.qb-progress-bar {
  height: 6px;
  background: var(--qb-border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.qb-progress-fill {
  height: 100%;
  background: var(--qb-gradient-primary);
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

/* =================== STICKY LABEL =================== */
.qb-new-badge {
  display: inline-block;
  background: var(--qb-gradient-warm);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 6px;
  animation: qb-blink 2s ease-in-out infinite;
}
