/* ============================================================
   LEADERSHIP QUIZ — style.css
   Bootstrap 5 + Custom Theme | Dark Neon Blue
   GoDaddy shared hosting ready
   ============================================================ */

/* ── GOOGLE FONTS & RESET ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --neon:          #38bdf8;
  --neon-dim:      #7dd3fc;
  --bg-dark:       #0a1120;
  --card-bg:       rgba(22, 34, 60, 0.68);
  --card-border:   rgba(56, 189, 248, 0.22);
  --border-sub:    rgba(255, 255, 255, 0.09);
  --text:          #f1f5f9;
  --muted:         #94a3b8;
  --grad:          linear-gradient(135deg, #3b82f6, #38bdf8);
  --shadow-neon:   0 0 0 1px rgba(56,189,248,0.25),
                   0 8px 40px -8px rgba(56,189,248,0.45),
                   0 0 60px -15px rgba(56,189,248,0.3);
  --shadow-card:   0 8px 32px rgba(8, 14, 30, 0.55);
  --opt-red:       linear-gradient(135deg,rgba(244,63,94,0.88),rgba(200,30,30,0.88));
  --opt-blue:      linear-gradient(135deg,rgba(14,165,233,0.88),rgba(30,90,230,0.88));
  --opt-orange:    linear-gradient(135deg,rgba(245,158,11,0.88),rgba(220,80,10,0.88));
  --opt-green:     linear-gradient(135deg,rgba(16,185,129,0.88),rgba(10,145,120,0.88));
}

html, body {
  min-height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(ellipse at 18% 28%, rgba(59,130,246,0.32) 0, transparent 52%),
    radial-gradient(ellipse at 82% 72%, rgba(56,189,248,0.22) 0, transparent 52%),
    linear-gradient(180deg, #0c1530 0%, #111827 100%);
  background-attachment: fixed;
}

/* ── PARTICLES CANVAS ────────────────────────────────────── */
#particles-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ── HEADER ──────────────────────────────────────────────── */
#main-header {
  position: relative;
  z-index: 20;
  background: linear-gradient(180deg,
    rgba(8,14,36,0.94) 0%,
    rgba(14,22,50,0.88) 100%);
  border-bottom: 1px solid rgba(56,189,248,0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 24px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1300px;
  margin: 0 auto;
  gap: 1rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.seminar-block { line-height: 1.2; }

.seminar-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
}

.seminar-sub {
  font-size: 0.88rem;
  font-weight: 600;
  color: #93c5fd;
  letter-spacing: 0.05em;
  margin-top: 3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-sub);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.live-badge i { color: var(--neon); font-size: 0.85rem; }

/* Music toggle button */
.music-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(124,92,255,0.25);
  backdrop-filter: blur(10px);
  color: #f3f4ff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  flex-shrink: 0;
}
.music-btn:hover { transform: scale(1.08); background: rgba(124,92,255,0.4); }
.music-btn.muted  { color: #64748b; background: rgba(255,255,255,0.06); }

/* ── MAIN CONTENT ────────────────────────────────────────── */
#main-content {
  position: relative;
  z-index: 5;
  max-width: 1300px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── SCREENS ─────────────────────────────────────────────── */
.screen {
  display: none;
  width: 100%;
  animation: fadeUp 0.42s cubic-bezier(0.22,1,0.36,1) both;
}
.screen.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── GLASS CARD ──────────────────────────────────────────── */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-neon);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  padding: 2rem;
}

/* ── TYPOGRAPHY HELPERS ──────────────────────────────────── */
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glow-text {
  filter: drop-shadow(0 0 14px rgba(56,189,248,0.55));
}

.text-muted-quiz { color: var(--muted) !important; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-neon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--grad);
  color: #0c1530;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 1rem;
  padding: 0.85rem 2rem;
  cursor: pointer;
  box-shadow: var(--shadow-neon);
  transition: transform 0.15s, opacity 0.15s;
  text-decoration: none;
}
.btn-neon:hover:not(:disabled)  { transform: scale(1.03); color: #0c1530; }
.btn-neon:active:not(:disabled) { transform: scale(0.97); }
.btn-neon:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-neon-full {
  width: 100%;
  justify-content: center;
  font-size: 1.1rem;
  padding: 1rem 2rem;
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-sub);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 1rem;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-glass:hover { background: rgba(255,255,255,0.13); }

/* ── WELCOME SCREEN ──────────────────────────────────────── */
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
}
@media (min-width: 1024px) {
  .welcome-grid { grid-template-columns: 1.45fr 1fr; align-items: center; }
}

