/* ===== CIF CyberAware Quiz — styles ===== */

/* --- Nudge card on About page banner --- */
.page-header.page-header-split {
  text-align: left;
  padding: 3rem 0;
}
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.page-header-text { flex: 1 1 320px; min-width: 0; }
.page-header-text p { margin: .35rem 0 0; }

.quiz-nudge {
  flex: 0 1 340px;
  position: relative;
  background: linear-gradient(135deg, rgba(200,169,81,.18), rgba(42,125,225,.18));
  border: 1px solid rgba(200,169,81,.35);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  overflow: hidden;
}
.quiz-nudge::before {
  content: "";
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,169,81,.35), transparent 70%);
}
.quiz-nudge-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--gold);
  color: var(--navy);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: .25rem .6rem;
  border-radius: 999px;
  text-transform: uppercase;
  margin-bottom: .6rem;
}
.quiz-nudge h3 {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: .35rem;
}
.quiz-nudge p {
  color: rgba(255,255,255,.75);
  font-size: .84rem;
  margin-bottom: .75rem;
  max-width: none;
}
.quiz-nudge .quiz-nudge-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: .9rem;
  font-size: .75rem;
  color: rgba(255,255,255,.7);
}
.quiz-nudge .quiz-nudge-stats strong {
  color: var(--gold-light);
  display: block;
  font-size: 1rem;
  font-weight: 700;
}
.quiz-nudge .quiz-nudge-cta {
  background: var(--gold);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1.1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
  transition: transform .15s, background .15s;
  position: relative;
  z-index: 1;
}
.quiz-nudge .quiz-nudge-cta:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}
.quiz-nudge .quiz-nudge-cta::after {
  content: "\2192";
  transition: transform .15s;
}
.quiz-nudge .quiz-nudge-cta:hover::after { transform: translateX(3px); }

@media (max-width: 860px) {
  .page-header.page-header-split { text-align: center; }
  .page-header-row { justify-content: center; }
  .quiz-nudge { flex: 1 1 100%; }
}

/* ==================================================== */
/* Quiz page proper                                     */
/* ==================================================== */

.quiz-shell {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.quiz-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 3.5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.quiz-hero::before,
.quiz-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.quiz-hero::before {
  width: 280px; height: 280px;
  background: rgba(200,169,81,.3);
  top: -80px; left: -60px;
}
.quiz-hero::after {
  width: 220px; height: 220px;
  background: rgba(42,125,225,.3);
  bottom: -60px; right: -40px;
}
.quiz-hero-inner { position: relative; z-index: 1; }
.quiz-hero .eyebrow {
  display: inline-block;
  padding: .3rem .8rem;
  border-radius: 999px;
  background: rgba(200,169,81,.2);
  color: var(--gold-light);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.quiz-hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: .4rem;
}
.quiz-hero .highlight {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.quiz-hero p {
  color: rgba(255,255,255,.75);
  max-width: 560px;
  margin: 0 auto 1.5rem;
  font-size: 1rem;
}

.quiz-live-stats {
  display: inline-flex;
  gap: 1.75rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  padding: .75rem 1.25rem;
  border-radius: 999px;
  font-size: .8rem;
  color: rgba(255,255,255,.8);
}
.quiz-live-stats .live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  margin-right: .4rem;
  animation: pulse 1.8s infinite;
  vertical-align: middle;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.8); }
}

/* Screens */
.quiz-screen { display: none; }
.quiz-screen.active { display: block; }

/* Difficulty picker */
.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: -2.5rem auto 0;
  position: relative;
  z-index: 2;
  max-width: 860px;
  padding: 0 1.25rem 3rem;
}
.difficulty-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 14px;
  padding: 1.5rem 1.35rem;
  cursor: pointer;
  transition: all .2s;
  text-align: left;
  font-family: inherit;
  position: relative;
}
.difficulty-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(10,22,40,.1);
}
.difficulty-card.easy     { border-top: 4px solid var(--success); }
.difficulty-card.medium   { border-top: 4px solid var(--gold); }
.difficulty-card.hard     { border-top: 4px solid var(--danger); }
.difficulty-card .lvl-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  border-radius: 10px;
  margin-bottom: .75rem;
}
.difficulty-card.easy   .lvl-icon { background: rgba(39,174,96,.12);  color: var(--success); }
.difficulty-card.medium .lvl-icon { background: rgba(200,169,81,.15); color: var(--gold-dark); }
.difficulty-card.hard   .lvl-icon { background: rgba(231,76,60,.12);  color: var(--danger); }

