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

:root {
  --primario: #1e5fa8;
  --primario-escuro: #144080;
  --claro: #bdd5f0;
  --fundo-suave: #e8f1fb;
  --fundo: #f4f8fd;
  --texto: #1a2535;
  --texto-suave: #3d5a80;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Courier New', Courier, monospace;
  background: var(--fundo);
  color: var(--texto);
  display: flex;
  flex-direction: column;
  height: 100%;
}

header {
  background: var(--primario);
  color: #fff;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  border-bottom: 3px solid var(--primario-escuro);
}

header h1 {
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

#barra-url {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 200px;
}

#campo-url {
  flex: 1;
  padding: 0.3rem 0.5rem;
  font-family: inherit;
  font-size: 0.85rem;
  border: 1px solid var(--claro);
  background: #f0f6ff;
  color: var(--texto);
  outline: none;
  border-radius: 2px;
}

#campo-url:focus {
  border-color: var(--primario);
  background: #fff;
}

button {
  padding: 0.3rem 0.7rem;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: background 0.15s;
}

.btn-primario {
  background: var(--primario-escuro);
  color: #fff;
  border-color: var(--primario-escuro);
}

.btn-primario:hover {
  background: var(--primario);
}

.btn-secundario {
  background: transparent;
  color: #fff;
  border-color: var(--claro);
}

.btn-secundario:hover {
  background: rgba(255,255,255,0.15);
}

#conteudo {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#quadro {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #fff;
}

#tela-inicial {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--fundo-suave);
  gap: 1.5rem;
  padding: 2rem;
  text-align: center;
}

#tela-inicial h2 {
  font-size: 1.5rem;
  color: var(--primario);
}

#tela-inicial p {
  max-width: 480px;
  line-height: 1.6;
  font-size: 0.9rem;
  color: var(--texto-suave);
}

#btn-vagar-grande {
  padding: 0.6rem 2rem;
  font-size: 1rem;
  background: var(--primario);
  color: #fff;
  border: 2px solid var(--primario-escuro);
  border-radius: 2px;
  cursor: pointer;
  font-family: inherit;
}

#btn-vagar-grande:hover {
  background: var(--primario-escuro);
}

#link-nova-aba {
  display: none;
  padding: 0.3rem 0.7rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: #fff;
  border: 1px solid var(--claro);
  border-radius: 2px;
  text-decoration: none;
  white-space: nowrap;
}

#link-nova-aba:hover {
  background: rgba(255,255,255,0.15);
}

#link-nova-aba.visivel {
  display: inline-block;
}

/* Modal */
#sobreposicao {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

#sobreposicao.aberto {
  display: flex;
}

#dialogo {
  background: #fff;
  border: 2px solid var(--primario);
  border-radius: 4px;
  max-width: 560px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
}

#dialogo h2 {
  color: var(--primario);
  margin-bottom: 1rem;
  font-size: 1rem;
}

#dialogo h3 {
  color: var(--primario);
  font-size: 0.9rem;
  margin: 1rem 0 0.4rem;
}

#dialogo p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #444;
}

#dialogo a {
  color: var(--primario);
}

#dialogo ul {
  list-style: none;
  padding: 0;
}

#dialogo ul li {
  font-size: 0.8rem;
  padding: 0.15rem 0;
  color: #333;
}

#dialogo ul li::before {
  content: '> ';
  color: var(--primario);
}

#dialogo ul li a {
  color: #333;
  text-decoration: none;
}

#dialogo ul li a:hover {
  color: var(--primario);
  text-decoration: underline;
}

.dialogo-rodape {
  margin-top: 1.2rem;
  text-align: right;
}

.dialogo-rodape button {
  background: var(--primario);
  color: #fff;
  border-color: var(--primario);
}

.dialogo-rodape button:hover {
  background: var(--primario-escuro);
}

footer {
  background: var(--primario);
  color: rgba(255,255,255,0.75);
  font-size: 0.75rem;
  padding: 0.3rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

#info-site {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

#contador {
  white-space: nowrap;
}
