/* Static clone of the Fourth Expedition design system */

:root {
  --bg: #070b1e;
  --bg2: #0a0e27;
  --panel: #16203f;
  --panel2: #1d2a52;
  --ink: #eaf0ff;
  --muted: #9bb0d6;
  --line: #2a3a66;

  --mars: #ff6b35;
  --mars2: #ff8c5a;
  --gold: #ffd166;
  --green: #3ddc97;
  --red: #ff5d73;
  --blue: #5b8cff;

  --calcul: #5b8cff;
  --tables: #3ddc97;
  --fractions: #c98bff;
  --geometrie: #ffb454;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 80% -10%, #1b2a5e 0%, transparent 60%),
    radial-gradient(900px 600px at 10% 110%, #2a1a3a 0%, transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2) 60%);
  overflow-x: hidden;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.25), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.15), transparent),
    radial-gradient(1px 1px at 230px 80px, rgba(255,255,255,0.25), transparent),
    radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 400px 60px, rgba(255,255,255,0.2), transparent);
  background-repeat: repeat;
  background-size: 420px 220px;
  opacity: 0.6;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px 60px;
}

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

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--mars), var(--gold));
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.35);
}

.brand small {
  display: block;
  font-weight: 600;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.5px;
}

.spacer { flex: 1; }

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links a, .nav-links span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
}

.nav-links a:hover {
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
}

.lang {
  display: flex;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.lang button, .lang a {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 7px 11px;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
}

.lang .on {
  background: var(--mars);
  color: #fff;
}

/* Cards / panels */
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-light {
  background: rgba(255, 255, 255, 0.95);
  color: #1e293b;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-light h1, .card-light h2, .card-light h3 {
  color: #0f172a;
}

.card-light .muted {
  color: #64748b;
}

h1, h2, h3 {
  margin-top: 0;
  font-weight: 800;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* Forms */
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 15px;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.2);
}

.card-light input, .card-light select, .card-light textarea {
  background: #fff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.form-group { margin-bottom: 16px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.1s, filter 0.1s;
}

.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.99); }

.btn-primary {
  background: linear-gradient(135deg, var(--mars), var(--mars2));
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.35);
}

.btn-secondary {
  background: var(--panel2);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-light {
  background: #fff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.btn-google {
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.btn-sm {
  height: 36px;
  font-size: 13px;
  width: auto;
  padding: 0 16px;
}

/* Layout helpers */
.center { text-align: center; }
.flex { display: flex; }
.col { flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* Auth */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

/* Profile list */
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  padding: 16px;
  text-align: left;
  color: #0f172a;
  border: 0;
  cursor: pointer;
  transition: transform 0.1s;
}

.profile-card:hover { transform: scale(1.01); }

.avatar { font-size: 2.25rem; line-height: 1; }

/* HUD / mission */
.hud {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 14px;
  align-items: center;
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.ring {
  position: relative;
  width: 78px;
  height: 78px;
}

.ring svg { transform: rotate(-90deg); }

.ring .val {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}

.ring .val strong {
  display: block;
  font-size: 20px;
  line-height: 1;
}

.ring .val span {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hud-mid { min-width: 0; }

.hud-mid h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.hud-right {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

.hud-right strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

/* Question card */
.question-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}

.q-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.competency-calcul { color: var(--calcul); }
.competency-tables { color: var(--tables); }
.competency-fractions { color: var(--fractions); }
.competency-geometrie { color: var(--geometrie); }

.prompt {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 20px;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: left;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.option:hover { border-color: var(--blue); }

.feedback {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 16px;
  font-size: 14px;
}

.feedback.correct { background: rgba(61, 220, 151, 0.12); border: 1px solid rgba(61, 220, 151, 0.4); color: var(--green); }
.feedback.wrong { background: rgba(255, 93, 115, 0.12); border: 1px solid rgba(255, 93, 115, 0.4); color: var(--red); }

/* Stats */
.stat {
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.stat .value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
}

.stat .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-top: 4px;
}

.progress {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress > div {
  height: 100%;
  background: var(--blue);
  border-radius: 999px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* About / landing */
.hero {
  text-align: center;
  padding: 48px 16px;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--ink), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.feature {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.feature .icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.feature h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.feature p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* Footer */
.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 48px;
  padding-bottom: 24px;
}

/* Responsive */
@media (max-width: 640px) {
  .hud { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ring { display: none; }
  .hud-right { text-align: left; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 1.7rem; }
}
