:root {
  --bg: #0f1720;
  --panel: #18222d;
  --panel-2: #1f2c39;
  --text: #e8eef5;
  --muted: #a8b6c6;
  --border: #314253;
  --accent: #4cc9f0;
  --good: #39d353;
  --neutral: #3b82f6;
  --bad: #ff6b6b;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, Arial, sans-serif;
  background:
    radial-gradient(circle at top, #183248 0%, #0f1720 45%),
    #0f1720;
  color: var(--text);
}

.container {
  max-width: 1250px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.hero,
.panel {
  background: rgba(24, 34, 45, 0.92);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 28px;
  margin-bottom: 20px;
}

.panel {
  padding: 22px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0 0 8px;
}

.subhead,
.panel p,
.empty,
.status {
  color: var(--muted);
}

.field-note-text {
  margin: 0;
  color: var(--text);
  font-weight: 500;
}

.final-note {
  font-size: 1.02rem;
  line-height: 1.5;
}

.final-coords {
  color: var(--good);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
}

.good {
  color: var(--good);
}

.neutral {
  color: var(--neutral);
}

.bad {
  color: var(--bad);
}

.panel-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.panel-actions {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 10px;
}

.global-status {
  min-height: 1.5em;
  margin: 0;
  text-align: right;
}

.attempts {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.side-panel {
  min-width: 0;
}

.guess-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

input[type="text"] {
  flex: 1 1 240px;
  min-width: 220px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.15);
}

input[type="text"]:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

button {
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: var(--good);
  color: #08120c;
  font-weight: 800;
}

button:hover {
  filter: brightness(1.05);
}

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

button.secondary,
a.secondary {
  background: #314253;
  color: var(--text);
  border: none;
}

.status {
  min-height: 1.5em;
  margin: 14px 2px 0;
  font-weight: 600;
}

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

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

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

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text);
  font-size: 0.98rem;
}

.pill {
  display: inline-block;
  min-width: 62px;
  text-align: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
}

.pill.good {
  background: rgba(57, 211, 83, 0.12);
  color: var(--good);
  border: 1px solid rgba(57, 211, 83, 0.32);
}

.pill.neutral {
  background: rgba(59, 130, 246, 0.12);
  color: var(--neutral);
  border: 1px solid rgba(59, 130, 246, 0.32);
}

.pill.bad {
  background: rgba(255, 107, 107, 0.12);
  color: var(--bad);
  border: 1px solid rgba(255, 107, 107, 0.32);
}

.progress-wrap {
  min-width: 110px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
}

.progress-fill.good {
  background: var(--good);
}

.progress-fill.neutral {
  background: var(--neutral);
}

.progress-fill.bad {
  background: var(--bad);
}

.progress-text {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.empty {
  text-align: center;
  padding: 18px;
}

.bottom-home {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 32px 0 12px;
}

.bottom-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 18px;
  border-radius: 10px;

  background: rgba(76, 201, 240, 0.12);
  border: 1px solid rgba(76, 201, 240, 0.35);

  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;

  transition: all 0.18s ease;
}

.bottom-home-link:hover {
  background: rgba(76, 201, 240, 0.18);
  border-color: var(--accent);
  color: #7fdcff;
  transform: translateY(-1px);
}

.site-footer {
  text-align: center;
  color: var(--muted);
  margin: 12px 0 24px;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .dual-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .panel-top {
    flex-direction: column;
  }

  .panel-actions {
    align-items: start;
  }

  .global-status {
    text-align: left;
  }

  .attempts {
    white-space: normal;
  }

  button {
    width: 100%;
  }
}
