@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal-900: #134E4A;
  --teal-700: #0F766E;
  --teal-600: #0D9488;
  --teal-500: #14B8A6;
  --teal-100: #CCFBF1;
  --teal-50:  #F0FDFA;
  --red-600:  #DC2626;
  --red-100:  #FEE2E2;
  --green-600:#059669;
  --green-100:#D1FAE5;
  --amber-500:#F59E0B;
  --amber-100:#FEF3C7;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4B5563;
  --gray-400: #9CA3AF;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --white:    #FFFFFF;
  --bg:       #F8FAFC;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.10);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
}

html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--teal-600); text-decoration: none; }

/* ── MODAL ── */
.qz-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.qz-modal-box {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
.qz-modal-close {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px 16px 0 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  z-index: 2;
  flex-shrink: 0;
  transition: background .2s, color .2s;
}
.qz-modal-close:hover { background: var(--red-100); color: var(--red-600); }

/* ── LOCKED ROWS ── */
.quiz-row.row-locked  { opacity: .45; cursor: not-allowed; pointer-events: none; }
.quiz-row.row-today   { cursor: not-allowed; opacity: .7; }
.qs-status.locked     { background: var(--gray-200); color: var(--gray-600); }
.qs-status.today      { background: var(--amber-100); color: #92400E; }

/* ── INTRO WRAP ── */
.qz-intro-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 20px 0;
}

/* ── INTRO CARD ── */
.qz-intro-card {
  background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 60%, #0e7490 100%);
  border-radius: 16px;
  padding: 40px 40px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.qz-intro-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.qz-intro-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.8);
  transition: background .2s, color .2s;
  z-index: 1;
}
.qz-intro-close:hover { background: rgba(255,255,255,.25); color: #fff; }
.qz-intro-badge {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
  position: relative;
}
.qz-intro-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 12px;
  position: relative;
}
.qz-intro-sub {
  font-size: 16px;
  color: rgba(255,255,255,.8);
  line-height: 1.65;
  margin-bottom: 16px;
  position: relative;
}
.qz-intro-edu {
  font-size: 14px;
  color: rgba(255,255,255,.6);
  line-height: 1.7;
  margin-bottom: 28px;
  position: relative;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 16px;
}
.qz-intro-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
  position: relative;
}
.qz-stat { text-align: center; padding: 0 20px; }
.qz-stat-num {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.qz-stat-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 3px;
}
.qz-stat-sep { width: 1px; height: 32px; background: rgba(255,255,255,.15); }
.qz-intro-domains {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}
.qz-domain {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.82);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
}
@media (max-width: 600px) {
  .qz-intro-card { padding: 28px 20px 24px; }
  .qz-stat { padding: 0 12px; }
  .qz-stat-num { font-size: 20px; }
}

/* ── HEADER ── */
.qz-header {
  background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 100%);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.qz-logo {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.qz-logo svg { opacity: .9; }
.qz-help-btn {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.8);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, color .2s;
  flex-shrink: 0;
}
.qz-help-btn:hover { background: rgba(255,255,255,.22); color: #fff; }
.qz-reset-btn:hover { background: rgba(220,38,38,.25); color: #FCA5A5; }
.qz-reset-box {
  max-width: 420px;
  padding: 40px 36px 32px;
  text-align: center;
}
.qz-reset-icon { font-size: 40px; margin-bottom: 12px; }
.qz-reset-title { font-size: 20px; font-weight: 700; color: var(--gray-900); margin-bottom: 12px; }
.qz-reset-desc  { font-size: 14px; color: var(--gray-600); line-height: 1.65; margin-bottom: 28px; }
.qz-reset-actions { display: flex; gap: 12px; justify-content: center; }
.btn-danger {
  background: #DC2626; color: #fff; border: none; border-radius: 8px;
  padding: 10px 22px; font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background .2s;
}
.btn-danger:hover { background: #B91C1C; }
.qz-header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.9);
  font-size: 14px;
  font-weight: 500;
}
.qz-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.qz-score-badge {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

/* ── SETUP MODAL ── */
#qz-setup.qz-modal-overlay { background: rgba(0,0,0,.45); backdrop-filter: blur(3px); }
.qz-setup-box {
  max-width: 480px;
  padding: 32px 36px 36px;
}
.qz-setup-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}
.qz-setup-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--teal-700);
  margin-bottom: 6px;
}
.qz-setup-sub {
  font-size: 13px;
  color: var(--gray-400);
}
.qz-setup-section {
  margin-bottom: 20px;
}
.qz-setup-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 10px;
}
@media(max-width:500px) {
  .qz-setup-box { padding: 24px 20px 28px; }
}

