/* Visual cru porem funcional. Cores finais ficam para depois da POC. */
:root {
  --bg: #0f1115;
  --surface: #1a1d24;
  --surface-2: #232733;
  --border: #2e3340;
  --text: #e7e9ee;
  --muted: #9aa1b1;
  --accent: #4f9cff;
  --live: #ff4d4d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.topbar .brand { font-weight: 700; letter-spacing: .5px; }
.muted { color: var(--muted); }

.live-dot {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--live); font-weight: 600; font-size: 13px;
}
.live-dot::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--live); box-shadow: 0 0 0 0 rgba(255,77,77,.6);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,77,77,.6); }
  70% { box-shadow: 0 0 0 10px rgba(255,77,77,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,77,77,0); }
}

.stage {
  max-width: 900px;
  margin: 28px auto;
  padding: 0 20px;
}

.slide {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 12px;
  padding: 40px 44px;
  min-height: 360px;
}
.slide h1 { font-size: 2.2rem; margin: 0 0 .4em; }
.slide h2 { font-size: 1.5rem; margin: .2em 0 .5em; color: var(--accent); }
.slide p, .slide li { font-size: 1.15rem; line-height: 1.6; }
.slide blockquote {
  border-left: 3px solid var(--accent);
  margin: 1em 0; padding: .2em 1em; color: var(--muted);
}
.slide pre {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 16px; overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .95rem;
}
.slide code { font-family: "JetBrains Mono", ui-monospace, monospace; }

.controls {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: 22px;
}
button {
  font: inherit; cursor: pointer;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 18px; font-weight: 600;
  transition: background .15s, border-color .15s;
}
button:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
button:disabled { opacity: .4; cursor: not-allowed; }
.counter { font-variant-numeric: tabular-nums; }

/* Entrada do aluno */
.gate {
  max-width: 380px; margin: 14vh auto; padding: 0 20px; text-align: center;
}
.gate h1 { font-size: 1.8rem; margin-bottom: .2em; }
.gate form { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.gate input {
  font: inherit; padding: 12px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.gate button { padding: 12px; }
.hidden { display: none !important; }

.sync-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--accent);
}
.sync-pill::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
}

/* Editor */
.editor-grid {
  display: grid;
  grid-template-columns: 240px 1fr 1fr;
  gap: 16px;
  padding: 20px;
  align-items: start;
}
.editor-grid textarea {
  width: 100%;
  min-height: 360px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .95rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
}
#painelSlides button { font-size: .85rem; padding: 6px 8px; }
.topbar a { text-decoration: none; }
@media (max-width: 900px) {
  .editor-grid { grid-template-columns: 1fr; }
}
