/* ============================================================
   RUMO AO 10 — Estilos Globais
   rumoao10.com.br
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Fredoka+One&display=swap');

:root {
  --azul:        #2563EB;
  --azul-dark:   #1D4ED8;
  --azul-light:  #EFF6FF;
  --laranja:     #E65100;
  --verde:       #16A34A;
  --verde-light: #DCFCE7;
  --vermelho:    #DC2626;
  --verm-light:  #FEF2F2;
  --ambar:       #D97706;
  --ambar-light: #FFFBEB;
  --bg-page:     #EEF2FF;
  --card:        #FFFFFF;
  --texto:       #1E293B;
  --texto-2:     #475569;
  --texto-muted: #94A3B8;
  --borda:       #E2E8F0;
  --radius:      14px;
  --shadow:      0 4px 20px rgba(37,99,235,0.10);
  --font-main:   'Nunito', sans-serif;
  --font-title:  'Fredoka One', cursive;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background:  var(--bg-page);
  color:       var(--texto);
  min-height:  100vh;
  line-height: 1.6;
}

/* ── Topbar ────────────────────────────────────────────────── */
.topbar {
  background:  linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
  color:       white;
  padding:     0 24px;
  height:      60px;
  display:     flex;
  align-items: center;
  justify-content: space-between;
  position:    sticky;
  top:         0;
  z-index:     100;
  box-shadow:  0 2px 12px rgba(0,0,0,.18);
}
.topbar-logo {
  font-family: var(--font-title);
  font-size:   1.35rem;
  letter-spacing: .5px;
  display:     flex;
  align-items: center;
  gap:         8px;
}
.topbar-logo span {
  opacity:     .75;
  font-size:   .88rem;
  font-family: var(--font-main);
  font-weight: 600;
}
.topbar-nav { display: flex; align-items: center; gap: 16px; }
.topbar-nav a {
  color:           rgba(255,255,255,.85);
  text-decoration: none;
  font-weight:     600;
  font-size:       .88rem;
  transition:      color .2s;
}
.topbar-nav a:hover { color: white; }
.btn-logout {
  background:  rgba(255,255,255,.15);
  border:      1px solid rgba(255,255,255,.3);
  color:       white;
  padding:     6px 14px;
  border-radius: 20px;
  font-size:   .82rem;
  font-weight: 700;
  cursor:      pointer;
  transition:  background .2s;
  font-family: var(--font-main);
}
.btn-logout:hover { background: rgba(255,255,255,.25); }

/* ── Container ─────────────────────────────────────────────── */
.container {
  max-width: 800px;
  margin:    0 auto;
  padding:   32px 16px;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background:    var(--card);
  border-radius: var(--radius);
  box-shadow:    var(--shadow);
  padding:       28px;
  margin-bottom: 20px;
}

/* ── Botões ────────────────────────────────────────────────── */
.btn {
  display:       inline-flex;
  align-items:   center;
  gap:           8px;
  padding:       12px 24px;
  border-radius: 30px;
  font-family:   var(--font-main);
  font-weight:   700;
  font-size:     .95rem;
  cursor:        pointer;
  border:        none;
  transition:    all .2s;
  text-decoration: none;
}
.btn-primary  { background: var(--azul); color: white; box-shadow: 0 4px 14px rgba(37,99,235,.35); }
.btn-primary:hover { background: var(--azul-dark); transform: translateY(-1px); }
.btn-outline  { background: transparent; color: var(--azul); border: 2px solid var(--azul); }
.btn-outline:hover { background: var(--azul-light); }
.btn-full     { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Formulários ───────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display:       block;
  font-weight:   700;
  font-size:     .88rem;
  color:         var(--texto-2);
  margin-bottom: 6px;
}
.form-group input,
.form-group select {
  width:         100%;
  padding:       11px 14px;
  border:        2px solid var(--borda);
  border-radius: 10px;
  font-family:   var(--font-main);
  font-size:     .95rem;
  color:         var(--texto);
  background:    white;
  transition:    border-color .2s;
  outline:       none;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--azul); }

