/* ═══════════════════════════════════════════════════════════════════════
   CENTRAL DE POSTAGENS · base
   Cores, letras, fundo e animações que o app inteiro usa.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;

  /* fundo e painéis */
  --fundo: #03070d;
  --painel-a: rgba(10, 26, 40, 0.86);
  --painel-b: rgba(5, 14, 23, 0.9);
  --vidro: rgba(9, 24, 38, 0.62);

  /* linhas e brilho ciano */
  --ciano: #40e0ff;
  --ciano-claro: #b4f3ff;
  --azul: #2b8cff;
  --linha: rgba(64, 224, 255, 0.16);
  --linha-media: rgba(64, 224, 255, 0.32);
  --linha-forte: rgba(64, 224, 255, 0.62);
  --brilho: 0 0 10px rgba(64, 224, 255, 0.42), 0 0 28px rgba(64, 224, 255, 0.16);
  --brilho-forte: 0 0 14px rgba(64, 224, 255, 0.72), 0 0 46px rgba(64, 224, 255, 0.3);
  --brilho-letra: 0 0 12px rgba(64, 224, 255, 0.55);

  /* texto */
  --texto: #dff6ff;
  --texto-2: #93b6c9;
  --texto-3: #6189a0;

  /* avisos */
  --ok: #4dffb5;
  --alerta: #ffb648;
  --perigo: #ff5c7a;

  /* letras */
  --letra-titulo: 'Oxanium', 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  --letra-texto: 'Exo 2', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;

  /* medidas */
  --topo-alt: 60px;
  --barra-alt: 66px;
  --seguro-topo: env(safe-area-inset-top, 0px);
  --seguro-baixo: env(safe-area-inset-bottom, 0px);

  --suave: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* barras de rolagem finas e no tom do painel, em qualquer lugar */
* {
  scrollbar-color: rgba(64, 224, 255, 0.35) transparent;
  scrollbar-width: thin;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--fundo);
  color: var(--texto);
  font: 400 15px/1.45 var(--letra-texto);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--ciano-claro);
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--ciano-claro);
  outline-offset: 2px;
}

::selection {
  background: rgba(64, 224, 255, 0.35);
  color: #fff;
}

.so-leitor {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.espaco {
  flex: 1 1 auto;
}

/* ─── fundo: grade fina, luzes e dois anéis girando devagar ─────────────── */

.fundo {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.fundo::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(64, 224, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 224, 255, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 95% 75% at 50% 25%, #000 15%, transparent 82%);
  mask-image: radial-gradient(ellipse 95% 75% at 50% 25%, #000 15%, transparent 82%);
}

.fundo::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(62% 46% at 50% -10%, rgba(43, 140, 255, 0.24), transparent 70%),
    radial-gradient(42% 38% at 100% 104%, rgba(64, 224, 255, 0.09), transparent 70%),
    radial-gradient(36% 30% at 0% 100%, rgba(43, 140, 255, 0.07), transparent 70%);
}

.fundo-anel {
  position: absolute;
  top: -430px;
  right: -390px;
  width: 920px;
  aspect-ratio: 1;
  border: 1px dashed rgba(64, 224, 255, 0.13);
  border-radius: 50%;
  animation: girar 200s linear infinite;
}

.fundo-anel--2 {
  top: -590px;
  right: -550px;
  width: 1240px;
  border-style: solid;
  border-color: rgba(64, 224, 255, 0.09) rgba(64, 224, 255, 0.09) transparent transparent;
  animation-duration: 260s;
  animation-direction: reverse;
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ─── animações ─────────────────────────────────────────────────────────── */

@keyframes girar {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulsar {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.78);
  }
}

@keyframes respirar {
  0%,
  100% {
    box-shadow: var(--brilho), inset 0 0 24px rgba(64, 224, 255, 0.22);
  }
  50% {
    box-shadow: var(--brilho-forte), inset 0 0 34px rgba(64, 224, 255, 0.34);
  }
}

@keyframes surgir {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes subir {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes descer {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sumir {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes nascer {
  0% {
    transform: scale(0);
  }
  45% {
    transform: scale(1.9);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes chegar {
  0% {
    opacity: 0;
    transform: translateX(26px);
    background-color: rgba(64, 224, 255, 0.2);
  }
  60% {
    opacity: 1;
    transform: none;
    background-color: rgba(64, 224, 255, 0.12);
  }
  100% {
    background-color: transparent;
  }
}

@keyframes onda {
  from {
    opacity: 0.95;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(2.15);
  }
}

@keyframes varrer {
  from {
    background-position: 0 -120%;
  }
  to {
    background-position: 0 220%;
  }
}

/* Quem prefere menos movimento (ajuste do aparelho ou do menu do app). */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

:root[data-movimento='reduzido'] *,
:root[data-movimento='reduzido'] *::before,
:root[data-movimento='reduzido'] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

/* ─── tela de espera (antes do app abrir) ──────────────────────────────── */

.espera {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
  color: var(--texto-2);
  font: 600 12px/1.4 var(--letra-titulo);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.espera-anel {
  width: 64px;
  aspect-ratio: 1;
  border: 2px solid var(--linha);
  border-top-color: var(--ciano);
  border-radius: 50%;
  box-shadow: var(--brilho);
  animation: girar 1.1s linear infinite;
}

.sem-script {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 24px;
  text-align: center;
}
