﻿* { box-sizing: border-box; }
:root {
  --bg: #0f1115;
  --bg-elev: #171a21;
  --bg-elev-2: #1e222b;
  --border: #2a2f3a;
  --text: #eef0f4;
  --text-dim: #9aa2b1;
  --accent: #6c8dff;
  --accent-dim: #3d4b7a;
  --danger: #ff6b6b;
  --radius: 10px;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* visível para leitores de tela, fora da tela para quem enxerga */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }

.url-form { display: flex; gap: 8px; flex: 1; max-width: 560px; min-width: 260px; }
.url-form input {
  flex: 1;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
}
.url-form input:focus { border-color: var(--accent); }
.url-form button {
  background: var(--accent);
  color: #0b0d12;
  border: none;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
}
.url-form button:hover { filter: brightness(1.08); }
.url-form button:disabled { opacity: 0.6; cursor: default; }

.error-banner {
  background: #341c1c;
  color: var(--danger);
  border-bottom: 1px solid #4a2323;
  padding: 10px 24px;
  font-size: 13px;
}
.error-banner.hidden { display: none; }

.layout {
  display: flex;
  height: 74vh;
  min-height: 520px;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  overflow-y: auto;
}

.category-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  background: var(--bg-elev-2);
  padding: 4px;
  border-radius: var(--radius);
}
.category-tab {
  flex: 1;
  text-align: center;
  padding: 7px 4px;
  font-size: 12.5px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--text-dim);
  user-select: none;
}
.category-tab.active { background: var(--accent); color: #0b0d12; font-weight: 600; }

.model-list { display: flex; flex-direction: column; gap: 6px; }
.model-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
}
.model-item:hover { background: var(--bg-elev-2); }
.model-item.active {
  background: rgba(108, 141, 255, 0.12);
  border-color: var(--accent-dim);
}
.model-item .name { font-size: 13.5px; font-weight: 500; }
.model-item .dims { font-size: 11px; color: var(--text-dim); }

.sidebar-section-title {
  margin: 18px 0 8px;
  padding: 0 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.color-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.swatch {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}
.swatch:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3); }
.swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(108,141,255,0.25);
}
.swatch-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    conic-gradient(#ff5f57, #febc2e, #28c840, #6c8dff, #b06cff, #ff5f57);
}
.swatch-custom input[type="color"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
  cursor: pointer;
}

.stage-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  gap: 10px;
  min-width: 0;
}

.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 130px);
}
/* Em tamanho real a moldura costuma ser mais alta que a janela. Rolar dentro
   de um palco de altura fixa cortava o aparelho e escondia a moldura, então o
   palco cresce junto com o conteúdo e quem rola é a página inteira. */
body.actual-size .layout { height: auto; }
body.actual-size .sidebar { position: sticky; top: 0; align-self: flex-start; max-height: 100vh; }
body.actual-size .stage-wrap { justify-content: flex-start; }
body.actual-size .stage {
  max-height: none;
  height: auto;
  overflow: visible;
  align-items: flex-start;
}

.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 4px 2px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.toggle-row input { margin-top: 2px; cursor: pointer; }
.toggle-row small {
  display: block;
  color: var(--text-dim);
  font-size: 11.5px;
  margin-top: 2px;
}

.zoom-btn {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
}
.zoom-btn:hover { color: var(--text); }
.zoom-btn.active { color: var(--text); border-color: var(--accent); }

#preview-canvas {
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,0.45));
}
#preview-canvas.hidden { display: none; }

.idle-placeholder {
  color: var(--text-dim);
  font-size: 14px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 60px 80px;
}
.idle-placeholder.hidden { display: none; }

.live-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.live-frame.hidden { display: none; }