/* ── HERO / START PAGE ── */
.qz-hero {
  background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 100%);
  padding: 60px 20px 80px;
  text-align: center;
  color: #fff;
}
.qz-hero h1 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
}
.qz-hero p {
  font-size: 16px;
  opacity: .85;
  max-width: 500px;
  margin: 0 auto;
}

/* ── SETUP CARD ── */
.qz-setup-wrap {
  max-width: 680px;
  margin: -40px auto 0;
  padding: 0 20px 60px;
}
.qz-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 24px;
}
.qz-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--gray-900);
}
.qz-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--gray-700);
}

/* Avatar grid */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}
@media(max-width:480px){ .avatar-grid { grid-template-columns: repeat(4,1fr); } }
.avatar-btn {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid var(--gray-200);
  background: var(--gray-100);
  cursor: pointer;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, transform .15s;
}
.avatar-btn:hover { border-color: var(--teal-500); transform: scale(1.08); }
.avatar-btn.selected { border-color: var(--teal-600); background: var(--teal-50); box-shadow: 0 0 0 3px rgba(13,148,136,.2); }

/* Name input */
.qz-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: var(--font);
  outline: none;
  transition: border-color .15s;
  color: var(--gray-900);
  margin-top: 8px;
}
.qz-input:focus { border-color: var(--teal-500); }

.qz-setup-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray-400);
  font-size: 13px;
  margin: 16px 0 4px;
}
.qz-setup-divider::before,
.qz-setup-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}
.hdr-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* ── PROFILE MODAL ── */
.qz-profile-box {
  max-width: 360px;
  padding: 0;
  overflow: hidden;
}
.qz-profile-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 32px 36px;
  text-align: center;
}
.qz-profile-avatar-wrap {
  margin-bottom: 20px;
}
.qz-profile-avatar-lg {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--teal-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  overflow: hidden;
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--teal-500);
}
.qz-profile-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.qz-profile-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}
.qz-profile-email {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 28px;
  min-height: 18px;
}
.qz-profile-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--gray-100);
  border-radius: 12px;
  padding: 16px 8px;
  width: 100%;
  margin-bottom: 28px;
}
.qz-pstat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.qz-pstat-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--teal-700);
  line-height: 1;
}
.qz-pstat-label {
  font-size: 11px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.qz-pstat-sep {
  width: 1px;
  height: 36px;
  background: var(--gray-200);
}
.qz-profile-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: background .2s, color .2s;
  font-family: inherit;
}
.qz-profile-logout-btn:hover {
  background: var(--red-100);
  border-color: var(--red-600);
  color: var(--red-600);
}

/* ── CATEGORY TABLE LAYOUT ── */
.qz-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* Header coloane — o singură dată, deasupra tuturor cardurilor */
.quiz-col-header {
  display: grid;
  grid-template-columns: 64px 1fr 44px 38px;
  align-items: center;
  gap: 0;
  padding: 0 20px 8px 20px;
  margin-bottom: 4px;
}
.quiz-col-header span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-400);
}
.quiz-col-header .qch-score { display: none; }
.quiz-col-header .qch-num   { text-align: center; }

/* Carduri categorii */
.cat-card-new {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  margin-bottom: 20px;
}

.cat-card-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--gray-100);
}
.cat-card-accent {
  width: 4px;
  height: 36px;
  border-radius: 2px;
  flex-shrink: 0;
}
.cat-card-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #E5E7EB;
  flex-shrink: 0;
  transition: background 0.35s;
}
.cat-card-title { font-size: 15px; font-weight: 700; color: var(--gray-900); flex: 1; }
.cat-card-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  background: var(--gray-100);
  padding: 3px 10px;
  border-radius: 20px;
}