.welcome-card { padding: 2.5rem; }

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(56,189,248,0.35);
  background: rgba(56,189,248,0.1);
  color: var(--neon);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.live-tag i { font-size: 0.8rem; }

.welcome-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 1.2rem;
  color: #fff;
}

.welcome-desc {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 540px;
  margin-bottom: 2rem;
}

.team-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-sub);
  border-radius: 1rem;
  padding: 0.82rem 1.2rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1rem;
}
.stat-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-sub);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
}
.stat-val { font-size: 1.65rem; font-weight: 800; }
.stat-lbl {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 3px;
}
.music-btn.muted {
  color: #64748b !important;
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.1) !important;
}

/* QR Card */
.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}
.qr-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.qr-box {
  background: #fff;
  border-radius: 1rem;
  padding: 12px;
}
.qr-box canvas, .qr-box img { display: block; }
.qr-hint { font-size: 0.75rem; color: var(--muted); text-align: center; }

@keyframes pulseGlow {
  0%,100% { box-shadow: 0 0 18px rgba(56,189,248,0.4); }
  50%      { box-shadow: 0 0 38px rgba(56,189,248,0.85); }
}
.pulse-glow { animation: pulseGlow 2s ease-in-out infinite; }

/* ── REGISTER SCREEN ─────────────────────────────────────── */
.register-wrap {
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
}
.register-wrap .glass-card { padding: 2.5rem; }
.register-wrap h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}

.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.field-input-wrap {
  background: rgba(28,40,72,0.65);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 0.9rem;
  padding: 0.9rem 1.15rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input-wrap:focus-within {
  border-color: var(--neon);
  box-shadow: 0 0 0 4px rgba(56,189,248,0.13);
}
.field-input-wrap input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1.05rem;
  font-family: 'Inter', sans-serif;
}
.field-input-wrap input::placeholder { color: rgba(148,163,184,0.45); }

/* ── QUIZ SCREEN ─────────────────────────────────────────── */
.quiz-wrap { width: 100%; }

.quiz-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
  gap: 1rem;
}

.q-counter {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-sub);
  border-radius: 999px;
  padding: 5px 14px;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.progress-track {
  height: 8px;
  width: 220px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 999px;
  transition: width 0.4s ease;
  width: 0%;
}

/* Question card */
.question-card { padding: 2rem; }
@media (min-width: 640px) { .question-card { padding: 2.5rem; } }

.question-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.question-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.2rem, 2.8vw, 1.9rem);
  font-weight: 700;
  line-height: 1.32;
  flex: 1;
  color: #fff;
}

