html, body {
  margin: 0;
  background: black;
  color: white;
  font-family: 'VT323', monospace;
  height: 100%;
  overflow: hidden;
}

#controls {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 1000;
}

#controls button {
  font-family: inherit;
  font-size: 18px;
  margin-right: 6px;
}

#viewport {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#screen {
  position: relative;
  background: black;
  overflow: hidden;
}

.aspect-4-3 {
  width: 640px;
  height: 480px;
}

.aspect-16-9 {
  width: 1280px;
  height: 720px;
}

.band {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 4px;
  box-sizing: border-box;
  text-transform: uppercase;
  white-space: pre-wrap;
}

.band.center {
  justify-content: center;
  text-align: center;
}

.band.left {
  justify-content: flex-start;
}

.band.right {
  justify-content: flex-end;
}

.font-small { font-size: 24px; }
.font-medium { font-size: 36px; }
.font-large { font-size: 48px; }
.font-xlarge { font-size: 72px; }

.blink {
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Ticker */
#ticker {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 48px;
  background: #003300;
  overflow: hidden;
}

#ticker-text {
  position: absolute;
  white-space: nowrap;
  font-size: 32px;
  line-height: 48px;
  will-change: transform;
}
/* ===== CRT SCANLINES ===== */
.scanlines::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.25),
      rgba(0, 0, 0, 0.25) 1px,
      rgba(0, 0, 0, 0.05) 2px
    );
  mix-blend-mode: multiply;
  z-index: 999;
}
/* ===== EDITOR OVERRIDES ===== */
body.editor #viewport {
  position: relative;
  inset: auto;
  flex: 1;
}
/* ===== EDITOR LAYOUT ===== */

#previewPanel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  position: relative;
}

/* subtle separator glow (very 90s) */
#editorPanel {
  box-shadow: inset -2px 0 0 #555;
}
#bands {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 48px; /* EXACTLY ticker height */
  display: flex;
  flex-direction: column;
}
.editor #editorLayout {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: 100vh;
}

.editor #editorPanel {
  overflow-y: auto;
  padding: 12px;
  border-right: 2px solid #333;
}

.editor details {
  margin-bottom: 12px;
  border: 1px solid #444;
  padding: 6px;
  background: #111;
}

.editor summary {
  cursor: pointer;
  font-weight: bold;
  margin-bottom: 6px;
}

.editor label {
  display: block;
  margin-bottom: 8px;
}

.editor textarea{
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
}

.editor input[type="text"],
.editor input[type="number"],
.editor select {
  width: 100%;
  box-sizing: border-box;
}

.editor .button-row {
  display: flex;
  gap: 6px;
  margin: 8px 0;
}
