/* ========= GLOBAL ========= */
body {
  margin: 0;
  background: #0f1115;
  color: #e6e6e6;
  font-family: "IBM Plex Mono", "Noto Sans SC", monospace;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

body.night {
  background: #0b0d11;
}

.game {
  width: 420px;
  padding: 24px 20px 40px;
}

/* ========= HEADER ========= */
h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: #9aa0a6;
}

.time {
  margin-top: 12px;
  font-size: 14px;
  color: #9aa0a6;
}

/* ========= DIVIDER ========= */
.divider {
  border-top: 1px solid #2a2f36;
  margin: 18px 0;
}

/* ========= STATS ========= */
.stats {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.8;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.stat {
  display: flex;
  gap: 4px;
}

.stat .value {
  color: #c46a45;
}

/* ========= LOG ========= */
.log {
  min-height: 280px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
}

.effects {
  margin-top: 8px;
  font-size: 13px;
  color: #c46a45;
}

/* ========= ACTIONS ========= */
.actions {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

button {
  background: transparent;
  border: 1px solid #2a2f36;
  color: #e6e6e6;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

button:hover {
  border-color: #c46a45;
  color: #c46a45;
}

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

/* ========= GAME OVER ========= */
.gameover {
  margin-top: 20px;
  text-align: center;
  color: #9aa0a6;
}

.death-message {
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-line;
  margin-bottom: 10px;
  color: #e6e6e6;
}

.survival-days {
  font-size: 16px;
  color: #c46a45;
  font-weight: 500;
  margin-bottom: 20px;
}

/* ========= HISTORY SECTION ========= */
.history-section {
  margin-top: 24px;
  text-align: left;
}

.history-section h3 {
  font-size: 13px;
  color: #9aa0a6;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.history-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #2a2f36;
  padding: 12px;
  background: #0a0c0f;
}

.history-item {
  padding: 10px 0;
  border-bottom: 1px solid #2a2f36;
  font-size: 13px;
}

.history-item:last-child {
  border-bottom: none;
}

.history-header {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.history-day {
  color: #c46a45;
  font-weight: 500;
}

.history-period {
  color: #9aa0a6;
  font-size: 12px;
}

.history-action {
  color: #e6e6e6;
  margin-bottom: 4px;
  font-weight: 500;
}

.history-event {
  color: #b0b5ba;
  line-height: 1.5;
  white-space: pre-line;
}

.history-effects {
  margin-top: 6px;
  color: #c46a45;
  font-size: 12px;
  white-space: pre-line;
}

/* ========= RESTART BUTTON ========= */
.restart-btn {
  width: 100%;
  text-align: center;
  border-color: #c46a45;
  color: #c46a45;
  font-weight: 500;
  margin-top: 10px;
}

.restart-btn:hover {
  background: #c46a45;
  color: #0f1115;
}

