/* ═══════════════════════════════════════════════
   Zooya Live - Quiz Tab Styles (Compact Desktop)
   ═══════════════════════════════════════════════ */

/* ═══ Container ═══ */
.quiz-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding-bottom: 8px;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}

/* ═══ HUD — فشرده ═══ */
.quiz-hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: linear-gradient(180deg, var(--card) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.quiz-hud-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
  transition: all .2s;
  position: relative;
}

.quiz-hud-item .icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 0;
}

.quiz-hud-item .info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.quiz-hud-item .val {
  font-size: 18px;
  font-weight: 800;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  direction: ltr;
  letter-spacing: -0.5px;
  transition: color .3s;
  line-height: 1.2;
}

.quiz-hud-item .lbl {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1;
}

.quiz-hud-item.stars .val { color: var(--gold); }
.quiz-hud-item.level .val { color: var(--purple); }
.quiz-hud-item.accuracy .val { color: var(--accent); }

.quiz-hud-item.pulse {
  animation: quizHudPulse .5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.quiz-hud-item.flash-down {
  animation: quizFlashDown .5s;
}

@keyframes quizHudPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); background: rgba(79, 195, 247, 0.15); }
  100% { transform: scale(1); }
}

@keyframes quizFlashDown {
  0% { transform: scale(1); }
  30% { transform: scale(0.96); background: rgba(248, 113, 113, 0.3); }
  100% { transform: scale(1); }
}

/* ═══ Level Progress Bar — رنگی و فشرده ═══ */
.quiz-level-progress {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.quiz-level-progress::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
  opacity: 0.6;
}

.quiz-level-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.quiz-level-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--purple);
  display: flex;
  align-items: center;
  gap: 6px;
}

.quiz-level-count {
  font-size: 13px;
  font-weight: 800;
  direction: ltr;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  color: var(--text-strong);
}

.quiz-level-count .cur { color: var(--win); }
.quiz-level-count .sep { color: var(--text-muted); margin: 0 3px; }
.quiz-level-count .max { color: var(--text-muted); }

.quiz-level-track {
  height: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

/* 🔥 نوار پیشرفت رنگی */
.quiz-level-fill {
  height: 100%;
  border-radius: 6px;
  transition: width .6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  background: linear-gradient(90deg,
    #ef4444 0%,
    #fb923c 20%,
    #fbbf24 40%,
    #4ade80 60%,
    #22c55e 80%,
    #16a34a 100%
  );
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
}

.quiz-level-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent);
  border-radius: 6px 6px 0 0;
  pointer-events: none;
}

/* ═══ Question Card — فشرده ═══ */
.quiz-question-card {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 340px;
}

.quiz-question-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

.quiz-q-type {
  display: inline-block;
  background: rgba(79, 195, 247, 0.12);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid rgba(79, 195, 247, 0.25);
  margin-bottom: 10px;
  align-self: flex-start;
}

/* ═══ Grade Row ═══ */
.quiz-q-grade-row {
  position: absolute;
  top: 14px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.quiz-q-grade {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  direction: ltr;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 100px;
}

.quiz-q-grade.hard {
  color: var(--loss);
  border: 1px solid rgba(248, 113, 113, 0.3);
}
.quiz-q-grade.medium {
  color: var(--orange);
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.quiz-q-grade.easy {
  color: var(--win);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

/* ═══ Hint Button ═══ */
.quiz-hint-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.2), rgba(245, 197, 66, 0.1));
  border: 1px solid rgba(245, 197, 66, 0.4);
  color: var(--gold);
  padding: 4px 10px;
  border-radius: 100px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  direction: ltr;
}

.quiz-hint-mini:hover:not(:disabled) {
  background: rgba(245, 197, 66, 0.3);
  border-color: var(--gold);
  transform: scale(1.05);
}

.quiz-hint-mini:disabled,
.quiz-hint-mini.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ═══ Question Title — فشرده ═══ */
.quiz-q-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-strong);
  text-align: center;
  margin-bottom: 6px;
  margin-top: 8px;
  line-height: 1.5;
  letter-spacing: -0.3px;
}

.quiz-q-title .en {
  direction: ltr;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--accent);
  font-size: 26px;
  display: inline-block;
  padding: 2px 0;
  text-shadow: 0 0 25px rgba(79, 195, 247, 0.4);
}

