/* PSAT Sprint — Roblox-inspired theme: bold blocky buttons, bright colors, playful and game-like */

:root {
  --brand-red: #ff3b30;
  --brand-red-dark: #d81f16;
  --brand-blue: #00a2ff;
  --brand-blue-dark: #0072b1;
  --brand-yellow: #ffcc00;
  --brand-green: #00c853;
  --brand-purple: #7c3aed;
  --ink: #1e1f26;
  --ink-soft: #565a6e;
  --bg: #f4f6fb;
  --card-bg: #ffffff;
  --border: #e2e5f1;
  --radius: 14px;
  --shadow-block: 0 6px 0 rgba(0,0,0,0.15);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Nunito', 'Segoe UI', Verdana, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--brand-blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Top nav ---- */
.navbar {
  background: var(--ink);
  color: #fff;
  padding: 14px 0;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar .brand {
  font-weight: 900;
  font-size: 22px;
  color: #fff;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar .brand .cube {
  display: inline-block;
  width: 22px; height: 22px;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-yellow));
  border-radius: 6px;
  transform: rotate(10deg);
}
.navbar nav a {
  color: #d6d9ea;
  margin-left: 18px;
  font-weight: 700;
  font-size: 14px;
}
.navbar nav a:hover { color: #fff; text-decoration: none; }
.navbar .alias-chip {
  background: rgba(255,255,255,0.1);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  margin-left: 18px;
}

/* ---- Buttons (chunky, blocky, Roblox-esque press effect) ---- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  color: #fff;
  background: var(--brand-blue);
  box-shadow: 0 5px 0 var(--brand-blue-dark);
  transition: transform 0.05s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--brand-blue-dark); }
.btn-red { background: var(--brand-red); box-shadow: 0 5px 0 var(--brand-red-dark); }
.btn-red:active { box-shadow: 0 1px 0 var(--brand-red-dark); }
.btn-green { background: var(--brand-green); box-shadow: 0 5px 0 #009624; }
.btn-green:active { box-shadow: 0 1px 0 #009624; }
.btn-purple { background: var(--brand-purple); box-shadow: 0 5px 0 #5b21b6; }
.btn-purple:active { box-shadow: 0 1px 0 #5b21b6; }
.btn-outline { background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--border); border: 2px solid var(--border); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-sm { padding: 8px 14px; font-size: 13px; box-shadow: 0 3px 0 rgba(0,0,0,0.15); }

/* ---- Cards ---- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 3px 0 var(--border), 0 2px 10px rgba(20,20,40,0.04);
  margin-bottom: 20px;
}
.card-title { font-size: 20px; font-weight: 900; margin: 0 0 12px; }

.grid {
  display: grid;
  gap: 18px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 800px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---- Lesson tiles ---- */
.lesson-tile {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-block);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: transform 0.08s ease;
}
.lesson-tile:hover { transform: translateY(-3px); }
.lesson-tile .emoji { font-size: 34px; }
.lesson-tile .lesson-title { font-weight: 800; font-size: 16px; margin: 8px 0 4px; }
.lesson-tile .lesson-meta { font-size: 13px; color: var(--ink-soft); }
.progress-bar {
  background: var(--border);
  border-radius: 20px;
  height: 10px;
  overflow: hidden;
  margin-top: 10px;
}
.progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-green), #7be07e);
  border-radius: 20px;
}

/* ---- Forms ---- */
label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
input[type=text], input[type=email], input[type=password], input[type=number], select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 16px;
  background: #fff;
}
input:focus, select:focus { outline: none; border-color: var(--brand-blue); }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }
.alert-error { background: #ffe3e1; color: var(--brand-red-dark); border: 2px solid #ffb4ae; }
.alert-success { background: #e0f9e6; color: #0a7a2c; border: 2px solid #a9edb8; }
.alert-info { background: #e5f4ff; color: var(--brand-blue-dark); border: 2px solid #b7e2ff; }

/* ---- Sprint / quiz screen ---- */
.sprint-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.sprint-progress-dots { display: flex; gap: 6px; }
.sprint-progress-dots span {
  width: 22px; height: 8px; border-radius: 6px; background: var(--border); display: inline-block;
}
.sprint-progress-dots span.done { background: var(--brand-green); }
.sprint-progress-dots span.current { background: var(--brand-blue); }
.timer-ring {
  font-weight: 900;
  font-size: 20px;
  background: var(--ink);
  color: #fff;
  padding: 8px 16px;
  border-radius: 30px;
  min-width: 70px;
  text-align: center;
}
.timer-ring.low { background: var(--brand-red); }

.question-prompt { font-size: 19px; font-weight: 700; margin-bottom: 20px; }
.choice-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--border);
}
.choice-btn:hover { border-color: var(--brand-blue); }
.choice-btn.selected { border-color: var(--brand-blue); background: #eaf6ff; }
.choice-btn.correct { border-color: var(--brand-green); background: #e5fbea; }
.choice-btn.incorrect { border-color: var(--brand-red); background: #ffecea; }
.choice-label {
  display: inline-block;
  width: 26px; height: 26px;
  line-height: 26px;
  text-align: center;
  border-radius: 50%;
  background: var(--border);
  font-size: 13px;
  margin-right: 10px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff7d6;
  border: 2px solid var(--brand-yellow);
  border-radius: 20px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 13px;
  margin: 4px 6px 4px 0;
}

table.leaderboard { width: 100%; border-collapse: collapse; }
table.leaderboard th, table.leaderboard td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.leaderboard tr.me { background: #eaf6ff; font-weight: 800; }
.rank-badge { font-weight: 900; }
.rank-1 { color: #d4af37; }
.rank-2 { color: #9aa0a6; }
.rank-3 { color: #cd7f32; }

.footer { text-align: center; padding: 30px 0; color: var(--ink-soft); font-size: 13px; }

.hero {
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
  color: #fff;
  border-radius: var(--radius);
  padding: 50px 30px;
  text-align: center;
  margin: 30px 0;
}
.hero h1 { font-size: 34px; font-weight: 900; margin: 0 0 10px; }
.hero p { font-size: 17px; opacity: 0.95; margin-bottom: 24px; }