/* Rânduri quiz */
.qr-ring { display:flex; align-items:center; justify-content:center; }
.quiz-row {
  display: grid;
  grid-template-columns: 64px 1fr 44px 38px;
  align-items: center;
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  transition: background .12s, transform .12s;
  gap: 0;
}
.quiz-row:last-child { border-bottom: none; }
.quiz-row:hover { background: var(--teal-50); }
.quiz-row.row-perfect { background: #F0FDF9; }
.quiz-row.row-perfect:hover { background: #E6FBF5; }

.qr-num {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  gap: 3px;
}
.qr-num-val {
  font-size: 18px;
  font-weight: 800;
  color: #6B7280;
  line-height: 1;
}
.qr-num-label { display: none; }
.qr-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #9CA3AF;
  margin-top: 3px;
  line-height: 1;
}
.qr-score-wrap { display: none; }
.quiz-row-exam {
  border-top: 2px dashed #E5E7EB;
  background: #FAFAFA;
}
.quiz-row-exam .qr-title {
  font-weight: 700;
  color: var(--gray-700);
}
.qr-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
  padding-right: 12px;
}
.qr-score-wrap { text-align: center; }
.qs-score { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.qs-stars { display: inline-flex; gap: 1px; font-size: 13px; line-height: 1; }
.qs-star { color: #E5E7EB; }
.qs-star.on { color: #F59E0B; }
.qs-pct-perfect { font-size: 10px; font-weight: 700; color: var(--green-600); letter-spacing: .02em; }

.qs-bar-bg {
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  margin-right: 12px;
}
.qs-bar-fill {
  height: 100%;
  background: var(--teal-500);
  border-radius: 3px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.row-perfect .qs-bar-fill { background: var(--green-600); }

.qs-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.qs-status.not-started { background: var(--gray-100); color: var(--gray-400); }
.qs-status.in-progress { background: var(--amber-100); color: #92400E; }
.qs-status.perfect     { background: var(--green-100); color: var(--green-600); }

.qr-arrow {
  color: var(--gray-300);
  display: flex;
  justify-content: center;
  transition: color .12s, transform .12s;
}
.quiz-row:hover .qr-arrow { color: var(--teal-500); transform: translateX(2px); }

@media(max-width:600px) {
  .quiz-col-header { display: none; }
  .quiz-row { grid-template-columns: 56px 1fr 40px 32px; padding: 12px 14px; }
  .qr-ring  { display: none; }
  .qr-title { font-size: 13px; }
  .qr-score-wrap { grid-column: 2; grid-row: 1; }
  .qs-bar-bg { grid-column: 1 / -1; grid-row: 2; margin: 6px 0 0; }
  .td-status { display: none; }
  .qr-arrow  { display: none; }
}

/* ── PLAY HEADER ── */
.play-header-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.play-header-bar a { color: var(--gray-500); font-size: 14px; display:flex; align-items:center; gap:4px; }
.play-header-bar a:hover { color: var(--teal-600); }
.play-header-bar .sep { color: var(--gray-300); }
.play-header-bar .play-cat-label { font-size: 13px; color: var(--gray-500); }
.play-header-bar .play-title { font-weight: 600; font-size: 14px; color: var(--gray-900); }
.play-header-bar .play-timer-label {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal-700);
  background: var(--teal-50);
  padding: 4px 12px;
  border-radius: 20px;
}

/* ── PLAY PAGE ── */
.play-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}
.play-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--gray-500);
}
.play-meta strong { color: var(--gray-900); font-weight: 600; }
.play-progress {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}
.progress-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--gray-200);
  transition: background .3s;
}
.progress-dot.done    { background: var(--green-600); }
.progress-dot.wrong   { background: var(--red-600); }
.progress-dot.current { background: var(--teal-500); }

/* Timer */
.timer-wrap {
  margin-bottom: 20px;
  position: relative;
}
.timer-bar-bg {
  height: 8px;
  border-radius: 4px;
  background: var(--gray-200);
  overflow: hidden;
}
.timer-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--teal-600);
  transition: width .05s linear, background .5s;
}
.timer-count {
  position: absolute;
  right: 0;
  top: -22px;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-600);
}

/* Question card */
.question-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 20px;
  border: 2px solid transparent;
  transition: border-color .2s;
}
.question-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-600);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.question-text {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--gray-900);
}

