/* ============================================================
   Preparados para o ENEM 2027 - Design System
   Glassmorphism espelhado, mobile-first, dark, alto contraste.
   Fontes >= 15px (Giba usa oculos). Radius 10-16px.
   ============================================================ */

:root {
  /* Paleta - azul profundo + roxo + verde-limao de destaque (energia jovem) */
  --bg-0: #0a0e1a;
  --bg-1: #111830;
  --bg-2: #182142;
  --ink: #eef2ff;
  --ink-soft: #b9c2e0;
  --ink-dim: #7f8bb5;

  --accent: #6d5efc;      /* roxo principal */
  --accent-2: #34d1bf;    /* verde-agua */
  --accent-3: #ffd166;    /* amarelo destaque */
  --danger: #ff5d6c;
  --ok: #3ddc84;

  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-brd: rgba(255, 255, 255, 0.16);
  --glass-hi: rgba(255, 255, 255, 0.28);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --shadow-3d: 0 6px 0 rgba(0, 0, 0, 0.35), 0 12px 30px rgba(109, 94, 252, 0.35);

  --font: 'Segoe UI', system-ui, -apple-system, 'Inter', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Fundo animado com auroras suaves */
.bg-aurora {
  position: fixed; inset: 0; z-index: -2; overflow: hidden;
  background: radial-gradient(1200px 800px at 15% -10%, #24306a 0%, transparent 55%),
              radial-gradient(1000px 700px at 110% 10%, #3a2560 0%, transparent 50%),
              linear-gradient(160deg, var(--bg-0), var(--bg-1) 60%, var(--bg-0));
}
.bg-aurora::before, .bg-aurora::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5;
  animation: float 14s ease-in-out infinite;
}
.bg-aurora::before { width: 460px; height: 460px; background: var(--accent); top: -80px; left: -60px; }
.bg-aurora::after { width: 380px; height: 380px; background: var(--accent-2); bottom: -60px; right: -40px; animation-delay: -7s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.1); }
}

/* ---------------- Layout ---------------- */
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 20px 18px 80px; }
.center-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px 18px; }

/* ---------------- Glass card ---------------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
/* Reflexo espelhado no topo */
.glass::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, var(--glass-hi), transparent 30%);
  opacity: 0.5;
}
.glass-pad { padding: 22px; }

