/* ===== Mock Test Page — Figma Polish ===== */

/* Setup Screen */
.mt-setup {
  padding: 3rem 2rem; text-align: center;
  background: linear-gradient(145deg, #eef0ff 0%, #fce7ff 50%, #fff0e8 100%);
  min-height: 80vh;
  position: relative; overflow: hidden;
}
.mt-setup::before {
  content: ''; position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(91,94,244,0.08), transparent 70%);
  top: -100px; left: -100px; border-radius: 50%;
  pointer-events: none;
}
.mt-setup::after {
  content: ''; position: absolute;
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(236,72,153,0.06), transparent 70%);
  bottom: -80px; right: -80px; border-radius: 50%;
  pointer-events: none;
}
.mt-setup-inner { max-width: 700px; margin: 0 auto; position: relative; z-index: 1; }
.mt-badge {
  display: inline-block; background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(91,94,244,0.12); border-radius: 50px;
  padding: 0.4rem 1.2rem; font-weight: 800; font-size: 0.82rem;
  color: #5b5ef4; margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(91,94,244,0.08);
}
.mt-setup h1 { font-size: 2.2rem; font-weight: 900; margin-bottom: 0.5rem; }
.mt-setup h1 .highlight {
  background: linear-gradient(135deg, #5b5ef4, #7c3aed, #ec4899);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mt-setup > p { color: #64748b; font-size: 1rem; margin-bottom: 2rem; }
.mt-config { text-align: left; }
.mt-config-card {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px) saturate(1.6);
  border-radius: 20px; padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1.5px solid rgba(91,94,244,0.08);
  box-shadow: 0 4px 24px rgba(91,94,244,0.06);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mt-config-card:hover {
  box-shadow: 0 8px 32px rgba(91,94,244,0.1);
  transform: translateY(-2px);
}
.mt-config-card h3 { font-size: 1rem; font-weight: 900; margin-bottom: 1rem; }
.mt-exam-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.mt-opt {
  padding: 1rem; border-radius: 16px;
  border: 2px solid rgba(91,94,244,0.08); background: rgba(255,255,255,0.7);
  font-weight: 800; font-size: 0.9rem; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}
.mt-opt:hover {
  border-color: #5b5ef4; transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(91,94,244,0.12);
}
.mt-opt.active {
  border-color: #5b5ef4; background: #eef0ff;
  box-shadow: 0 6px 24px rgba(91,94,244,0.18);
  transform: translateY(-3px);
}
.mt-settings { display: flex; flex-direction: column; gap: 1rem; }
.mt-setting label {
  display: block; font-weight: 800; font-size: 0.82rem;
  color: #64748b; margin-bottom: 0.3rem;
}
.mt-setting select {
  width: 100%; padding: 0.7rem 1rem;
  border: 2px solid rgba(91,94,244,0.1); border-radius: 14px;
  font-family: 'Nunito',sans-serif; font-weight: 700; font-size: 0.9rem;
  background: rgba(255,255,255,0.8);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mt-setting select:focus {
  outline: none; border-color: #5b5ef4;
  box-shadow: 0 0 0 4px rgba(91,94,244,0.08);
}
.mt-info-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 1.5rem 0; }
.mt-info {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1rem; border-radius: 14px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(91,94,244,0.08);
  font-weight: 700; font-size: 0.82rem;
  box-shadow: 0 2px 8px rgba(91,94,244,0.04);
}
.mt-info span { font-size: 1.2rem; }
.mt-start-btn {
  width: 100%; padding: 1rem; font-size: 1.1rem; border-radius: 16px;
  position: relative; overflow: hidden;
}
.mt-start-btn::after {
  content: '';
  position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
  transform: rotate(45deg) translateX(-100%);
}
.mt-start-btn:hover::after {
  animation: mtShine 0.6s ease forwards;
}
@keyframes mtShine { to { transform: rotate(45deg) translateX(100%); } }

/* Test Screen */
.mt-test { max-width: 800px; margin: 0 auto; padding: 1rem 2rem 6rem; }
.mt-test-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0; position: sticky; top: 60px;
  background: rgba(250,251,255,0.9);
  backdrop-filter: blur(12px);
  z-index: 10;
}
.mt-test-title { font-weight: 900; font-size: 1.1rem; flex: 1; }
.mt-timer {
  font-weight: 900; font-size: 1.4rem; color: #5b5ef4;
  background: rgba(238,240,255,0.8);
  backdrop-filter: blur(8px);
  padding: 0.5rem 1.2rem; border-radius: 14px;
  box-shadow: 0 2px 12px rgba(91,94,244,0.08);
  border: 1.5px solid rgba(91,94,244,0.1);
}
.mt-timer.warning {
  color: #f97316; background: rgba(255,247,237,0.9);
  border-color: rgba(249,115,22,0.15);
  animation: timerPulse 1s infinite;
  box-shadow: 0 2px 16px rgba(249,115,22,0.12);
}
.mt-timer.danger {
  color: #dc2626; background: rgba(254,242,242,0.9);
  border-color: rgba(220,38,38,0.15);
  animation: timerPulse 0.5s infinite;
  box-shadow: 0 2px 16px rgba(220,38,38,0.15);
}
@keyframes timerPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }
.mt-progress-info { font-weight: 800; font-size: 0.85rem; color: #64748b; }
.mt-test-progress {
  height: 5px; background: #eeeeff; border-radius: 50px;
  overflow: hidden; margin-bottom: 1.5rem;
}
.mt-test-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5b5ef4, #7c3aed, #ec4899);
  border-radius: 50px;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.mt-test-progress-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: progressShimmer 2s ease-in-out infinite;
}
@keyframes progressShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Sections */
.mt-section { margin-bottom: 2rem; }
.mt-section-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.2rem; border-radius: 18px;
  background: linear-gradient(135deg, rgba(238,240,255,0.8), rgba(252,231,255,0.6));
  backdrop-filter: blur(8px);
  margin-bottom: 1rem;
  border: 1px solid rgba(91,94,244,0.06);
}
.mt-section-title { font-weight: 900; font-size: 1.05rem; flex: 1; }
.mt-section-marks {
  font-weight: 800; font-size: 0.85rem; color: #5b5ef4;
  background: rgba(255,255,255,0.8); padding: 0.3rem 0.8rem; border-radius: 50px;
}
.mt-question {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px);
  border-radius: 18px; padding: 1.25rem;
  margin-bottom: 0.75rem;
  border: 1.5px solid rgba(91,94,244,0.08);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 12px rgba(91,94,244,0.04);
}
.mt-question:hover {
  border-color: rgba(91,94,244,0.15);
  box-shadow: 0 4px 20px rgba(91,94,244,0.08);
}
.mt-question.answered {
  border-color: rgba(34,197,94,0.2); background: rgba(240,253,244,0.7);
}
.mt-q-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.mt-q-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #eef0ff, #f5f0ff);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 0.82rem; color: #5b5ef4; flex-shrink: 0;
  border: 1.5px solid rgba(91,94,244,0.1);
}
.mt-q-marks {
  font-size: 0.72rem; font-weight: 800; color: #64748b;
  margin-left: auto; background: rgba(248,249,255,0.8);
  padding: 0.2rem 0.6rem; border-radius: 50px;
}
.mt-q-text { font-weight: 700; font-size: 0.95rem; line-height: 1.7; margin-bottom: 0.75rem; }
.mt-options { display: flex; flex-direction: column; gap: 0.5rem; }
.mt-option {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(91,94,244,0.08); border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: 700; font-size: 0.9rem;
  background: rgba(255,255,255,0.6);
}
.mt-option:hover {
  border-color: #5b5ef4; background: rgba(240,242,255,0.7);
  transform: translateX(4px);
}
.mt-option.selected {
  border-color: #5b5ef4; background: #eef0ff;
  box-shadow: 0 2px 12px rgba(91,94,244,0.1);
}
.mt-option-letter {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #f0f2ff, #f5f0ff);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 0.78rem; color: #5b5ef4; flex-shrink: 0;
  border: 1.5px solid rgba(91,94,244,0.1);
  transition: all 0.25s;
}
.mt-option.selected .mt-option-letter {
  background: linear-gradient(135deg, #5b5ef4, #7c3aed); color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(91,94,244,0.3);
}
.mt-textarea {
  width: 100%; padding: 0.8rem 1rem;
  border: 2px solid rgba(91,94,244,0.1); border-radius: 14px;
  font-family: 'Nunito',sans-serif; font-size: 0.95rem;
  min-height: 100px; resize: vertical;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: rgba(255,255,255,0.7);
}
.mt-textarea:focus {
  outline: none; border-color: #5b5ef4;
  box-shadow: 0 0 0 4px rgba(91,94,244,0.08);
  background: white;
}
.mt-textarea.long { min-height: 160px; }

/* Submit Bar */
.mt-submit-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px) saturate(1.8);
  padding: 1rem 2rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: 0 -4px 24px rgba(91,94,244,0.08);
  border-top: 1px solid rgba(91,94,244,0.06);
  z-index: 20;
}
.mt-submit-info { flex: 1; font-weight: 700; font-size: 0.85rem; color: #64748b; }

/* Results */
.mt-results { padding: 2rem; }
.mt-results-inner { max-width: 800px; margin: 0 auto; }
.mt-result-hero {
  text-align: center; padding: 2.5rem;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px) saturate(1.6);
  border-radius: 24px;
  border: 1.5px solid rgba(91,94,244,0.1);
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 40px rgba(91,94,244,0.1);
  animation: resultPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes resultPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.mt-result-score {
  font-size: 4rem; font-weight: 900;
  background: linear-gradient(135deg, #5b5ef4, #7c3aed, #ec4899);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mt-result-grade { font-size: 1.5rem; font-weight: 900; margin: 0.5rem 0; }
.mt-result-pred { font-size: 0.95rem; color: #64748b; margin-top: 0.5rem; }
.mt-result-breakdown {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.mt-rb-card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-radius: 18px; padding: 1.2rem;
  border: 1.5px solid rgba(91,94,244,0.08);
  text-align: center;
  box-shadow: 0 4px 16px rgba(91,94,244,0.05);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mt-rb-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(91,94,244,0.1);
}
.mt-rb-value {
  font-size: 1.8rem; font-weight: 900;
  background: linear-gradient(135deg, #5b5ef4, #7c3aed);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mt-rb-label {
  font-size: 0.78rem; font-weight: 800; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.mt-result-answers { margin-bottom: 2rem; }
.mt-ra-item {
  background: rgba(255,255,255,0.85); border-radius: 18px;
  padding: 1.25rem; margin-bottom: 0.75rem;
  border: 2px solid;
  transition: all 0.2s;
}
.mt-ra-item.correct { border-color: rgba(134,239,172,0.5); background: rgba(240,253,244,0.7); }
.mt-ra-item.wrong { border-color: rgba(254,202,202,0.5); background: rgba(254,242,242,0.7); }
.mt-ra-item.partial { border-color: rgba(254,215,170,0.5); background: rgba(255,247,237,0.7); }
.mt-ra-q { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.5rem; }
.mt-ra-answer { font-size: 0.85rem; color: #64748b; }
.mt-ra-explain {
  font-size: 0.85rem; color: #334155; margin-top: 0.5rem;
  padding: 0.6rem 0.8rem;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(4px);
  border-radius: 10px;
}
.mt-result-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* Loading */
.mt-loading {
  position: fixed; inset: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.mt-loading-inner { text-align: center; }
.mt-loading-anim { font-size: 4rem; animation: loadBounce 1s infinite; }
@keyframes loadBounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-20px)} }
.mt-loading h2 { font-weight: 900; margin: 1rem 0 0.5rem; }
.mt-loading p { color: #64748b; }
.mt-loading-bar {
  width: 200px; height: 6px; background: #eeeeff;
  border-radius: 50px; overflow: hidden; margin: 1rem auto 0;
}
.mt-loading-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #5b5ef4, #7c3aed, #ec4899);
  border-radius: 50px; animation: loadBar 3s ease-in-out infinite;
}
@keyframes loadBar { 0%{width:0} 50%{width:80%} 100%{width:100%} }

@media (max-width: 768px) {
  .mt-exam-options { grid-template-columns: 1fr; }
  .mt-info-cards { grid-template-columns: 1fr; }
  .mt-test-header { flex-wrap: wrap; }
  .mt-result-breakdown { grid-template-columns: 1fr 1fr; }
  .mt-submit-bar { padding: 0.75rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mt-test-progress-fill::after { animation: none; }
  .mt-loading-anim { animation: none; }
  .mt-loading-fill { animation: none; width: 60%; }
  .mt-timer.warning, .mt-timer.danger { animation: none; }
}
