:root {
  color-scheme: dark;
  --bg: #0b0c10;
  --tv-body: #2b2f36;
  --tv-body-dark: #1a1d22;
  --screen: #0d1210;
  --screen-glow: #7CFC9A;
  --accent: #7CFC9A;
  --text: #e9f5ec;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, #15181d, var(--bg) 70%);
  font-family: 'Courier New', Consolas, monospace;
  color: var(--text);
  padding: 24px 16px;
}

.stage {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.tv {
  position: relative;
  width: 100%;
  background: linear-gradient(145deg, var(--tv-body), var(--tv-body-dark));
  border-radius: 24px;
  padding: 22px 22px 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5), inset 0 0 0 4px #10131a;
}

.tv-screen {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--screen);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8), 0 0 18px rgba(124,252,154,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.static-noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 3px);
  animation: flicker 6s steps(2) infinite;
  pointer-events: none;
}

@keyframes flicker {
  0%, 100% { opacity: 0.04; }
  50% { opacity: 0.08; }
}

.screen-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 16px;
  color: var(--screen-glow);
  text-shadow: 0 0 8px rgba(124,252,154,0.6);
}

.prompt {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  margin: 0;
}

.tv-speaker {
  position: absolute;
  right: 18px;
  bottom: 14px;
  width: 60px;
  height: 10px;
  border-radius: 6px;
  background: repeating-linear-gradient(90deg, #10131a 0 4px, transparent 4px 8px);
}

.tv-knob {
  position: absolute;
  left: 22px;
  bottom: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10131a;
  box-shadow: inset 0 0 0 2px #444a55;
}

.code-form {
  display: flex;
  gap: 8px;
  width: 100%;
}

.code-form input,
.admin-form input {
  flex: 1;
  background: #12151a;
  border: 1px solid #333a44;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.code-form button,
.admin-form button {
  background: var(--accent);
  color: #06140a;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: bold;
  cursor: pointer;
}

.code-form button:hover,
.admin-form button:hover {
  filter: brightness(1.1);
}

.message {
  min-height: 1.2em;
  font-size: 0.9rem;
  opacity: 0.85;
  text-align: center;
}

.admin-panel {
  width: 100%;
  border: 1px dashed #333a44;
  border-radius: 12px;
  padding: 16px;
}

.admin-panel.hidden {
  display: none;
}

.admin-panel h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.admin-form {
  margin-bottom: 14px;
}

.code-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.code-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #12151a;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.85rem;
}

.code-list code {
  color: var(--accent);
}

.code-list button {
  background: #3a1a1a;
  color: #f5b8b8;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.8rem;
}

.code-list button:hover {
  filter: brightness(1.2);
}