.difficulty-card h3 {
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .25rem;
}
.difficulty-card .lvl-desc {
  font-size: .82rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: .75rem;
}
.difficulty-card .lvl-meta {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--gray-600);
  padding-top: .75rem;
  border-top: 1px solid var(--gray-100);
}
.difficulty-card .lvl-meta strong {
  color: var(--navy);
  font-weight: 700;
  display: block;
  font-size: .9rem;
}

/* Quiz body */
.quiz-body {
  background: var(--gray-50);
  min-height: 60vh;
  padding: 2.5rem 0;
}
.quiz-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(10,22,40,.06);
  padding: 1.75rem;
  max-width: 720px;
  margin: 0 auto;
}

/* Game HUD */
.quiz-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap;
}
.hud-cell {
  display: flex;
  gap: .5rem;
  align-items: center;
  font-size: .85rem;
  color: var(--gray-600);
}
.hud-cell strong {
  color: var(--navy);
  font-weight: 700;
  font-size: 1rem;
}
.hud-streak { color: var(--danger); font-weight: 700; }

.quiz-progress {
  height: 8px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 999px;
  transition: width .4s;
}

.quiz-question {
  color: var(--navy);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 1.25rem;
}
.quiz-category {
  font-size: .75rem;
  color: var(--gold-dark);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 1.25rem;
}
.quiz-option {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  padding: .9rem 1rem;
  font-family: inherit;
  font-size: .92rem;
  text-align: left;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--gray-800);
}
.quiz-option:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(42,125,225,.03);
}
.quiz-option .opt-key {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--gray-100);
  color: var(--navy);
  font-weight: 700;
  font-size: .82rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.quiz-option.correct {
  border-color: var(--success);
  background: rgba(39,174,96,.08);
  color: var(--navy);
}
.quiz-option.correct .opt-key {
  background: var(--success);
  color: var(--white);
}
.quiz-option.wrong {
  border-color: var(--danger);
  background: rgba(231,76,60,.08);
  color: var(--navy);
}
.quiz-option.wrong .opt-key {
  background: var(--danger);
  color: var(--white);
}
.quiz-option:disabled { cursor: default; }

.quiz-feedback {
  background: var(--gray-50);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--accent);
  font-size: .88rem;
  line-height: 1.55;
  color: var(--gray-800);
}
.quiz-feedback.correct { border-color: var(--success); }
.quiz-feedback.wrong   { border-color: var(--danger); }
.quiz-feedback strong  { color: var(--navy); display: block; margin-bottom: .2rem; }

.quiz-actions {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.quiz-btn {
  background: var(--navy);
  color: var(--white);
  border: 0;
  padding: .75rem 1.3rem;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.quiz-btn:active { transform: translateY(1px); }
.quiz-btn-gold   { background: var(--gold); color: var(--navy); }
.quiz-btn-gold:hover { background: var(--gold-light); }
.quiz-btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--gray-200);
}
.quiz-btn-outline:hover { border-color: var(--navy); }

/* Streak toast (appears briefly on correct) */
.streak-toast {
  position: fixed;
  top: 90px;
  right: 24px;
  background: var(--navy);
  color: var(--white);
  padding: .75rem 1.1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: .85rem;
  box-shadow: 0 10px 30px rgba(10,22,40,.25);
  border-left: 4px solid var(--gold);
  transform: translateX(120%);
  transition: transform .3s;
  z-index: 500;
  max-width: 280px;
}
.streak-toast.show { transform: translateX(0); }
.streak-toast .small { font-weight: 500; opacity: .8; font-size: .75rem; display: block; margin-top: .15rem; }

/* Results screen */
.results-hero {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
}
.results-score {
  display: inline-block;
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.results-score .denom { color: var(--gray-400); font-size: 1.4rem; font-weight: 600; }
.results-label {
  font-size: 1.1rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}
.results-badge {
  display: inline-block;
  padding: .4rem 1rem;
  border-radius: 999px;
  background: rgba(200,169,81,.15);
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}
.results-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .75rem;
  margin: 1.25rem 0;
}
.results-stat {
  background: var(--gray-50);
  padding: .75rem;
  border-radius: 10px;
  text-align: center;
}
.results-stat strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
}
.results-stat span {
  font-size: .75rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.results-social {
  background: rgba(39,174,96,.08);
  color: var(--success);
  padding: .75rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: 1.25rem;
  text-align: center;
}
.results-name {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
}
.results-name input {
  flex: 1;
  padding: .7rem .9rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-family: inherit;
  font-size: .9rem;
}
.results-name input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}

