@font-face {
  font-family: 'Mono';
  src: local('Consolas'), local('Courier New');
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: #050608;
  color: #00ff8c;
  font-family: 'Consolas', 'Courier New', monospace;
  height: 100%;
}

.crt {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 18px 60px;
  position: relative;
  z-index: 1;
}

.scanlines {
  pointer-events: none;
  position: fixed; inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.0) 0px,
    rgba(0,0,0,0.15) 1px,
    rgba(0,0,0,0.0) 2px
  );
  mix-blend-mode: multiply;
}
.crt::before { content: ''; }

body::after {
  content: '';
  position: fixed; inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 60%, rgba(0,0,0,0.55) 100%);
}

.logo {
  color: #ff2bd1;
  text-shadow: 0 0 6px #ff2bd1, 0 0 14px #b300ff;
  font-size: 11px;
  line-height: 1.05;
  text-align: center;
  white-space: pre;
  margin: 0 0 6px;
  letter-spacing: 0;
}

.subtitle {
  text-align: center;
  color: #00d4ff;
  text-shadow: 0 0 6px #00d4ff;
  font-size: 12px;
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.blink { animation: blink 1.1s steps(2, start) infinite; color: #ff2bd1; }
@keyframes blink { to { visibility: hidden; } }

.panel {
  border: 1px solid #00ff8c;
  box-shadow: 0 0 20px rgba(0,255,140,0.25), inset 0 0 30px rgba(0,255,140,0.04);
  padding: 20px;
  background: rgba(0, 12, 8, 0.55);
}

.hidden { display: none !important; }

.termline {
  margin-bottom: 16px;
  color: #00ff8c;
  text-shadow: 0 0 4px #00ff8c;
}
.termline.ok { color: #ffe600; text-shadow: 0 0 4px #ffe600; }

.btn {
  background: transparent;
  border: 1px solid #ff2bd1;
  color: #ff2bd1;
  text-shadow: 0 0 4px #ff2bd1;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 18px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all .12s ease;
}
.btn:hover {
  background: #ff2bd1;
  color: #000;
  box-shadow: 0 0 16px #ff2bd1;
}
.btn.small { padding: 8px 12px; font-size: 12px; }

.or {
  text-align: center;
  color: #555;
  margin: 18px 0;
  letter-spacing: 2px;
  font-size: 12px;
}

.hint {
  font-size: 11px;
  color: #00ff8c88;
  margin: -8px 0 16px;
  letter-spacing: 0.5px;
}

.nickrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.nicklabel {
  color: #ffe600;
  text-shadow: 0 0 4px #ffe600;
  font-size: 12px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.joinrow, .linkrow, .inputrow {
  display: flex;
  gap: 10px;
}

.input, .msg-input {
  flex: 1;
  background: #000;
  border: 1px solid #00d4ff;
  color: #00d4ff;
  text-shadow: 0 0 3px #00d4ff;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
}
.input::placeholder, .msg-input::placeholder { color: #045a66; text-shadow: none; }

#link-box { margin-top: 20px; }
.linkrow { margin-bottom: 16px; }

.error {
  margin-top: 14px;
  color: #ff3b3b;
  text-shadow: 0 0 6px #ff3b3b;
}

/* lobby */
.roster {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.roster-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px dashed #00d4ff55;
  padding: 8px 12px;
  font-size: 13px;
  color: #00d4ff;
  text-shadow: 0 0 3px #00d4ff;
}
.roster-row .you { color: #ffe600; text-shadow: 0 0 3px #ffe600; }
.roster-row .waiting { color: #888; font-style: italic; font-size: 11px; }

.lobby-log {
  height: 160px;
  font-size: 12px;
  border-top: 1px dashed #00ff8c33;
  padding-top: 10px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
}
.overlay-box {
  border: 1px solid #ff2bd1;
  box-shadow: 0 0 30px #ff2bd1aa;
  background: #0a0010;
  padding: 28px 36px;
  text-align: center;
}
.overlay-text {
  color: #ff2bd1;
  text-shadow: 0 0 8px #ff2bd1;
  font-size: 16px;
  margin-bottom: 20px;
  letter-spacing: 1px;
}
.overlay-row {
  display: flex;
  gap: 14px;
  justify-content: center;
}

.terms-box {
  max-width: 640px;
  text-align: left;
}
.terms-body {
  font-size: 12px;
  line-height: 1.7;
  color: #00d4ff;
  text-shadow: none;
  margin-bottom: 20px;
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 8px;
}
.terms-body::-webkit-scrollbar { width: 6px; }
.terms-body::-webkit-scrollbar-thumb { background: #00d4ff55; }
.terms-body p { margin: 0 0 14px; }
.terms-body .hl { color: #ff2bd1; text-shadow: 0 0 4px #ff2bd1; }
.terms-agree {
  color: #ffe600 !important;
  text-shadow: 0 0 4px #ffe600 !important;
  font-style: italic;
}

/* chat */
.statusbar {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #ffe600;
  text-shadow: 0 0 4px #ffe600;
  margin-bottom: 12px;
  border-bottom: 1px dashed #00ff8c44;
  padding-bottom: 8px;
}

.log {
  height: 420px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.5;
  padding-right: 6px;
  margin-bottom: 6px;
}
.log::-webkit-scrollbar { width: 8px; }
.log::-webkit-scrollbar-thumb { background: #00ff8c55; }
.log::-webkit-scrollbar-track { background: #000; }

.line { margin-bottom: 4px; white-space: pre-wrap; word-break: break-word; }
.line .h { color: #ff2bd1; text-shadow: 0 0 4px #ff2bd1; }
.line .h.me { color: #00d4ff; text-shadow: 0 0 4px #00d4ff; }
.line .sys { color: #ffe600; text-shadow: 0 0 4px #ffe600; font-style: italic; }
.line .err { color: #ff3b3b; }

.line.provisional {
  opacity: 0.55;
  font-style: italic;
}
.line.provisional .cursor {
  animation: blink 0.9s steps(2, start) infinite;
  color: #00ff8c;
}

#btn-leave {
  margin-left: auto;
}

.prompt {
  color: #00ff8c;
  font-size: 16px;
  align-self: center;
}

.footer {
  text-align: center;
  margin-top: 26px;
  font-size: 11px;
  color: #444;
  letter-spacing: 1px;
}