/* Answer options */
.answers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media(max-width:500px){ .answers-grid { grid-template-columns: 1fr; } }
.answer-btn {
  padding: 16px 20px;
  border-radius: 10px;
  border: 2px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--gray-800);
  text-align: left;
  line-height: 1.4;
  transition: all .15s;
  position: relative;
}
.answer-btn:hover:not(:disabled) {
  border-color: var(--teal-500);
  background: var(--teal-50);
  color: var(--teal-700);
  transform: translateY(-1px);
}
.answer-btn.selected   { border-color: var(--teal-600); background: var(--teal-50); color: var(--teal-700); }
.answer-btn.correct    { border-color: var(--green-600)!important; background: var(--green-100)!important; color: var(--green-600)!important; }
.answer-btn.wrong      { border-color: var(--red-600)!important;   background: var(--red-100)!important;   color: var(--red-600)!important;   }
.answer-btn.cheat-hint { border-left: 4px solid var(--amber-500)!important; background: var(--amber-100)!important; }
.answer-btn:disabled   { cursor: default; }
.answer-letter {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 11px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Feedback toast */
.feedback-toast {
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
  align-items: center;
  gap: 10px;
}
.feedback-toast.show { display: flex; }
.feedback-toast.correct { background: var(--green-100); color: var(--green-600); }
.feedback-toast.wrong   { background: var(--red-100);   color: var(--red-600); }
.feedback-toast .fb-icon { font-size: 18px; }
.feedback-toast .fb-next {
  margin-left: auto;
  font-size: 12px;
  opacity: .7;
}

/* ── RESULT SUMMARY ── */
.res-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.res-summary-item {
  flex: 1;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.res-summary-item.correct { background: var(--green-100); }
.res-summary-item.wrong   { background: var(--red-100); }
.res-summary-sep { width: 1px; background: var(--gray-200); align-self: stretch; }
.rsi-icon  { font-size: 24px; }
.rsi-val   { font-size: 36px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.rsi-label { font-size: 13px; font-weight: 500; color: var(--gray-600); }
.res-summary-item.correct .rsi-val { color: var(--green-600); }
.res-summary-item.wrong   .rsi-val { color: var(--red-600); }

/* ── RESULT PAGE ── */
.result-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  text-align: center;
}
.result-emoji {
  font-size: 64px;
  margin-bottom: 16px;
  display: block;
  animation: pop .4s cubic-bezier(.68,-0.55,.27,1.55);
}
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.result-score {
  font-size: 72px;
  font-weight: 800;
  color: var(--teal-700);
  line-height: 1;
  margin-bottom: 8px;
}
.result-score span { font-size: 36px; color: var(--gray-400); font-weight: 500; }
.result-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.result-sub   { font-size: 15px; color: var(--gray-500); margin-bottom: 32px; }
.result-stars { font-size: 36px; margin-bottom: 24px; letter-spacing: 4px; }

.result-breakdown {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  text-align: left;
  margin-bottom: 28px;
  overflow: hidden;
}
.result-breakdown h4 {
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--gray-100);
}
.breakdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
}
.breakdown-item:last-child { border-bottom: none; }
.breakdown-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.breakdown-q { color: var(--gray-700); line-height: 1.4; }
.breakdown-chosen { font-size: 12px; color: #9CA3AF; margin-top: 4px; }
.breakdown-chosen s { color: #DC2626; text-decoration-color: #DC2626; }
.breakdown-a { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.breakdown-a strong { color: var(--green-600); }

.result-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-primary {
  padding: 14px 24px;
  background: var(--teal-600);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background .15s, transform .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover { background: var(--teal-700); transform: translateY(-1px); color: #fff; }
.btn-outline {
  padding: 12px 24px;
  background: transparent;
  color: var(--teal-700);
  border: 2px solid var(--teal-600);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-outline:hover { background: var(--teal-50); color: var(--teal-700); }
.btn-ghost {
  padding: 10px 20px;
  background: transparent;
  color: var(--gray-500);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  transition: color .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-ghost:hover { color: var(--gray-700); }

/* Perfect animation */
.confetti-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, #0D9488, #10B981, #F59E0B, #EF4444, #8B5CF6, #0D9488);
  background-size: 200% 100%;
  animation: rainbow 1s linear infinite;
}
@keyframes rainbow { to { background-position: 200% 0; } }

/* Setup submit */
.setup-actions { margin-top: 24px; text-align: center; }

/* Responsive */
@media(max-width:640px){
  .qz-card { padding: 20px; }
  .play-wrap, .result-wrap { padding: 20px 16px 40px; }
  .question-card { padding: 20px; }
  .question-text { font-size: 16px; }
  .qz-hero { padding: 40px 16px 60px; }
}

/* ── DIPLOMĂ ── */
.diploma-card {
  background: #fff;
  border: 2px solid #D4AF37;
  border-radius: 12px;
  padding: 52px 60px 44px;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 40px rgba(212,175,55,.15), 0 2px 8px rgba(0,0,0,.06);
  background-image: radial-gradient(ellipse at top, #FFFDF0 0%, #fff 60%);
}
.diploma-corner {
  position: absolute;
  width: 32px;
  height: 32px;
  border-color: #D4AF37;
  border-style: solid;
}
.diploma-corner-tl { top: 10px; left: 10px;  border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.diploma-corner-tr { top: 10px; right: 10px; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
.diploma-corner-bl { bottom: 10px; left: 10px;  border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }
.diploma-corner-br { bottom: 10px; right: 10px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }
.diploma-seal {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 6px rgba(212,175,55,.4));
}
.diploma-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #B8960C;
  margin-bottom: 4px;
}
.diploma-issuer {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 28px;
  letter-spacing: .04em;
}
.diploma-certifies {
  font-size: 15px;
  color: var(--gray-500, #6B7280);
  margin-bottom: 8px;
  font-style: italic;
}
.diploma-name {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  color: var(--teal-900);
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: .02em;
  margin-bottom: 20px;
  line-height: 1.2;
}
.diploma-text {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 24px;
}
.diploma-modules {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.diploma-modules span {
  font-size: 13px;
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-100);
  padding: 5px 14px;
  border-radius: 100px;
  font-weight: 500;
}
.diploma-footer {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  gap: 40px;
  border-top: 1px solid var(--gray-200);
  padding-top: 24px;
}
.diploma-sig-block, .diploma-date-block { text-align: center; flex: 1; }
.diploma-sig-line {
  width: 120px;
  height: 1px;
  background: var(--gray-300);
  margin: 0 auto 6px;
}
.diploma-sig-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800, #1F2937);
}
.diploma-sig-role {
  display: block;
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 2px;
}
@media (max-width: 600px) {
  .diploma-card { padding: 36px 20px 28px; }
  .diploma-footer { flex-direction: column; gap: 20px; align-items: center; }
}

/* ── DASHBOARD ── */
.dash-wrap { padding: 32px 28px 28px; }
.dash-title { font-size: 20px; font-weight: 700; color: var(--gray-900); margin-bottom: 20px; }
.dash-pct-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.dash-pct-num { font-size: 36px; font-weight: 800; color: var(--teal-700); line-height: 1; }
.dash-pct-label { font-size: 14px; color: var(--gray-500); }
.dash-pct-bar-bg { height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; margin-bottom: 28px; }
.dash-pct-bar-fill { height: 100%; background: linear-gradient(90deg, var(--teal-600), var(--teal-500)); border-radius: 4px; transition: width .6s cubic-bezier(.4,0,.2,1); }
.dash-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--gray-400); margin-bottom: 10px; }
.dash-cat-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.dash-cat-item:last-child { border-bottom: none; }
.dash-cat-dot { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.dash-cat-body { flex: 1; min-width: 0; }
.dash-cat-name { display: block; font-size: 14px; font-weight: 600; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-cat-sub  { display: block; font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.dash-cat-bar-bg   { height: 4px; background: var(--gray-200); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.dash-cat-bar-fill { height: 100%; border-radius: 2px; transition: width .5s; }
.dash-done-check { font-size: 18px; flex-shrink: 0; }
.dash-exam-badge { font-size: 11px; font-weight: 600; background: #FEF3C7; color: #92400E; border-radius: 20px; padding: 3px 10px; flex-shrink: 0; white-space: nowrap; }
.dash-cert-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #B8960C; background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 8px; padding: 4px 10px; margin-top: 6px; text-decoration: none; transition: background .15s; }
.dash-cert-link:hover { background: #FEF3C7; color: #92400E; }

/* ── CERT SECTION în result ── */
.res-cert-section { margin-bottom: 20px; }
.res-cert-box { background: linear-gradient(135deg, #FFFDF0, #FFF7CC); border: 1.5px solid #D4AF37; border-radius: 14px; padding: 24px; text-align: center; }
.res-cert-icon  { font-size: 36px; line-height: 1; margin-bottom: 8px; }
.res-cert-title { font-size: 17px; font-weight: 700; color: #92400E; margin-bottom: 6px; }
.res-cert-sub   { font-size: 13px; color: #B45309; margin-bottom: 16px; line-height: 1.5; }
.res-cert-btn   { background: #D97706; display: inline-flex; }
.res-cert-btn:hover { background: #B45309; color: #fff; }