.frame-sizer {
  position: relative;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,0.45));
}
.device-frame {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
}
.device-body { position: absolute; inset: 0; }
.device-screen {
  position: absolute;
  overflow: hidden;
  background: #e8e9ee;
}
.device-screen canvas.remote-canvas { border: 0; display: block; background: #fff; cursor: pointer; touch-action: none; }
.frame-decor { position: absolute; pointer-events: none; }
.frame-side-btn { position: absolute; }

.browser-topbar {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 0;
}
.browser-dots { display: flex; gap: 8px; align-items: center; }
.browser-dot { border-radius: 50%; }
.browser-address {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.06);
  color: #54565c;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15,17,21,0.35);
  backdrop-filter: blur(2px);
}
.spinner.hidden { display: none; }
.spinner-ring {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Na barra lateral os controles empilham e ocupam a largura toda: lado a lado
   eles não cabem nos 220px da coluna. */
.toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.toolbar button { width: 100%; text-align: center; }
.current-model {
  font-size: 12.5px;
  color: var(--text-dim);
  padding: 0 2px 2px;
}

.download-btn {
  background: var(--bg-elev-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 9px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
/* na coluna estreita o complemento vai pra linha de baixo */
.download-btn .sub { display: block; font-weight: 400; color: var(--text-dim); font-size: 11.5px; }
.download-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.download-btn:disabled { opacity: 0.45; cursor: default; }

@media (max-width: 720px) {
  .layout { flex-direction: column; height: auto; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .model-list { flex-direction: row; flex-wrap: wrap; }
  .model-item { flex: 1 1 45%; }
  .stage { max-height: 60vh; }
}

/* ---------- Conteúdo editorial (legível sem JavaScript) ---------- */
.content {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 24px 24px;
  line-height: 1.65;
  font-size: 16px;
}
.content h1 {
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}
.content h2 {
  font-size: clamp(20px, 3vw, 25px);
  margin: 48px 0 14px;
  letter-spacing: -0.01em;
}
.content h3 { font-size: 17px; margin: 26px 0 6px; }
.content p { color: #c4cad6; margin: 0 0 14px; }
.content .lead { font-size: 18px; color: var(--text); }
.content code {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.9em;
}
.content a { color: var(--accent); }

.steps { color: #c4cad6; padding-left: 20px; }
.steps li { margin-bottom: 8px; }

.table-wrap { overflow-x: auto; margin: 18px 0; }
.content table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 520px; }
.content caption { text-align: left; color: var(--text-dim); font-size: 13px; padding-bottom: 8px; }
.content th, .content td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.content th { color: var(--text); font-weight: 600; background: var(--bg-elev); }
.content td { color: #c4cad6; }

.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.cards li { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.cards h3 { margin: 0 0 6px; font-size: 15px; }
.cards p { margin: 0; font-size: 14px; }

.faq h3 { color: var(--text); }
.faq p { margin-bottom: 18px; }

/* Espaço reservado para anúncio: só ocupa altura quando há anúncio de fato,
   e nunca encosta na ferramenta, para não ser confundido com a interface. */
.ad-slot {
  margin: 40px 0;
  min-height: 0;
  text-align: center;
}
.ad-slot::before {
  content: "Publicidade";
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.ad-slot:empty { display: none; }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 28px 24px 44px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13.5px;
}
.site-footer nav { display: flex; gap: 18px; justify-content: center; margin: 10px 0; flex-wrap: wrap; }
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .disclaimer { font-size: 12px; max-width: 620px; margin: 12px auto 0; opacity: 0.75; }

/* ---------- Páginas de texto simples (privacidade) ---------- */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px;
  line-height: 1.7;
}
.doc h1 { font-size: 30px; margin: 0 0 8px; letter-spacing: -0.02em; }
.doc h2 { font-size: 20px; margin: 34px 0 10px; }
.doc p, .doc li { color: #c4cad6; }
.doc a { color: var(--accent); }
.doc .updated { color: var(--text-dim); font-size: 13px; margin-bottom: 26px; }

/* Aviso de prévia estática: sem motor ao vivo o que aparece é uma foto. */
.static-notice {
  max-width: 560px;
  margin: 0 auto;
  padding: 9px 14px;
  border: 1px solid #5a4a22;
  background: #2f2a18;
  color: #e8d9a8;
  border-radius: var(--radius);
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
}
.static-notice.hidden { display: none; }
/* precisa casar a especificidade da regra que define cursor: pointer */
.device-screen canvas.remote-canvas.static-shot { cursor: default; }

/* Botao de gravacao */
.record-btn {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
}
.record-btn:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.record-btn:disabled { opacity: 0.45; cursor: default; }
.record-btn.recording {
  color: #fff;
  background: #b3303b;
  border-color: #d8434f;
  animation: rec-pulse 1.4s ease-in-out infinite;
}
@keyframes rec-pulse { 50% { opacity: 0.72; } }

/* Marca na base do notebook */
#brand-section.hidden { display: none; }
.brand-text {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}
.brand-text:focus { border-color: var(--accent); }
.brand-logo-row { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.brand-logo-btn {
  flex: 1;
  text-align: center;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
  cursor: pointer;
}
.brand-logo-btn:hover { color: var(--text); border-color: var(--accent); }
.brand-clear {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 8px;
  padding: 7px 9px;
  cursor: pointer;
  line-height: 1;
}
.brand-clear:hover { color: var(--danger); border-color: var(--danger); }
.brand-clear.hidden { display: none; }
.brand-logo-name {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}