body {
  background: linear-gradient(180deg, #21090d 0%, #0c090b 44%, #050507 100%);
}

.fight-shell {
  width: min(100%, 720px);
  padding-top: 18px;
}

.fight-title {
  margin: 12px 0 18px;
}

.fight-title h1 {
  margin-bottom: 8px;
  color: #fee2e2;
  font-size: clamp(3rem, 18vw, 6.5rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.fight-title p:last-child {
  max-width: 30rem;
  color: #fca5a5;
  font-weight: 700;
}

.setup-card {
  padding: 18px;
  border-color: rgba(239, 68, 68, 0.45);
  background: linear-gradient(180deg, rgba(49, 16, 20, 0.98), rgba(17, 10, 12, 0.98));
}

.setup-card h2 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.config-grid {
  display: grid;
  gap: 16px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  color: #fecaca;
  font-weight: 900;
  text-transform: uppercase;
}

.time-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.time-inputs span {
  color: #fca5a5;
  font-size: 1.7rem;
  font-weight: 900;
}

.field-group input {
  min-height: 58px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid rgba(248, 113, 113, 0.42);
  border-radius: var(--radius);
  background: #0f080a;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 900;
  text-align: center;
}

.fight-setup.has-error input {
  border-color: #fb7185;
}

.setup-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.fight-play-button {
  min-height: 62px;
  border-radius: var(--radius);
  background: #ef4444;
  color: white;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: uppercase;
}

.setup-status {
  min-height: 22px;
  margin: 14px 0 0;
  color: #fecaca;
  font-weight: 800;
}

.fight-run {
  min-height: calc(100vh - 150px);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 14px 0 28px;
  text-align: center;
}

.run-state {
  margin: 0;
  color: #fca5a5;
  font-size: clamp(1.8rem, 9vw, 4rem);
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.run-clock {
  display: block;
  width: 100%;
  color: white;
  font-family: "Arial Black", Impact, "Segoe UI", sans-serif;
  font-size: clamp(5.5rem, 28vw, 13rem);
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 0.9;
  text-shadow: 0 8px 28px rgba(239, 68, 68, 0.36);
}

.run-progress {
  margin: 0;
  color: #fed7d7;
  font-size: clamp(1.1rem, 5vw, 2rem);
  font-weight: 900;
  text-transform: uppercase;
}

.status-message {
  min-height: 24px;
  margin: 0;
  color: #fdba74;
  font-weight: 900;
}

.controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.run-home-action {
  width: min(100%, 320px);
  margin-top: 4px;
}

.controls button {
  min-height: 60px;
  padding: 0 10px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: clamp(0.9rem, 4vw, 1.1rem);
  font-weight: 900;
  text-transform: uppercase;
  touch-action: manipulation;
}

#start {
  background: #f97316;
  color: #111827;
}

#pause {
  background: #27272a;
  color: white;
  border: 1px solid #52525b;
}

#stop {
  background: #ef4444;
  color: white;
}

body.is-paused .fight-run {
  background: linear-gradient(180deg, rgba(120, 113, 108, 0.12), transparent);
}

body.is-paused .run-state {
  color: #fdba74;
}

body.is-complete .run-state,
body.is-complete .status-message {
  color: #fdba74;
}

body.is-complete .controls {
  grid-template-columns: 1fr;
  max-width: 420px;
}

@media (orientation: landscape) and (max-height: 520px) {
  .app-footer {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .fight-run {
    min-height: calc(100vh - 80px);
    gap: 8px;
  }

  .run-clock {
    font-size: clamp(4rem, 18vw, 8rem);
  }

  .controls button {
    min-height: 48px;
  }
}

@media (min-width: 620px) {
  .setup-actions {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}