/* ── Alertas ───────────────────────────────────────────────── */
.alert {
  padding:       14px 18px;
  border-radius: 10px;
  font-weight:   600;
  font-size:     .88rem;
  margin-bottom: 16px;
  display:       none;
}
.alert-erro { background: var(--verm-light); color: #991B1B; border-left: 4px solid var(--vermelho); }
.alert-ok   { background: var(--verde-light); color: #14532D; border-left: 4px solid var(--verde); }
.alert-info { background: var(--azul-light); color: #1E40AF; border-left: 4px solid var(--azul); }
.alert.show { display: block; }

/* ── Spinner ───────────────────────────────────────────────── */
.spinner {
  width: 36px; height: 36px;
  border: 4px solid var(--borda);
  border-top-color: var(--azul);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Pills ─────────────────────────────────────────────────── */
.pill { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: .78rem; font-weight: 700; }
.pill-azul   { background: var(--azul-light); color: var(--azul-dark); }
.pill-verde  { background: var(--verde-light); color: #15803D; }
.pill-gratis { background: #F0FDF4; color: #15803D; border: 1px solid #86EFAC; }
.pill-pago   { background: #EFF6FF; color: var(--azul); border: 1px solid #93C5FD; }
.pill-lock   { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }

/* ── Banner boas-vindas ────────────────────────────────────── */
.welcome-banner {
  background:    linear-gradient(135deg, #1E3A8A, #3B82F6);
  color:         white;
  border-radius: var(--radius);
  padding:       28px;
  margin-bottom: 28px;
  display:       flex;
  align-items:   center;
  justify-content: space-between;
  gap:           20px;
}
.welcome-banner h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; }
.welcome-banner p  { opacity: .85; font-size: .9rem; }
.welcome-emoji     { font-size: 3rem; }

/* ── Quiz grid ─────────────────────────────────────────────── */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.quiz-card {
  background:    white;
  border-radius: var(--radius);
  box-shadow:    var(--shadow);
  padding:       22px;
  transition:    transform .2s, box-shadow .2s;
  border:        2px solid transparent;
  position:      relative;
  overflow:      hidden;
}
.quiz-card:hover {
  transform:    translateY(-3px);
  box-shadow:   0 8px 28px rgba(37,99,235,.15);
  border-color: var(--azul);
}
.quiz-card.bloqueado { opacity: .85; }
.quiz-card.bloqueado:hover { transform: none; border-color: transparent; }
.quiz-card-titulo { font-weight: 800; font-size: 1.05rem; margin-bottom: 6px; }
.quiz-card-meta   { font-size: .82rem; color: var(--texto-2); margin-bottom: 12px; }
.quiz-card-meta span { margin-right: 12px; }
.quiz-card-footer {
  display:     flex;
  align-items: center;
  justify-content: space-between;
  margin-top:  14px;
}
.lock-overlay { position: absolute; top: 14px; right: 14px; font-size: 1.2rem; opacity: .5; }

/* ── Filtros ───────────────────────────────────────────────── */
.filtros { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.filtro-btn {
  padding:       7px 16px;
  border-radius: 20px;
  border:        2px solid var(--borda);
  background:    white;
  font-family:   var(--font-main);
  font-weight:   700;
  font-size:     .82rem;
  cursor:        pointer;
  transition:    all .2s;
  color:         var(--texto-2);
}
.filtro-btn.ativo { background: var(--azul); border-color: var(--azul); color: white; }

/* ── Responsivo ────────────────────────────────────────────── */
@media (max-width: 520px) {
  .container { padding: 16px 12px; }
  .card { padding: 18px; }
  .quiz-grid { grid-template-columns: 1fr; }
  .welcome-banner { flex-direction: column; text-align: center; }
  .topbar-logo span { display: none; }
  .filtros { gap: 7px; }
}
