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

:root {
  --bg: #0b0813;
  --panel: #171126;
  --purple: #a66cff;
  --bright: #d1a8ff;
  --text: #eee6ff;
  --muted: #a99bbd;
  --border: #392653;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at top, #29163f 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: Georgia, serif;
  padding: 20px;
}

#app {
  max-width: 850px;
  margin: auto;
}

.screen {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden {
  display: none !important;
}

.title-content {
  text-align: center;
  max-width: 650px;
  padding: 30px 15px;
}

.eyebrow {
  color: var(--bright);
  letter-spacing: 4px;
  font-size: 11px;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(48px, 12vw, 88px);
  line-height: 0.95;
  letter-spacing: 5px;
  text-shadow: 0 0 30px #9c58ff66;
}

h1 span {
  color: var(--purple);
}

.subtitle {
  letter-spacing: 8px;
  color: var(--bright);
  margin: 22px 0;
}

.intro {
  color: var(--muted);
  line-height: 1.8;
  margin: 25px auto;
  max-width: 460px;
}

button {
  background: linear-gradient(135deg, #7540b5, #432269);
  color: white;
  border: 1px solid #bd91ff;
  padding: 14px 22px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}

button:hover {
  box-shadow: 0 0 20px #a66cff66;
  transform: translateY(-2px);
}

.panel {
  background: linear-gradient(145deg, #1c1430, #110d1c);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin: 16px 0;
  box-shadow: 0 8px 25px #0005;
}

h2 {
  color: var(--bright);
  margin-bottom: 16px;
}

h3 {
  color: var(--bright);
  margin-bottom: 15px;
}

label {
  display: block;
  color: var(--muted);
  margin: 18px 0 8px;
}

input, select {
  width: 100%;
  padding: 13px;
  border-radius: 7px;
  background: #0c0914;
  color: white;
  border: 1px solid var(--border);
  font-size: 15px;
}

.panel button {
  margin: 6px 4px 0 0;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 0;
}

header h2 {
  margin: 0;
}

#race-display {
  color: var(--bright);
  border: 1px solid var(--border);
  padding: 9px 13px;
  border-radius: 20px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  text-align: center;
}

.stats span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 9px;
}

.stats strong {
  color: var(--bright);
  font-size: 22px;
}

.world-panel {
  background:
    linear-gradient(#171126dd, #171126ee),
    radial-gradient(circle at center, #7145a5, #171126);
}

.world-panel p:last-child {
  color: var(--muted);
  line-height: 1.7;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#event-log {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 15px;
}

@media (max-width: 480px) {
  body {
    padding: 12px;
  }

  .panel {
    padding: 17px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  header {
    align-items: flex-start;
  }
}
