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

html, body {
  height: 100%;
  background: #0b0d17;
  color: #e8e9f3;
  font-family: 'Courier New', monospace;
  overflow: hidden;
}

#app {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#game {
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  background: #10121f;
  border-radius: 6px;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: rgba(11, 13, 23, 0.88);
  text-align: center;
}

.overlay.hidden { display: none; }

.overlay h1 {
  font-size: 44px;
  letter-spacing: 6px;
  font-weight: 700;
}

.overlay h1 span { color: #ff5d5d; }

.overlay .sub {
  color: #9aa0c0;
  letter-spacing: 3px;
  font-size: 13px;
  text-transform: uppercase;
}

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

.buttons button {
  font-family: inherit;
  font-size: 17px;
  letter-spacing: 2px;
  padding: 12px 44px;
  background: #1b2340;
  color: #e8e9f3;
  border: 1px solid #494d78;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.buttons button:hover {
  background: #ff5d5d;
  border-color: #ff5d5d;
  color: #0b0d17;
}

.controls {
  color: #9aa0c0;
  font-size: 13px;
  line-height: 1.9;
}

.controls b { color: #e8e9f3; }

.foot {
  color: #565b80;
  font-size: 12px;
  letter-spacing: 1px;
}

.ai-status {
  color: #9aa0c0;
  font-size: 13px;
  min-height: 16px;
}

.ai-status.ok { color: #7fe0a0; }

.file-label {
  color: #9aa0c0;
  font-size: 12px;
  border: 1px dashed #494d78;
  border-radius: 4px;
  padding: 6px 14px;
  cursor: pointer;
}

.file-label:hover { color: #e8e9f3; border-color: #9aa0c0; }

.file-label input { display: none; }

.speedbar {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
  color: #9aa0c0;
  font-size: 13px;
}

.speedbar.hidden { display: none; }

.speedbar button {
  font-family: inherit;
  font-size: 12px;
  padding: 4px 12px;
  background: rgba(27, 35, 64, 0.85);
  color: #e8e9f3;
  border: 1px solid #494d78;
  border-radius: 4px;
  cursor: pointer;
}

.speedbar button.active { background: #5db4ff; color: #0b0d17; border-color: #5db4ff; }

.speedbar .hint { color: #565b80; margin-left: 8px; }

#online {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#online.hidden { display: none; }

#online h2 { letter-spacing: 4px; font-size: 22px; }

#online .form { display: flex; flex-direction: column; gap: 10px; }

#online input {
  font-family: inherit;
  font-size: 16px;
  padding: 10px 14px;
  width: 260px;
  background: #1b2340;
  border: 1px solid #494d78;
  border-radius: 4px;
  color: #e8e9f3;
  text-align: center;
  letter-spacing: 2px;
}

#online input:focus { outline: none; border-color: #5db4ff; }

#online .row { display: flex; gap: 12px; }

#online .row button {
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 2px;
  padding: 10px 24px;
  background: #1b2340;
  color: #e8e9f3;
  border: 1px solid #494d78;
  border-radius: 4px;
  cursor: pointer;
}

#online .row button:hover { background: #5db4ff; color: #0b0d17; border-color: #5db4ff; }

.net-msg { color: #ffb054; font-size: 13px; min-height: 18px; }

.linklike {
  background: none;
  border: none;
  color: #9aa0c0;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.linklike:hover { color: #e8e9f3; }