.quiz-q-sub {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ═══ Speak Button ═══ */
.quiz-speak-btn {
  background: rgba(79, 195, 247, 0.12);
  border: 1px solid rgba(79, 195, 247, 0.3);
  color: var(--accent);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  transition: all .2s;
  font-family: inherit;
  flex-shrink: 0;
}

.quiz-speak-btn:hover {
  background: rgba(79, 195, 247, 0.2);
  transform: scale(1.08);
}

.quiz-speak-btn:active {
  transform: scale(0.95);
}

.quiz-speak-btn.small {
  width: 40px;
  height: 40px;
  font-size: 17px;
  margin: 6px auto 10px;
}

.quiz-speak-btn.big {
  width: 74px;
  height: 74px;
  font-size: 32px;
  margin: 8px auto 12px;
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.2), rgba(79, 195, 247, 0.08));
  border-width: 2px;
  box-shadow: 0 0 40px rgba(79, 195, 247, 0.3);
  animation: quizPulseSpeak 2s infinite;
}

@keyframes quizPulseSpeak {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 40px rgba(79, 195, 247, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 60px rgba(79, 195, 247, 0.5);
  }
}

/* ═══ Hint Box ═══ */
.quiz-hint-box {
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.1), rgba(245, 197, 66, 0.03));
  border: 1px solid rgba(245, 197, 66, 0.35);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 8px;
  margin-bottom: 10px;
  animation: quizFadeIn .4s ease;
}

.quiz-hint-box .hint-label {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.quiz-hint-box .hint-sentence {
  font-size: 14px;
  color: var(--text-strong);
  direction: ltr;
  text-align: left;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-weight: 500;
  line-height: 1.7;
  font-style: italic;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  letter-spacing: 0.2px;
}

/* ═══ Fill Sentence (جای خالی) ═══ */
.quiz-fill-sentence {
  font-size: 17px;
  color: var(--text-strong);
  direction: ltr;
  text-align: center;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-weight: 500;
  line-height: 1.9;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(79, 195, 247, 0.1);
  border-radius: 10px;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.quiz-fill-sentence .blank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  height: 28px;
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.12), rgba(79, 195, 247, 0.05));
  border: 2px dashed var(--accent);
  border-radius: 8px;
  color: transparent;
  padding: 0 12px;
  margin: 0 6px;
  vertical-align: middle;
  font-weight: 800;
  box-shadow: 0 0 20px rgba(79, 195, 247, 0.15);
  animation: quizBlankPulse 2.5s infinite;
  position: relative;
  top: -2px;
}

@keyframes quizBlankPulse {
  0%, 100% {
    border-color: rgba(79, 195, 247, 0.6);
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.15);
  }
  50% {
    border-color: rgba(79, 195, 247, 0.9);
    box-shadow: 0 0 30px rgba(79, 195, 247, 0.3);
  }
}

/* ═══ Type Input ═══ */
.quiz-type-input-wrap {
  margin-top: 12px;
}

.quiz-type-input {
  width: 100%;
  padding: 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text-strong);
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  direction: ltr;
  letter-spacing: 2px;
  outline: none;
  transition: all .2s;
}

.quiz-type-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(79, 195, 247, 0.15);
}

.quiz-type-input.correct {
  border-color: var(--win);
  background: rgba(74, 222, 128, 0.1);
  animation: quizCorrectPulse .5s;
}

.quiz-type-input.wrong {
  border-color: var(--loss);
  background: rgba(248, 113, 113, 0.1);
  animation: quizWrongShake .5s;
}

.quiz-type-input::placeholder {
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.5px;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

.quiz-type-submit {
  width: 100%;
  padding: 13px;
  margin-top: 10px;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 8px 25px rgba(79, 195, 247, 0.3);
}

.quiz-type-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(79, 195, 247, 0.4);
}

.quiz-type-submit:active {
  transform: translateY(0);
}

.quiz-type-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ═══ Options — فشرده ═══ */
.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.quiz-option-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-strong);
  padding: 14px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.3;
}

.quiz-option-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.quiz-option-btn:disabled {
  cursor: not-allowed;
}

.quiz-option-btn.en {
  direction: ltr;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.3px;
  font-size: 15px;
}

.quiz-option-btn.correct {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.25), rgba(74, 222, 128, 0.1));
  border-color: var(--win);
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
  animation: quizCorrectPulse .5s;
}