/* ---------------- Tipografia ---------------- */
h1 { font-size: clamp(28px, 7vw, 52px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; }
h2 { font-size: clamp(20px, 4vw, 28px); font-weight: 700; margin-bottom: 4px; }
h3 { font-size: 18px; font-weight: 700; }
.muted { color: var(--ink-soft); }
.dim { color: var(--ink-dim); font-size: 14px; }
.gradient-text {
  background: linear-gradient(100deg, var(--accent-3), var(--accent-2) 50%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tag {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent-2);
  background: rgba(52, 209, 191, 0.12); border: 1px solid rgba(52, 209, 191, 0.3);
  padding: 6px 14px; border-radius: 999px;
}

/* ---------------- Botoes 3D ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  border: none; border-radius: var(--radius-sm); padding: 14px 24px;
  color: #fff; text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s;
  user-select: none;
}
.btn-3d {
  background: linear-gradient(180deg, #7d6efd, var(--accent));
  box-shadow: var(--shadow-3d);
  transform: translateY(0);
}
.btn-3d:hover { transform: translateY(-3px); filter: brightness(1.08); }
.btn-3d:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,0.35), 0 6px 16px rgba(109,94,252,0.3); }
.btn-ghost {
  background: var(--glass-bg); border: 1px solid var(--glass-brd); color: var(--ink);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: var(--glass-hi); transform: translateY(-2px); }
.btn-2 { background: linear-gradient(180deg, #3fe0cd, var(--accent-2)); box-shadow: 0 6px 0 rgba(0,0,0,0.3), 0 12px 26px rgba(52,209,191,0.3); color: #052b27; }
.btn-2:hover { transform: translateY(-3px); filter: brightness(1.06); }
.btn-danger { background: linear-gradient(180deg, #ff7280, var(--danger)); box-shadow: 0 5px 0 rgba(0,0,0,0.3); }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: grayscale(0.3); }

/* ---------------- Google btn ---------------- */
.btn-google {
  background: #fff; color: #1f2430; border: 1px solid #dfe3ee;
  box-shadow: 0 5px 0 rgba(0,0,0,0.25), 0 10px 22px rgba(0,0,0,0.25);
}
.btn-google:hover { transform: translateY(-2px); }
.btn-google svg { width: 20px; height: 20px; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.input, textarea.input, select.input {
  width: 100%; font-family: inherit; font-size: 16px; color: var(--ink);
  background: rgba(0,0,0,0.28); border: 1px solid var(--glass-brd);
  border-radius: 10px; padding: 13px 15px; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, textarea.input:focus, select.input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109,94,252,0.25);
}
textarea.input { resize: vertical; min-height: 90px; }
.input::placeholder { color: var(--ink-dim); }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }

/* ---------------- Grid de features ---------------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 28px; }
.feature { padding: 22px; }
.feature .ico { font-size: 34px; margin-bottom: 10px; }
.feature h3 { margin-bottom: 6px; }

/* ---------------- Assets pixel (PixelLab) ---------------- */
/* Pixel art nitido + brilho suave que combina com o glass */
.pix { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.feature .pix {
  width: 74px; height: 74px; margin-bottom: 10px;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
  transition: transform 0.25s ease;
}
.feature:hover .pix { transform: translateY(-4px) scale(1.08) rotate(-2deg); }
.mascot-hero {
  width: clamp(120px, 34vw, 168px); height: auto;
  filter: drop-shadow(0 10px 24px rgba(109,94,252,0.5));
  animation: bob 3.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
.brand .logo-pix { width: 40px; height: 40px; }
.pill-ico { width: 18px; height: 18px; vertical-align: -4px; margin-right: 3px; }
.seal-pix { width: 40px; height: 40px; image-rendering: pixelated; flex: 0 0 auto; }
.mascot-inline { width: 92px; height: auto; image-rendering: pixelated; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.35)); }

/* ---------------- Navbar ---------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; margin-bottom: 22px;
  position: sticky; top: 10px; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-size: 20px;
  box-shadow: 0 6px 16px rgba(109,94,252,0.5);
}

/* ---------------- Tabs (paineis) ---------------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; font-size: 15px; font-weight: 600; color: var(--ink-soft);
  background: var(--glass-bg); border: 1px solid var(--glass-brd);
  padding: 10px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: all 0.15s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: #fff; background: linear-gradient(180deg, #7d6efd, var(--accent)); border-color: transparent; box-shadow: 0 4px 14px rgba(109,94,252,0.4); }
.tab .badge {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px; text-align: center;
  font-size: 11px; background: var(--accent-3); color: #3a2c00; border-radius: 999px; margin-left: 6px; padding: 0 5px;
}
.panel { display: none; animation: fade 0.25s ease; }
.panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------- Listas / cards ---------------- */
.list { display: grid; gap: 12px; }
.item {
  padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.item .meta { min-width: 0; }
.item .meta .t { font-weight: 700; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { padding: 18px; text-align: center; }
.stat .n { font-size: 32px; font-weight: 800; }
.stat .l { font-size: 13px; color: var(--ink-soft); }

/* ---------------- Pills de status ---------------- */
.pill { font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.pill.live { background: rgba(61,220,132,0.16); color: var(--ok); border: 1px solid rgba(61,220,132,0.4); }
.pill.off { background: rgba(127,139,181,0.14); color: var(--ink-dim); border: 1px solid rgba(127,139,181,0.3); }
.pill.done { background: rgba(52,209,191,0.16); color: var(--accent-2); border: 1px solid rgba(52,209,191,0.4); }
.dotlive { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 5px; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------------- Correio fofo ---------------- */
.envelope {
  padding: 0; cursor: pointer; transition: transform 0.15s;
  border-left: 4px solid var(--accent-3);
}
.envelope:hover { transform: translateX(4px); }
.envelope.unread { border-left-color: var(--accent-2); }
.envelope .seal { font-size: 26px; }
.envelope-head { display: flex; align-items: center; gap: 12px; padding: 15px 18px; }
.envelope-body { padding: 0 18px 16px 52px; color: var(--ink-soft); font-size: 15px; display: none; white-space: pre-wrap; }
.envelope.open .envelope-body { display: block; animation: fade 0.25s; }

/* ---------------- Toast ---------------- */
#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: rgba(20,26,48,0.95); border: 1px solid var(--glass-brd); color: var(--ink);
  padding: 13px 22px; border-radius: 12px; font-weight: 600; font-size: 15px;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 100; max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { border-color: var(--danger); }
#toast.ok { border-color: var(--ok); }

/* ---------------- Footer branding ---------------- */
.brand-footer {
  text-align: center; padding: 26px 16px; margin-top: 30px;
  color: var(--ink-dim); font-size: 13px; border-top: 1px solid rgba(255,255,255,0.06);
}
.brand-footer a { color: var(--ink-soft); text-decoration: none; }
.brand-footer a:hover { color: var(--accent-2); }
.brand-footer .sep { opacity: 0.4; margin: 0 8px; }

/* ---------------- Helpers ---------------- */
.hidden { display: none !important; }
.mt { margin-top: 18px; }
.mt-sm { margin-top: 10px; }
.gap { display: flex; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; }
.err-msg { color: var(--danger); font-size: 14px; margin-top: 8px; min-height: 18px; }
.empty { text-align: center; color: var(--ink-dim); padding: 30px 10px; font-size: 15px; }

@media (max-width: 560px) {
  .glass-pad { padding: 18px; }
  .btn { padding: 13px 20px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
}
