:root {
  --bg: #070b0e;
  --panel: #0d1419;
  --border: #1e332d;
  --neon: #39ff88;
  --neon-dim: rgba(57, 255, 136, 0.14);
  --amber: #fbbf24;
  --text: #e2f1ec;
  --muted: #7a998e;
}

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

body {
  background: radial-gradient(circle at top, #0f1f1a 0%, var(--bg) 65%);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.22) 4px
  );
}

.terminal {
  width: 100%;
  max-width: 700px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 0 40px rgba(57, 255, 136, 0.08);
  position: relative;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--neon);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 10px var(--neon);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.badge {
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  color: var(--amber);
}

.hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.avatar {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--neon);
  box-shadow: 0 0 18px rgba(57, 255, 136, 0.25);
  transition: transform 0.15s ease;
  cursor: pointer;
}

.avatar.booped {
  transform: scale(1.07) rotate(-3deg);
}

.snoot-bar {
  display: flex;
  gap: 0.35rem;
}

.mini-btn {
  background: #080d10;
  color: var(--neon);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.25rem 0.45rem;
  font-family: inherit;
  font-size: 0.68rem;
  cursor: pointer;
}

.mini-btn:hover {
  border-color: var(--neon);
}

.mini-btn.treat {
  color: var(--amber);
}

.mini-btn.treat:hover {
  border-color: var(--amber);
}

h1 {
  font-size: 1.85rem;
  letter-spacing: 0.06em;
  color: var(--neon);
  text-shadow: 0 0 14px rgba(57, 255, 136, 0.35);
}

.tagline {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  margin-top: 0.35rem;
}

.label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.mode-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.mode-btn {
  background: #090f13;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.6rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-btn.active,
.mode-btn:hover {
  color: var(--neon);
  border-color: var(--neon);
  background: var(--neon-dim);
}

textarea {
  width: 100%;
  background: #080d10;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  margin-bottom: 0.9rem;
}

textarea:focus {
  outline: none;
  border-color: var(--neon);
}

.actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

button.primary {
  background: var(--neon);
  color: #041109;
  border: none;
  padding: 0.7rem 1.25rem;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

button.secondary,
button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.7rem 1rem;
  border-radius: 6px;
  font-family: inherit;
  cursor: pointer;
}

button.ghost {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.output-panel {
  background: #060a0d;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.output-box {
  white-space: pre-wrap;
  line-height: 1.55;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text);
  min-height: 90px;
}

@media (max-width: 560px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .mode-buttons {
    grid-template-columns: 1fr;
  }
}