@keyframes quizCorrectPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.quiz-option-btn.wrong {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.25), rgba(248, 113, 113, 0.1));
  border-color: var(--loss);
  animation: quizWrongShake .5s;
}

@keyframes quizWrongShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ═══ Feedback — فشرده ═══ */
.quiz-feedback {
  padding: 10px 14px;
  border-radius: 10px;
  margin-top: 10px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  animation: quizFadeIn .3s;
}

.quiz-feedback.correct {
  background: rgba(74, 222, 128, 0.15);
  color: var(--win);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.quiz-feedback.wrong {
  background: rgba(248, 113, 113, 0.15);
  color: var(--loss);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.quiz-feedback .en {
  direction: ltr;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--accent);
}

.quiz-feedback .sentence {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  font-style: italic;
  color: var(--text-muted);
  direction: ltr;
  text-align: left;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: rgba(0, 0, 0, 0.15);
  padding: 6px 10px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

@keyframes quizFadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══ Understand Button ═══ */
.quiz-understand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  margin-top: 10px;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 8px 25px rgba(79, 195, 247, 0.3);
  animation: quizFadeIn .4s ease;
}

.quiz-understand-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(79, 195, 247, 0.4);
}

/* ═══ Loading ═══ */
.quiz-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  gap: 14px;
}

.quiz-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: quizSpin .8s linear infinite;
}

@keyframes quizSpin {
  to { transform: rotate(360deg); }
}

.quiz-loading-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* ═══ Empty ═══ */
.quiz-empty {
  text-align: center;
  padding: 50px 20px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 2;
}

.quiz-empty-icon {
  font-size: 44px;
  margin-bottom: 10px;
  opacity: 0.6;
}

.quiz-empty a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-top: 10px;
}

.quiz-empty a:hover {
  text-decoration: underline;
}

/* ═══ Star Popup ═══ */
.quiz-star-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 80px;
  z-index: 99999;
  pointer-events: none;
  animation: quizStarPop 1s ease-out forwards;
}

@keyframes quizStarPop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ═══ Star Minus Popup ═══ */
.quiz-star-minus {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 60px;
  z-index: 99999;
  pointer-events: none;
  color: var(--loss);
  font-weight: 900;
  animation: quizStarPop 1s ease-out forwards;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

/* ═══ Level Up Overlay ═══ */
.quiz-levelup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 23, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}

.quiz-levelup-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.quiz-levelup-content {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg) 100%);
  border: 2px solid var(--purple);
  border-radius: 24px;
  padding: 36px 28px;
  text-align: center;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 0 60px rgba(168, 85, 247, 0.5);
  transform: scale(0.8);
  transition: transform .5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-levelup-overlay.show .quiz-levelup-content {
  transform: scale(1);
}

.quiz-levelup-icon {
  font-size: 72px;
  line-height: 1;
  margin-bottom: 14px;
  animation: quizBounce 0.8s infinite alternate;
}

@keyframes quizBounce {
  to { transform: translateY(-8px); }
}

.quiz-levelup-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--purple);
  margin-bottom: 8px;
}

.quiz-levelup-sub {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.7;
}

.quiz-levelup-sub strong {
  color: var(--gold);
  font-weight: 800;
}

.quiz-levelup-btn {
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--purple), #7c3aed);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s;
  width: 100%;
}

.quiz-levelup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(168, 85, 247, 0.4);
}

/* ═══ Daily Reward Overlay ═══ */
.quiz-daily-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
  overflow-y: auto;
}

.quiz-daily-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.quiz-daily-content {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg) 100%);
  border: 2px solid var(--gold);
  border-radius: 24px;
  padding: 28px 20px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 0 60px rgba(245, 197, 66, 0.4);
  transform: scale(0.8);
  transition: transform .5s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin: auto;
}

.quiz-daily-overlay.show .quiz-daily-content {
  transform: scale(1);
}

.quiz-daily-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 10px;
  animation: quizBounce 0.8s infinite alternate;
}

.quiz-daily-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 6px;
}

.quiz-daily-sub {
  font-size: 12px;
  color: var(--text);
  margin-bottom: 18px;
  opacity: 0.8;
}

/* ═══ نمایش ۱۰ روز ═══ */
.quiz-daily-days {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  padding: 0 4px;
  align-items: center;
}

.quiz-daily-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.quiz-daily-row.row-4 { margin-bottom: 4px; }

