﻿:root {
  --bg-1: #f5f7ff;
  --bg-2: #c7d7ff;
  --panel: #ffffff;
  --ink: #16203a;
  --accent: #2f55d4;
  --accent-2: #11a78b;
  --warn: #c83f62;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 18px;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", sans-serif;
  background: radial-gradient(circle at 10% 10%, #ffffff 0%, var(--bg-1) 35%, var(--bg-2) 100%);
}

.app {
  width: min(100%, 720px);
  background: var(--panel);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 16px 42px rgba(34, 56, 120, 0.2);
}

.eyebrow {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.68;
}

h1 {
  margin: 8px 0 8px;
  font-size: clamp(1.8rem, 4.5vw, 2.7rem);
}

.lead {
  margin: 0 0 14px;
  line-height: 1.6;
}

.hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.hud p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef2ff;
  font-size: 0.95rem;
}

.hud strong {
  display: inline-block;
  margin-left: 8px;
  font-size: 1.1rem;
}

.arena-wrap {
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #dce4ff;
  background: linear-gradient(180deg, #f8f9ff, #e7efff);
}

.arena {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  touch-action: none;
  user-select: none;
}

.spark {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #fafffc 0%, #79f5d8 45%, #11a78b 100%);
  box-shadow: 0 0 0 4px rgba(17, 167, 139, 0.12);
}

.trace-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(47, 85, 212, 0.16);
  pointer-events: none;
}

.actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  font: inherit;
  color: white;
  background: var(--accent);
  cursor: pointer;
}

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

#retry-button {
  background: var(--accent-2);
}

.status {
  margin: 14px 0 0;
  min-height: 1.5em;
}

.status.warn {
  color: var(--warn);
}

.repo-link-wrap {
  margin: 12px 0 0;
}

.repo-link {
  color: var(--accent);
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  .app {
    padding: 16px;
  }

  .hud {
    grid-template-columns: 1fr;
  }

  .arena {
    aspect-ratio: 4 / 5;
  }
}
