/* ============================================
   KidMind AI — Kid-friendly styles
   ============================================ */

/* CSS reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  min-height: 100vh;
  color: #333;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* App layout */
.app-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem;
}

/* Screens — only one visible at a time */
.screen {
  display: none;
  animation: fadeIn 0.4s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header & logo */
.header {
  text-align: center;
  padding: 1.5rem 0 1rem;
}

.logo {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  font-weight: 800;
}

.tagline {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin-top: 0.25rem;
}

/* Cards */
.card {
  background: #fff;
  border-radius: 24px;
  padding: 1.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.card h2 {
  font-size: 1.5rem;
  color: #5b21b6;
  margin-bottom: 0.25rem;
}

.card-subtitle {
  color: #6b7280;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Form */
.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #374151;
  font-size: 0.95rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

/* Buttons */
.btn {
  display: inline-block;
  border: none;
  border-radius: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.85rem 1.5rem;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn-large {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.15rem;
  margin-top: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

.btn-secondary {
  background: linear-gradient(135deg, #34d399, #059669);
  color: #fff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #10b981, #047857);
}

.btn-accent {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Error message */
.error-message {
  color: #dc2626;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.25rem;
  margin: 0.5rem 0;
}

.error-message:empty {
  display: none;
}

/* Quiz screen */
.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

#question-number {
  color: #5b21b6;
  font-size: 1.05rem;
}

/* Progress bar */
.progress-bar-container {
  width: 100%;
  height: 14px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #34d399, #8b5cf6, #f472b6);
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* Category badge */
.category-badge {
  display: inline-block;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.question-text {
  font-size: clamp(1.15rem, 4vw, 1.45rem);
  color: #1f2937;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

/* Answer options */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.option-btn {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  border: 3px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.option-btn:hover {
  border-color: #c4b5fd;
  background: #f5f3ff;
}

.option-btn.selected {
  border-color: #8b5cf6;
  background: #ede9fe;
  color: #5b21b6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Result screen */
.score-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.score-stat {
  background: #f3f4f6;
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
}

.score-stat.correct {
  background: #d1fae5;
}

.score-stat.wrong {
  background: #fee2e2;
}

.score-stat.percentage {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

.score-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.score-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: #1f2937;
}

.score-stat.correct .score-value {
  color: #059669;
}

.score-stat.wrong .score-value {
  color: #dc2626;
}

.score-stat.percentage .score-value {
  color: #6d28d9;
  font-size: 2rem;
}

.score-message {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #5b21b6;
  padding: 0.75rem;
  background: #faf5ff;
  border-radius: 14px;
  margin-bottom: 1.5rem;
}

/* Answer review */
.review-title {
  font-size: 1.15rem;
  color: #374151;
  margin-bottom: 0.75rem;
}

.review-list {
  max-height: 400px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  padding-right: 0.25rem;
}

.review-item {
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #fafafa;
}

.review-item.correct-answer {
  border-color: #6ee7b7;
  background: #ecfdf5;
}

.review-item.wrong-answer {
  border-color: #fca5a5;
  background: #fef2f2;
}

.review-question {
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.review-detail {
  font-size: 0.88rem;
  color: #4b5563;
  margin-bottom: 0.25rem;
}

.review-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.review-status.status-correct {
  background: #059669;
  color: #fff;
}

.review-status.status-wrong {
  background: #dc2626;
  color: #fff;
}

.review-explanation {
  font-size: 0.85rem;
  color: #6b7280;
  font-style: italic;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed #d1d5db;
}

/* Result action buttons */
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.result-actions .btn-large {
  margin-top: 0;
}

/* Print styles */
@media print {
  body {
    background: #fff;
  }

  .header,
  .result-actions {
    display: none;
  }

  .app-container {
    max-width: 100%;
    padding: 0;
  }

  .card {
    box-shadow: none;
    padding: 0;
  }

  .review-list {
    max-height: none;
    overflow: visible;
  }
}

/* Responsive */
@media (min-width: 480px) {
  .options-grid {
    grid-template-columns: 1fr 1fr;
  }

  .score-summary {
    grid-template-columns: repeat(4, 1fr);
  }

  .score-stat.percentage {
    grid-column: auto;
  }

  .result-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .result-actions .btn-large {
    flex: 1 1 calc(33% - 0.5rem);
    min-width: 140px;
  }
}

@media (min-width: 600px) {
  .app-container {
    padding: 2rem 1.5rem;
  }

  .card {
    padding: 2rem 2.25rem;
  }
}

/* ============================================
   Extensions — profile, topbar, splash, modal
   (preserves original kid-friendly theme)
   ============================================ */

.hidden { display: none !important; }

body.has-topbar .app-container { padding-top: 4.25rem; }

.header-compact { padding: 0.75rem 0 0.5rem; }
.logo-sm { font-size: clamp(1rem, 4vw, 1.35rem) !important; }

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #374151;
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
  margin-bottom: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.85rem 1.5rem;
  width: 100%;
  margin-top: 0.5rem;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn-primary:active, .btn-secondary:active, .btn-ghost:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.4);
}

.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: linear-gradient(135deg, #34d399, #059669);
  color: #fff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.btn-secondary:hover { background: linear-gradient(135deg, #10b981, #047857); }

.btn-ghost {
  background: #f3f4f6;
  color: #6b7280;
  border: 2px solid #e5e7eb;
  box-shadow: none;
}

.btn-ghost:hover { background: #e5e7eb; }

.lang-grid { display: flex; flex-direction: column; gap: 0.75rem; }

.app-error-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 700;
  background: #dc2626; color: #fff; text-align: center;
  padding: 0.75rem 1rem; font-size: 0.875rem;
}

.theme-toggle {
  position: fixed; top: 1rem; left: 1rem; z-index: 600;
  background: #fff; border: none; border-radius: 50%;
  width: 44px; height: 44px; font-size: 1.25rem; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

body.has-topbar .theme-toggle { top: 4.5rem; }

.app-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 0.55rem 1rem;
}

.app-topbar-inner {
  max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}

.topbar-title {
  font-weight: 800; font-size: clamp(0.9rem, 3.5vw, 1.1rem);
  color: #fff; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.profile-menu { position: relative; }
.profile-btn {
  display: flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.35);
  color: #fff; padding: 0.45rem 0.85rem; border-radius: 999px;
  font-weight: 700; font-size: 0.9rem; cursor: pointer;
}
.profile-btn:hover { background: rgba(255,255,255,0.3); }
.profile-btn-label { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800;
}
.profile-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px;
  background: #fff; border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18); padding: 0.5rem; z-index: 600;
}
.profile-dropdown-name {
  font-weight: 700; font-size: 0.9rem; padding: 0.5rem 0.75rem;
  color: #6d28d9; border-bottom: 1px solid #e5e7eb; margin-bottom: 0.25rem;
}
.profile-item {
  display: block; width: 100%; text-align: left; padding: 0.6rem 0.75rem;
  border: none; background: transparent; border-radius: 10px;
  font-size: 0.9rem; cursor: pointer; color: #374151;
}
.profile-item:hover { background: #f3f4f6; }
.profile-item-danger { color: #dc2626; }
.profile-divider { border: none; border-top: 1px solid #e5e7eb; margin: 0.35rem 0; }
.profile-info-grid p { margin-bottom: 0.75rem; font-size: 0.95rem; }
.masked-password { letter-spacing: 0.15em; font-weight: 700; color: #6b7280; }
.label-optional { font-weight: 500; color: #9ca3af; font-size: 0.85rem; }

.password-field {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.password-field input {
  flex: 1;
  margin-bottom: 0;
}

.btn-toggle-password {
  width: auto;
  min-width: 4.5rem;
  margin-top: 0;
  padding: 0.85rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
  color: #6d28d9;
  cursor: pointer;
}

.btn-toggle-password:hover { background: #f3e8ff; border-color: #c4b5fd; }

.form-error {
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.form-success {
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

#settings-edit-form.hidden { display: none !important; }
#settings-view-mode.hidden { display: none !important; }
.progress-list, .certificates-list { margin: 1rem 0; }
.progress-item, .cert-item {
  padding: 0.75rem 1rem; border: 2px solid #e5e7eb; border-radius: 14px;
  margin-bottom: 0.5rem; background: #f9fafb; font-size: 0.9rem;
}
.empty-state { color: #6b7280; text-align: center; padding: 1.5rem; }

#splash-screen.active {
  position: fixed; inset: 0; max-width: none;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #1a0a2e 0%, #0d0221 45%, #050010 100%);
  z-index: 300;
}

#splash-screen:not(.active) {
  display: none !important;
}

.splash-fireworks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.splash-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
}

.splash-credit-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.splash-sparkle {
  font-size: 1rem;
  animation: sparklePop 1.6s ease-in-out infinite;
}

.splash-sparkle--2 {
  animation-delay: 0.8s;
}

@keyframes sparklePop {
  0%, 100% { transform: scale(0.8) rotate(0deg); opacity: 0.5; }
  50% { transform: scale(1.2) rotate(12deg); opacity: 1; }
}

.splash-logo { font-size: 4rem; margin-bottom: 1rem; animation: bounce 1s ease infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.splash-title { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.splash-credit {
  font-size: 1.1rem;
  opacity: 0.95;
  font-style: italic;
  margin: 0;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.55), 0 0 24px rgba(139, 92, 246, 0.45);
  animation: splashGlow 2.5s ease-in-out infinite;
}
@keyframes splashGlow { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }

.flow-hint {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8b5cf6;
  margin-bottom: 0.35rem !important;
}

.dashboard-hint {
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.inline-link-row { margin-top: 1rem; margin-bottom: 0; text-align: center; }

.btn-inline-link {
  display: inline;
  width: auto;
  padding: 0.2rem 0.5rem;
  margin: 0;
  font-size: inherit;
  font-weight: 700;
  color: #6d28d9;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  border-radius: 6px;
}

.btn-inline-link:hover { color: #5b21b6; }

.footer-credit { opacity: 0.75; margin-top: 0.35rem; font-style: italic; }

/* Dark mode */
html[data-theme="dark"] body {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  color: #e5e7eb;
}

html[data-theme="dark"] .card {
  background: #1f2937;
  color: #f3f4f6;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .card h2 { color: #c4b5fd; }
html[data-theme="dark"] .card-subtitle,
html[data-theme="dark"] .dashboard-hint,
html[data-theme="dark"] label { color: #9ca3af; }

html[data-theme="dark"] input,
html[data-theme="dark"] select {
  background: #111827;
  border-color: #374151;
  color: #f9fafb;
}

html[data-theme="dark"] .profile-dropdown {
  background: #1f2937;
  color: #f3f4f6;
}

html[data-theme="dark"] .theme-toggle {
  background: #1f2937;
  color: #f9fafb;
}

.dashboard-card .welcome-text, .dashboard-card .age-text { text-align: center; }
.dashboard-card .welcome-text { font-size: 1.1rem; margin-bottom: 0.5rem; }
.dashboard-card .age-text { color: #6b7280; margin-bottom: 1.5rem; }
.dashboard-actions { display: flex; flex-direction: column; gap: 0.6rem; }

.quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.quiz-counter { font-size: 0.95rem; color: #6b7280; font-weight: 600; }
.quiz-category {
  background: #ede9fe; color: #6d28d9; padding: 0.25rem 0.75rem;
  border-radius: 999px; font-size: 0.75rem; font-weight: 700;
}
.quiz-question { font-size: clamp(1.15rem, 4vw, 1.45rem); color: #1f2937; margin-bottom: 1.25rem; line-height: 1.4; }
.quiz-options { display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.quiz-option-btn {
  text-align: left; padding: 1rem 1.25rem; font-size: 1.05rem; font-weight: 600;
  border: 3px solid #e5e7eb; border-radius: 16px; background: #f9fafb; color: #374151;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.quiz-option-btn:hover:not(:disabled) { border-color: #c4b5fd; background: #f5f3ff; }
.quiz-option-btn.selected { border-color: #8b5cf6; background: #ede9fe; color: #5b21b6; }
.quiz-option-btn.correct { border-color: #6ee7b7; background: #ecfdf5; }
.quiz-option-btn.wrong { border-color: #fca5a5; background: #fef2f2; }
.quiz-option-btn:disabled { cursor: default; }
.quiz-feedback { min-height: 1.5rem; font-size: 0.9rem; margin-bottom: 1rem; }
.feedback-correct { color: #059669; }
.feedback-wrong { color: #dc2626; }

.result-card-wrap { text-align: center; }
.result-card { padding: 1.5rem; border-radius: 16px; margin-bottom: 1rem; }
.result-pass { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border: 2px solid #6ee7b7; }
.result-fail { background: linear-gradient(135deg, #fff7ed, #ffedd5); border: 2px solid #fdba74; }
.result-card h3 { margin: 0 0 0.5rem; font-size: 1.35rem; }
.result-score { font-size: 2rem; font-weight: 800; color: #6d28d9; margin: 0.5rem 0; }
.result-wrong { color: #6b7280; font-size: 0.9rem; }
.result-message { margin-top: 0.75rem; font-size: 0.95rem; color: #6b7280; }

.screen { animation: screenIn 0.35s ease-out; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal {
  position: fixed; inset: 0; z-index: 800;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal.hidden { display: none !important; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.modal-card { position: relative; z-index: 1; width: 100%; max-width: 400px; text-align: center; }
.modal-card h3 { margin-bottom: 1rem; color: #5b21b6; }

.admin-quiz-controls {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #faf5ff, #f3e8ff);
  border: 2px dashed #c4b5fd;
  border-radius: 14px;
}
.admin-quiz-controls.hidden { display: none !important; }
.admin-quiz-controls__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.admin-quiz-controls__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #6d28d9;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.admin-quiz-controls__title {
  color: #5b21b6;
  font-size: 0.95rem;
  flex: 1;
}
.admin-quiz-controls__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.admin-test-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #6d28d9;
  cursor: pointer;
  margin-left: auto;
}
.admin-test-toggle input {
  width: auto;
  margin: 0;
  accent-color: #7c3aed;
}
.btn-sm { width: auto; padding: 0.45rem 0.85rem; font-size: 0.85rem; margin-top: 0; }
.admin-jump-select { flex: 1; min-width: 120px; margin-bottom: 0; }

@media (min-width: 480px) {
  .quiz-options { grid-template-columns: 1fr 1fr; }
  .profile-btn-label { display: inline; }
}

@media (min-width: 768px) {
  .lang-grid { flex-direction: row; }
  .lang-grid .btn-primary { flex: 1; }
}

@media (max-width: 480px) {
  .profile-btn-label { display: none; }
  .splash-title { font-size: 1.5rem; }
}