.quiz-daily-row.row-1 .quiz-daily-day { width: calc(25% - 6px); max-width: 100px; }
.quiz-daily-row.row-2 .quiz-daily-day { width: calc(25% - 6px); max-width: 100px; }
.quiz-daily-row.row-3 .quiz-daily-day { width: calc(30% - 6px); max-width: 120px; }
.quiz-daily-row.row-4 .quiz-daily-day { width: calc(40% - 6px); max-width: 150px; }

.quiz-daily-day {
  aspect-ratio: 1.15;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid var(--border);
  color: var(--text-muted);
  gap: 2px;
  position: relative;
  transition: all .3s;
  min-height: 56px;
  padding: 6px 4px;
  cursor: default;
}

.quiz-daily-day .d-icon { font-size: 18px; line-height: 1; }
.quiz-daily-day .d-label {
  font-size: 10px; font-weight: 800; direction: ltr;
  line-height: 1; margin-top: 2px;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}
.quiz-daily-day .d-day-num {
  position: absolute; top: 4px; right: 6px;
  font-size: 8px; color: var(--text-muted); font-weight: 700;
  opacity: 0.6; font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

.quiz-daily-day.claimed {
  background: rgba(74, 222, 128, 0.1);
  border-color: var(--win);
  color: var(--win);
}
.quiz-daily-day.claimed .d-day-num { color: var(--win); opacity: 1; }

.quiz-daily-day.current {
  background: rgba(245, 197, 66, 0.15);
  border-color: var(--gold);
  color: var(--gold);
  animation: quizPulseCurrent 1.5s infinite;
  box-shadow: 0 0 20px rgba(245, 197, 66, 0.3);
}
.quiz-daily-day.current .d-day-num { color: var(--gold); opacity: 1; }

@keyframes quizPulseCurrent {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(245, 197, 66, 0.3); }
  50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(245, 197, 66, 0.5); }
}

.quiz-daily-day.future { opacity: 0.4; }

.quiz-daily-row.row-4 .quiz-daily-day {
  border-width: 2.5px;
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.12), rgba(245, 197, 66, 0.04));
  border-color: rgba(245, 197, 66, 0.5);
  color: var(--gold);
  position: relative;
  overflow: hidden;
}

.quiz-daily-row.row-4 .quiz-daily-day::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg,
    transparent 30%,
    rgba(245, 197, 66, 0.15) 50%,
    transparent 70%);
  background-size: 200% 200%;
  animation: quizShine 3s infinite;
  pointer-events: none;
}

@keyframes quizShine {
  0% { background-position: 200% 200%; }
  100% { background-position: -200% -200%; }
}

.quiz-daily-row.row-4 .quiz-daily-day .d-icon { font-size: 24px; }
.quiz-daily-row.row-4 .quiz-daily-day .d-label { font-size: 12px; }

.quiz-daily-row.row-4 .quiz-daily-day.future {
  opacity: 0.5;
  background: rgba(0, 0, 0, 0.2);
  border-color: var(--border);
  color: var(--text-muted);
}
.quiz-daily-row.row-4 .quiz-daily-day.future::before { display: none; }

.quiz-daily-row.row-4 .quiz-daily-day.claimed {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(74, 222, 128, 0.05));
  border-color: var(--win);
  color: var(--win);
}
.quiz-daily-row.row-4 .quiz-daily-day.claimed::before { display: none; }

.quiz-daily-row.row-4 .quiz-daily-day.current {
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.2), rgba(245, 197, 66, 0.08));
  border-color: var(--gold);
  box-shadow: 0 0 35px rgba(245, 197, 66, 0.5);
}

/* ═══ Daily Button ═══ */
.quiz-daily-btn {
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--gold), #f59e0b);
  color: #0a0e17;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s;
  width: 100%;
}

.quiz-daily-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(245, 197, 66, 0.4);
}

