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

body {
  background: #000;
  color: #cc0000;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

#app {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px 16px;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 4px;
  text-transform: uppercase;
}

h2 {
  font-size: 1.2rem;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
}

hr {
  border: none;
  border-top: 1px solid #cc0000;
  margin: 16px 0;
}

.tagline {
  text-align: center;
  font-size: 1rem;
  margin: 12px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.notice {
  text-align: center;
  font-size: 0.8rem;
  color: #880000;
  margin: 12px 0;
}

.footnote {
  text-align: center;
  font-size: 0.75rem;
  color: #880000;
  margin-top: 12px;
}

.section {
  border: 1px solid #cc0000;
  padding: 24px;
  margin-bottom: 20px;
}

.hidden { display: none !important; }

.status-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin: 12px 0;
}

button {
  background: #000;
  color: #cc0000;
  border: 1px solid #cc0000;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  padding: 8px 16px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}

button:hover:not(:disabled) {
  background: #cc0000;
  color: #000;
}

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

#payBtn {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  letter-spacing: 3px;
  margin: 16px 0;
}

.coin-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.coin-btn {
  flex: 1;
  padding: 10px;
  font-size: 0.85rem;
  letter-spacing: 2px;
}

.coin-btn.active {
  background: #cc0000;
  color: #000;
}

.addr-box {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.addr-box code {
  flex: 1;
  display: block;
  padding: 10px;
  border: 1px solid #cc0000;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.7rem;
  color: #cc0000;
  word-break: break-all;
  background: #000;
}

.wait-msg {
  text-align: center;
  font-size: 0.8rem;
  padding: 8px;
  border: 1px dashed #cc0000;
  animation: blink 1.2s step-end infinite;
}

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

.chat-log {
  height: 300px;
  overflow-y: auto;
  border: 1px solid #cc0000;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.chat-log > div {
  margin-bottom: 8px;
}

.msg-system { color: #880000; font-style: italic; }
.msg-user { color: #cc0000; }
.msg-ai { color: #ff4444; }

.typing-indicator {
  color: #880000;
  animation: blink 0.8s step-end infinite;
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input-row input {
  flex: 1;
  background: #000;
  border: 1px solid #cc0000;
  color: #cc0000;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  padding: 8px;
}

.chat-input-row input:focus { outline: none; }
.chat-input-row input:disabled { opacity: 0.3; }

.timer-bar {
  height: 3px;
  background: #cc0000;
  margin-top: 8px;
  transition: width 1s linear;
  width: 100%;
}

@media (max-width: 480px) {
  #app { padding: 16px 10px; }
  h1 { font-size: 1.5rem; }
  .section { padding: 16px; }
  .addr-box { flex-direction: column; }
  .addr-box code { font-size: 0.65rem; }
}
