/* Tema escuro. O fundo fica em preto puro (#000) de proposito: por tras de
   um terminal translucido, qualquer cinza vira uma mancha lavada. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #000;
  color: #cfe8cf;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  overflow: hidden;
}

/* ---------- tela de entrada ---------- */

#gate {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
/* O atributo [hidden] do HTML tem a mesma especificidade que #gate no CSS;
   sem esta regra explicita, o `display: flex` acima venceria a cascata e a
   tela de entrada continuaria visivel mesmo com `hidden` setado no JS. */
#gate[hidden] {
  display: none;
}

#tune {
  background: transparent;
  border: 1px solid #2f6b2f;
  color: #7fdf7f;
  padding: 0.9rem 2.5rem;
  font: inherit;
  letter-spacing: 0.25em;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
#tune:hover:not(:disabled) {
  background: #0b1a0b;
  box-shadow: 0 0 18px rgba(0, 255, 0, 0.15);
}
#tune:disabled { opacity: 0.5; cursor: default; }

.hint { color: #4a6a4a; font-size: 0.8rem; margin: 0; }

/* ---------- radio ---------- */

#radio {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 2rem clamp(1rem, 5vw, 4rem);
  gap: 1.5rem;
}
#radio[hidden] {
  display: none;
}

#viz {
  flex: 1;
  width: 100%;
  min-height: 0;   /* deixa o flex encolher o canvas de verdade */
  display: block;
}

#info { text-align: center; }

#onair {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: #d33;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #d33;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.25; } }

#title {
  font-size: 1.3rem;
  color: #eaffea;
  margin-top: 0.6rem;
}
#artist { color: #5f8f5f; font-size: 0.9rem; }
#time   { color: #3f5f3f; font-size: 0.8rem; margin-top: 0.4rem; }

#controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #3f5f3f;
}
#volwrap { display: flex; align-items: center; gap: 0.6rem; letter-spacing: 0.2em; }
#vol { accent-color: #4fbf4f; width: 120px; }

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
}