.quiz-daily-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ═══ Toast ═══ */
.quiz-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  background: linear-gradient(135deg, var(--gold), #f59e0b);
  color: #0a0e17;
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 40px rgba(245, 197, 66, 0.4);
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform .5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-toast.show {
  transform: translateX(-50%) translateY(0);
}

.quiz-toast.error {
  background: linear-gradient(135deg, var(--loss), #dc2626);
  color: #fff;
  box-shadow: 0 12px 40px rgba(248, 113, 113, 0.4);
}

/* ═══ Confetti Canvas ═══ */
#quizConfettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99997;
}

/* ═══════════════════════════════════════════════
   Responsive — Small Screens
   ═══════════════════════════════════════════════ */
@media (max-width: 500px) {
  .quiz-hud {
    padding: 10px;
    gap: 8px;
  }
  .quiz-hud-item {
    padding: 6px 8px;
    gap: 8px;
  }
  .quiz-hud-item .val { font-size: 16px; }
  .quiz-hud-item .icon { font-size: 18px; }
  .quiz-hud-item .lbl { font-size: 9px; }

  .quiz-question-card {
    padding: 16px 16px;
    min-height: 320px;
  }

  .quiz-q-title { font-size: 18px; }
  .quiz-q-title .en { font-size: 22px; }

  .quiz-q-grade-row {
    top: 12px;
    left: 16px;
  }

  .quiz-option-btn {
    font-size: 13px;
    padding: 12px 10px;
    min-height: 52px;
  }
  .quiz-option-btn.en { font-size: 14px; }

  .quiz-fill-sentence {
    font-size: 15px;
    padding: 12px 14px;
  }
  .quiz-fill-sentence .blank {
    min-width: 80px;
    height: 26px;
  }

  .quiz-type-input {
    font-size: 16px;
    padding: 14px;
  }

  .quiz-speak-btn {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }
  .quiz-speak-btn.big {
    width: 80px;
    height: 80px;
    font-size: 34px;
  }

  .quiz-levelup-content { padding: 28px 22px; }
  .quiz-levelup-icon { font-size: 60px; }
  .quiz-levelup-title { font-size: 20px; }

  .quiz-daily-content { padding: 24px 16px; }
  .quiz-daily-days { gap: 6px; padding: 0; }
  .quiz-daily-day { min-height: 48px; padding: 4px 2px; }
  .quiz-daily-day .d-icon { font-size: 14px; }
  .quiz-daily-day .d-label { font-size: 9px; }
  .quiz-daily-day .d-day-num { font-size: 7px; }
  .quiz-daily-title { font-size: 18px; }
  .quiz-daily-icon { font-size: 48px; }
  .quiz-daily-row.row-4 .quiz-daily-day .d-icon { font-size: 20px; }
  .quiz-daily-row.row-4 .quiz-daily-day .d-label { font-size: 11px; }
}

@media (max-width: 380px) {
  .quiz-hud-item .val { font-size: 14px; }
  .quiz-hud-item .icon { font-size: 16px; }
  .quiz-hud-item .lbl { font-size: 9px; }

  .quiz-question-card {
    padding: 14px 12px;
    min-height: 300px;
  }

  .quiz-q-title { font-size: 16px; }
  .quiz-q-title .en { font-size: 20px; }

  .quiz-q-type { font-size: 10px; padding: 4px 10px; }
  .quiz-q-grade { font-size: 10px; padding: 4px 8px; }
  .quiz-hint-mini { font-size: 10px; padding: 4px 8px; }

  .quiz-option-btn {
    font-size: 12px;
    padding: 10px 6px;
    min-height: 48px;
  }
  .quiz-option-btn.en { font-size: 13px; }

  .quiz-fill-sentence {
    font-size: 14px;
    padding: 10px 12px;
  }
  .quiz-fill-sentence .blank {
    min-width: 70px;
    height: 24px;
    margin: 0 4px;
  }

  .quiz-type-input {
    font-size: 15px;
    padding: 12px;
  }

  .quiz-understand-btn {
    font-size: 13px;
    padding: 12px;
  }

  .quiz-levelup-content { padding: 24px 18px; }
  .quiz-levelup-icon { font-size: 50px; }
  .quiz-levelup-title { font-size: 18px; }
  .quiz-levelup-sub { font-size: 12px; }

  .quiz-daily-content { padding: 22px 14px; }
  .quiz-daily-days { gap: 5px; padding: 0; }
  .quiz-daily-day { min-height: 44px; padding: 4px 2px; }
  .quiz-daily-day .d-icon { font-size: 13px; }
  .quiz-daily-day .d-label { font-size: 8px; }
  .quiz-daily-day .d-day-num { font-size: 7px; }
  .quiz-daily-title { font-size: 16px; }
  .quiz-daily-icon { font-size: 42px; }
  .quiz-daily-row.row-4 .quiz-daily-day .d-icon { font-size: 18px; }
  .quiz-daily-row.row-4 .quiz-daily-day .d-label { font-size: 10px; }
}