/* Leaderboard */
.leaderboard-wrap {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 1.5rem;
  margin: 2rem auto;
  max-width: 720px;
}
.leaderboard-wrap h3 {
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.leaderboard-tabs {
  display: flex;
  gap: .3rem;
  padding: .25rem;
  background: var(--gray-100);
  border-radius: 10px;
  margin-bottom: 1rem;
}
.leaderboard-tab {
  flex: 1;
  padding: .5rem;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-600);
  border-radius: 7px;
  cursor: pointer;
  transition: all .15s;
}
.leaderboard-tab.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 2px 4px rgba(10,22,40,.06);
}
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.leaderboard-row {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: center;
  gap: .75rem;
  padding: .65rem .85rem;
  background: var(--gray-50);
  border-radius: 8px;
  font-size: .88rem;
}
.leaderboard-row.top1 { background: linear-gradient(135deg, rgba(200,169,81,.15), rgba(200,169,81,.05)); }
.leaderboard-row.top2 { background: linear-gradient(135deg, rgba(155,163,181,.15), rgba(155,163,181,.05)); }
.leaderboard-row.top3 { background: linear-gradient(135deg, rgba(168,139,58,.15), rgba(168,139,58,.05)); }
.leaderboard-row.me   { outline: 2px solid var(--accent); background: rgba(42,125,225,.06); }
.leaderboard-rank {
  text-align: center;
  font-weight: 800;
  color: var(--navy);
}
.leaderboard-row.top1 .leaderboard-rank { color: var(--gold-dark); }
.leaderboard-name {
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.leaderboard-name .sub {
  display: block;
  font-weight: 400;
  font-size: .72rem;
  color: var(--gray-600);
}
.leaderboard-score {
  font-weight: 700;
  color: var(--navy);
}
.leaderboard-date {
  font-size: .72rem;
  color: var(--gray-400);
}
.leaderboard-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--gray-600);
  font-size: .9rem;
}

/* Confetti-lite pop for correct answer */
@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}
.quiz-card.pop { animation: pop .35s ease; }

/* ==================================================== */
/* Share badge + modal                                  */
/* ==================================================== */

/* Leaderboard row — make room for share icon */
.leaderboard-row { grid-template-columns: 40px 1fr auto auto 36px; }
@media (max-width: 540px) {
  .leaderboard-row { grid-template-columns: 32px 1fr auto 36px; }
  .leaderboard-date { display: none; }
}

.share-icon-btn {
  background: transparent;
  border: 1px solid var(--gray-200);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--gray-600);
  cursor: pointer;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.share-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(42,125,225,.06);
}

/* Share CTA block on results */
.share-block {
  margin: 1.5rem 0 .5rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(42,125,225,.06), rgba(200,169,81,.06));
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  text-align: center;
}
.share-block h4 {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .35rem;
}
.share-block p {
  color: var(--gray-600);
  font-size: .85rem;
  margin-bottom: .85rem;
}

/* Share modal */
.share-modal {
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  overflow-y: auto;
}
.share-modal.open { display: flex; }
.share-modal-body {
  background: var(--white);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(10,22,40,.35);
  max-height: 90vh;
  overflow-y: auto;
}
.share-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.share-modal-head h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}
.share-modal-close {
  background: var(--gray-100);
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--gray-800);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}
.share-modal-close:hover { background: var(--gray-200); }

.share-preview-wrap {
  background: var(--gray-50);
  border-radius: 12px;
  padding: .75rem;
  margin-bottom: 1rem;
}
.share-preview {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(10,22,40,.15);
}

.share-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .55rem;
  margin-bottom: .75rem;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem .85rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  color: var(--white);
  transition: transform .05s, filter .15s;
  text-decoration: none;
}
.share-btn:hover { filter: brightness(1.1); }
.share-btn:active { transform: translateY(1px); }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.x        { background: #000000; }
.share-btn.facebook { background: #1877f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.copy     { background: var(--gray-800); }
.share-btn.download { background: var(--gold); color: var(--navy); }
.share-btn.native   { background: var(--accent); }

.share-note {
  font-size: .75rem;
  color: var(--gray-600);
  text-align: center;
  line-height: 1.5;
}
.share-note strong { color: var(--navy); }

.share-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--navy);
  color: var(--white);
  padding: .7rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .85rem;
  box-shadow: 0 10px 30px rgba(10,22,40,.3);
  opacity: 0;
  transition: all .25s;
  z-index: 1100;
  pointer-events: none;
}
.share-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
