/* Prom13us 3D Client — Styles */

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

body {
  overflow: hidden;
  font-family: 'Press Start 2P', monospace;
  background: #1a1a1a;
  color: #fff;
}

#app {
  width: 100vw;
  height: 100vh;
  position: relative;
}

#canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Health bars */
.health-bars {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.8);
  padding: 12px;
  border: 3px solid #000;
}

.health-bars .agent-name {
  font-size: 12px;
  color: #fff;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bar {
  width: 180px;
  height: 16px;
  background: #222;
  border: 2px solid #000;
  position: relative;
}

.bar .fill {
  height: 100%;
  transition: width 0.3s ease;
}

.bar.integrity .fill { background: #4ade80; }
.bar.composure .fill { background: #60a5fa; }
.bar.hunger .fill { background: #f97316; }

.bar .label {
  position: absolute;
  right: 6px;
  top: 1px;
  font-size: 8px;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}

.bar .value {
  position: absolute;
  left: 6px;
  top: 1px;
  font-size: 8px;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}

.health-bars .lease-status {
  margin-top: 6px;
  font-size: 10px;
  color: #a78bfa;
  text-transform: uppercase;
}

/* Event feed (Phase 4) */
.event-feed {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 300px;
  pointer-events: auto;
}

.event {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 10px 14px;
  font-size: 10px;
  border: 2px solid #000;
  border-left: 4px solid #00d9ff;
}

.event.fading {
  opacity: 0;
  transition: opacity 1s ease;
}

/* Name tags */
.name-tag {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 4px 10px;
  font-size: 8px;
  border: 2px solid #000;
  pointer-events: none;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: opacity 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Affinity-colored name tags */
.name-tag.affinity-blaze { border-left: 3px solid #ff4d1a; }
.name-tag.affinity-tide { border-left: 3px solid #1a80ff; }
.name-tag.affinity-forge { border-left: 3px solid #996633; }
.name-tag.affinity-static { border-left: 3px solid #ffff33; }
.name-tag.affinity-void { border-left: 3px solid #661a99; }
.name-tag.affinity-null { border-left: 3px solid #b3b3b3; }

/* Debug info */
.debug-info {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px;
  font-size: 10px;
  border: 2px solid #333;
  pointer-events: auto;
}

.debug-info p {
  margin: 4px 0;
}

/* Playable loop dock */
.mission-dock {
  position: absolute;
  left: 20px;
  top: 20px;
  width: 320px;
  padding: 12px;
  border: 2px solid #000;
  background: rgba(12, 18, 28, 0.9);
  pointer-events: auto;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mission-dock-title {
  font-size: 12px;
  color: #ffcc80;
}

.mission-dock-agent,
.mission-dock-lease,
.mission-dock-status {
  font-size: 9px;
  line-height: 1.5;
}

.mission-dock-agent {
  color: #d7f0ff;
}

.mission-dock-lease {
  color: #b8ffdb;
}

.mission-dock-status {
  color: #9ad3ff;
}

.mission-dock-status[data-tone="success"] {
  color: #8bffb5;
}

.mission-dock-status[data-tone="error"] {
  color: #ffb2a8;
}

.mission-dock-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.mission-dock-button {
  min-height: 28px;
  border: 1px solid #203247;
  border-radius: 6px;
  background: #162133;
  color: #f0f7ff;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  line-height: 1.1;
  cursor: pointer;
}

.mission-dock-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mission-dock-button:hover:not(:disabled) {
  border-color: #3d6998;
  background: #1e2d44;
}

.mission-dock-log {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 84px;
  overflow-y: auto;
  padding-right: 4px;
}

.mission-dock-log li {
  font-size: 8px;
  line-height: 1.4;
  color: #d2dde8;
  border-left: 2px solid #35506e;
  padding-left: 6px;
}

/* Onboarding */
.onboarding-modal {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 7, 14, 0.78);
  pointer-events: auto;
  padding: 16px;
}

.onboarding-card {
  width: min(96vw, 440px);
  border: 2px solid #1f3550;
  border-radius: 6px;
  background: rgba(11, 18, 29, 0.96);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.onboarding-title {
  font-size: 14px;
  color: #ffd39a;
}

.onboarding-description {
  font-size: 9px;
  line-height: 1.6;
  color: #d3deee;
}

.onboarding-form {
  display: grid;
  gap: 8px;
}

.onboarding-input,
.onboarding-select {
  width: 100%;
  min-height: 32px;
  border: 1px solid #2a405c;
  border-radius: 6px;
  background: #101b2b;
  color: #f5fbff;
  padding: 8px 10px;
  font-size: 10px;
  font-family: 'Press Start 2P', monospace;
}

.onboarding-input::placeholder {
  color: #8ca2ba;
}

.onboarding-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.onboarding-button {
  min-height: 34px;
  border: 1px solid #315479;
  border-radius: 6px;
  background: #1a2c44;
  color: #f4fbff;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  cursor: pointer;
}

.onboarding-button:hover:not(:disabled) {
  background: #223857;
}

.onboarding-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.onboarding-button-secondary {
  border-color: #4c5f75;
  background: #1f2937;
}

.onboarding-mini-label {
  font-size: 8px;
  color: #a8c0dd;
}

.onboarding-error {
  min-height: 14px;
  font-size: 8px;
  color: #ffaba0;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .mission-dock {
    left: 12px;
    top: 12px;
    width: calc(100vw - 24px);
    max-width: 420px;
  }
}