/* Timer circle */
.timer-wrap { position: relative; flex-shrink: 0; }
.timer-svg  { display: block; transform: rotate(-90deg); }
.timer-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--neon);
}
.timer-inner i { font-size: 0.85rem; color: inherit; }
.timer-inner.danger { color: #f87171 !important; }

/* Options grid */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
@media (min-width: 580px) { .options-grid { grid-template-columns: 1fr 1fr; } }

.option-btn {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 1rem;
  padding: 1.2rem 1.4rem;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  outline: 2px solid transparent;
  transition: transform 0.15s, opacity 0.25s, box-shadow 0.25s;
}
.option-btn:hover:not(:disabled) { transform: scale(1.025); }
.option-btn:active:not(:disabled) { transform: scale(0.975); }
.option-btn:disabled { cursor: default; }

.option-btn.opt-0 { background: var(--opt-red);    outline-color: rgba(253,164,175,0.3); }
.option-btn.opt-1 { background: var(--opt-blue);   outline-color: rgba(147,197,253,0.3); }
.option-btn.opt-2 { background: var(--opt-orange); outline-color: rgba(253,211,77,0.3);  }
.option-btn.opt-3 { background: var(--opt-green);  outline-color: rgba(110,231,183,0.3); }

.option-btn.dimmed    { opacity: 0.32; }
.option-btn.correct-ans {
  outline: 2px solid #6ee7b7;
  box-shadow: 0 0 38px -4px rgba(52,211,153,0.7);
}
.option-btn.wrong-ans {
  outline: 2px solid #fca5a5;
  box-shadow: 0 0 38px -4px rgba(248,113,113,0.7);
}

.opt-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.opt-shape {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(0,0,0,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.opt-text  { flex: 1; }
.opt-icon  { flex-shrink: 0; }
.opt-icon i { font-size: 1.35rem; }

/* Shimmer effect on options */
.shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent, rgba(255,255,255,0.14), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ── FINAL SCREEN ────────────────────────────────────────── */
.final-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
  align-items: start;
}
@media (min-width: 1024px) { .final-grid { grid-template-columns: 1fr 1.25fr; } }

.final-score-card { padding: 2rem; }

.crown-icon {
  font-size: 3.2rem;
  filter: drop-shadow(0 0 12px rgba(56,189,248,0.6));
}

.final-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.score-box {
  background: linear-gradient(135deg,
    rgba(28,50,110,0.4), rgba(18,38,80,0.32));
  border: 1px solid rgba(56,189,248,0.28);
  border-radius: 1.4rem;
  padding: 2rem;
}
.score-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}
.score-val {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  margin-top: 4px;
}
.score-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 8px;
}

/* Leaderboard */
.lb-card { padding: 1.75rem; }
.lb-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}
.lb-header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}
.lb-table-wrap {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem;
  overflow: hidden;
}
.lb-head {
  display: grid;
  grid-template-columns: 54px 1fr 120px 76px;
  background: rgba(255,255,255,0.05);
  padding: 10px 14px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.lb-body { max-height: 400px; overflow-y: auto; }
.lb-body::-webkit-scrollbar { width: 4px; }
.lb-body::-webkit-scrollbar-thumb { background: var(--neon); border-radius: 2px; }
.lb-row {
  display: grid;
  grid-template-columns: 54px 1fr 120px 76px;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.88rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  animation: fadeUp 0.3s ease both;
  transition: background 0.2s;
}
.lb-row:hover { background: rgba(255,255,255,0.04); }
.lb-row.lb-me {
  background: rgba(56,189,248,0.1);
  outline: 1px solid rgba(56,189,248,0.3);
}
.lb-rank { display: flex; align-items: center; gap: 4px; font-weight: 700; }
.lb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-me-tag {
  font-size: 0.62rem;
  color: var(--neon);
  margin-left: 6px;
  font-weight: 700;
}
.lb-dept { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score {
  text-align: right;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lb-empty { padding: 2.5rem; text-align: center; color: var(--muted); }

/* ── THANKS SCREEN ───────────────────────────────────────── */
.thanks-wrap { max-width: 500px; margin: 0 auto; width: 100%; }
.thanks-card { padding: 3rem 2rem; }
.thanks-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
}
.thanks-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 1rem 0 2rem;
}

/* ── CONFETTI CANVAS ─────────────────────────────────────── */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

.qr-box {
  background: white;
  border-radius: 1rem;
  padding: 12px;
  min-width: 204px;   /* ← ADD */
  min-height: 204px;  /* ← ADD */
  display: flex;      /* ← ADD */
  align-items: center;
  justify-content: center;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 767px) {
  .brand-logo  { width: 68px; height: 68px; border-radius: 10px; }
  .seminar-title { font-size: 1.15rem; letter-spacing: 0.07em; }
  .seminar-sub   { font-size: 0.78rem; }
  .glass-card    { padding: 1.35rem; }
  .welcome-card  { padding: 1.5rem; }
  .score-val     { font-size: 3.4rem; }
  .lb-head, .lb-row { grid-template-columns: 44px 1fr 72px; }
  .lb-dept { display: none; }
}

@media (max-width: 480px) {
  .brand-logo  { width: 54px; height: 54px; }
  .seminar-title { font-size: 1rem; }
  .welcome-heading { font-size: 1.9rem; }
  #main-header { padding: 10px 14px; }
}