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

html, body {
  height: 100%;
  background: #000;
  color: #fff;
  font-family: sans-serif;
  overflow: hidden;
}

/* ── Edit Screen ─────────────────────────────────────── */

#edit-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
}

.edit-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 480px;
}

.app-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
}

#text-input {
  width: 100%;
  height: 140px;
  background: #111;
  border: 2px solid #333;
  border-radius: 10px;
  color: #fff;
  font-size: 1.1rem;
  padding: 14px;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}

#text-input:focus {
  border-color: #fff;
}

#text-input::placeholder {
  color: #555;
}

/* ── Controls ────────────────────────────────────────── */

.controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}


.btn-show {
  background: #fff;
  border: none;
  border-radius: 10px;
  color: #000;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}

.btn-show:active {
  opacity: 0.8;
}

/* ── Banner Screen ───────────────────────────────────── */

#banner-screen {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  /* prevent text selection on tap */
  user-select: none;
  -webkit-user-select: none;
}

#banner-screen.hidden {
  display: none;
}

#banner-text-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#banner-text {
  display: block;
  color: #fff;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-word;
  /* font-size is set dynamically via JS */
}


/* ── Tap hint ────────────────────────────────────────── */

#tap-hint {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: #333;
  letter-spacing: 0.08em;
  pointer-events: none;
  transition: opacity 0.5s;
}

/* ── Scroll Button ───────────────────────────────────── */

.btn-scroll {
  background: #111;
  border: 2px solid #333;
  border-radius: 8px;
  color: #888;
  font-size: 0.95rem;
  padding: 10px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  text-align: center;
}

.btn-scroll.active {
  border-color: #fff;
  color: #fff;
}

/* ── Scroll Mode ─────────────────────────────────────── */

/* In scroll mode the wrapper clips and anchors text to the left */
#banner-screen.scroll-mode #banner-text-wrapper {
  overflow: hidden;
  padding: 0;
  justify-content: flex-start;
}

#banner-screen.scroll-mode #banner-text {
  display: inline-block;
  white-space: nowrap;
  word-break: normal;
  max-width: none;
  animation: marquee 18s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(100vw); }
  to   { transform: translateX(calc(-100% - 40px)); }
}

/* ── Utility ─────────────────────────────────────────── */

.hidden {
  display: none !important;
}
