/* Quiz Lottery Pro - Extra Animations & Effects
   طراحی سامانه: کوهنانی نیوز */

/* =================== SHIMMER EFFECT =================== */
@keyframes ql-shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.ql-shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 1000px 100%;
  animation: ql-shimmer 2s infinite;
}

/* =================== GLOW PULSE =================== */
@keyframes ql-glowRing {
  0%, 100% { box-shadow: 0 0 10px rgba(233,69,96,0.3), 0 0 20px rgba(233,69,96,0.1); }
  50%       { box-shadow: 0 0 30px rgba(233,69,96,0.6), 0 0 60px rgba(233,69,96,0.3); }
}

.ql-glow-ring { animation: ql-glowRing 3s ease-in-out infinite; }

/* =================== TYPING CURSOR =================== */
@keyframes ql-blink {
  0%, 50%  { opacity: 1; }
  51%, 100%{ opacity: 0; }
}

.ql-cursor::after {
  content: '|';
  animation: ql-blink 1s infinite;
  color: var(--ql-primary);
}

/* =================== FLOAT ANIMATION =================== */
@keyframes ql-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

.ql-float { animation: ql-float 4s ease-in-out infinite; }

/* =================== GRADIENT TEXT =================== */
.ql-gradient-text {
  background: linear-gradient(135deg, #e94560 0%, #f5a623 50%, #e94560 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: ql-gradientShift 3s linear infinite;
}

@keyframes ql-gradientShift {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}

/* =================== QUESTION SLIDE TRANSITIONS =================== */
.ql-q-enter {
  animation: ql-qEnter 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
.ql-q-exit {
  animation: ql-qExit 0.3s ease both;
}

@keyframes ql-qEnter {
  from { opacity: 0; transform: translateX(60px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes ql-qExit {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-60px); }
}

/* =================== OPTION HOVER RIPPLE =================== */
.ql-option::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(233,69,96,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.ql-option:hover::after { opacity: 1; }

/* =================== SCORE COUNTER =================== */
@keyframes ql-countUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.ql-score-animate {
  animation: ql-countUp 0.5s ease both;
}

/* =================== SUCCESS CHECK =================== */
@keyframes ql-checkDraw {
  to { stroke-dashoffset: 0; }
}

.ql-check-svg {
  width: 60px; height: 60px;
}
.ql-check-svg circle {
  fill: none;
  stroke: #10b981;
  stroke-width: 3;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: ql-checkDraw 0.5s ease 0.2s both;
}
.ql-check-svg path {
  fill: none;
  stroke: #10b981;
  stroke-width: 3;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: ql-checkDraw 0.3s ease 0.6s both;
}

/* =================== RESPONSIVE FINE-TUNING =================== */
@media (max-width: 480px) {
  .ql-card-title { font-size: 1.4rem; }
  .ql-btn { padding: 13px 24px; font-size: 0.95rem; }
  .ql-q-text { font-size: 1.1rem; }
  .ql-code-val { font-size: 1.5rem; letter-spacing: 3px; }
  .ql-stat { padding: 5px 10px; }
  .ql-header { flex-wrap: wrap; gap: 8px; }
  .ql-option { padding: 14px 16px; }
  .ql-result-card { padding: 28px 20px; }
}

@media (min-width: 1024px) {
  .ql-step { padding: 60px 40px; }
  .ql-card { padding: 56px 52px; }
}

/* =================== DARK GLASSMORPHISM =================== */
.ql-glass {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
}

/* =================== LOADING DOTS =================== */
.ql-dots span {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--ql-primary);
  border-radius: 50%;
  margin: 0 3px;
  animation: ql-dotBounce 1.4s ease infinite;
}
.ql-dots span:nth-child(2) { animation-delay: 0.2s; }
.ql-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ql-dotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40%            { transform: scale(1.2); opacity: 1; }
}

/* =================== PROGRESS GLOW =================== */
.ql-progress-fill {
  position: relative;
  overflow: visible;
}
.ql-progress-fill::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  background: var(--ql-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--ql-primary);
}

/* =================== FIELD VALID STATE =================== */
.ql-field input.valid {
  border-color: #10b981;
  background: rgba(16,185,129,0.08);
}
.ql-field input.invalid {
  border-color: #ef4444;
  background: rgba(239,68,68,0.08);
}

/* =================== CARD HOVER 3D =================== */
.ql-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
