:root {
  --beacon-bg: rgba(0, 7, 27, 0.72);
  --beacon-panel: rgba(5, 18, 42, 0.92);
  --beacon-line: rgba(122, 255, 210, 0.38);
  --beacon-green: #7affd2;
  --beacon-amber: #ffd166;
  --beacon-red: #ff6b6b;
  --beacon-blue: #74b9ff;
  --beacon-ink: #e9f6ff;
}

.beacon-shell {
  color: var(--beacon-ink);
  overflow: visible;
}

.beacon-hero {
  min-height: 260px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
  align-items: center;
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--beacon-line);
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(2, 10, 28, 0.88), rgba(6, 46, 61, 0.78)),
    url("/images/games/mw2.png") center / cover;
  box-shadow: 0 0 30px rgba(122, 255, 210, 0.12);
}

.beacon-hero-copy {
  max-width: 640px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.beacon-kicker {
  margin: 0 0 8px;
  color: var(--beacon-amber);
  text-transform: uppercase;
  font-size: 0.9rem;
}

.beacon-hero h1 {
  margin: 0 0 12px;
  font-size: 2.2rem;
}

.beacon-hero p {
  margin: 0;
  max-width: 58ch;
  line-height: 1.5;
}

.beacon-sigil {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
}

.beacon-sigil::before,
.beacon-sigil::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 1px solid rgba(122, 255, 210, 0.55);
  box-shadow: 0 0 24px rgba(122, 255, 210, 0.24);
  opacity: 0;
  animation: beacon-pulse 3.4s ease-out infinite;
}

.beacon-sigil::after {
  border-color: rgba(255, 209, 102, 0.42);
  animation-delay: 1.7s;
}

.beacon-core {
  position: relative;
  z-index: 2;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--beacon-green);
  color: var(--beacon-green);
  background: rgba(0, 0, 0, 0.68);
  font-size: 0.82rem;
  text-align: center;
  box-shadow: 0 0 36px rgba(122, 255, 210, 0.38);
}

@keyframes beacon-pulse {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  16% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
    transform: scale(2.35);
  }
}

.beacon-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 16px;
  margin-top: 16px;
  overflow: visible;
}

.beacon-panel {
  position: relative;
  background: var(--beacon-panel);
  border: 1px solid rgba(116, 185, 255, 0.28);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.24);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--beacon-blue);
  font-family: "Arcade", sans-serif;
  font-size: 1rem;
}

.has-tip {
  position: relative;
  cursor: help;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.has-tip:focus {
  outline: 1px solid var(--beacon-amber);
  outline-offset: 3px;
}

.has-tip::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 2000;
  left: 0;
  bottom: calc(100% + 9px);
  width: min(320px, 76vw);
  padding: 10px 12px;
  border: 1px solid rgba(122, 255, 210, 0.45);
  border-radius: 6px;
  background: rgba(1, 8, 24, 0.97);
  color: var(--beacon-ink);
  font-family: "Dos", monospace;
  font-size: 0.82rem;
  line-height: 1.35;
  text-transform: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.source-panel .has-tip::after {
  right: 0;
  left: auto;
}

.has-tip:hover::after,
.has-tip:focus::after {
  opacity: 1;
  transform: translateY(0);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(122, 255, 210, 0.45);
  color: var(--beacon-green);
  background: rgba(122, 255, 210, 0.08);
  font-family: "Dos", monospace;
  font-size: 0.82rem;
  white-space: nowrap;
}

.status-pill.pending {
  border-color: rgba(255, 209, 102, 0.55);
  color: var(--beacon-amber);
  background: rgba(255, 209, 102, 0.08);
}

.status-pill.error {
  border-color: rgba(255, 107, 107, 0.6);
  color: var(--beacon-red);
  background: rgba(255, 107, 107, 0.09);
}

.beacon-output {
  width: 100%;
  min-height: 96px;
  display: flex;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(122, 255, 210, 0.35);
  border-radius: 8px;
  color: var(--beacon-green);
  background: rgba(0, 0, 0, 0.58);
  overflow-wrap: anywhere;
  line-height: 1.35;
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  box-shadow: inset 0 0 20px rgba(122, 255, 210, 0.06);
}

.round-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.round-meta div,
.telemetry-grid div,
.source-stack div {
  min-width: 0;
  border: 1px solid rgba(116, 185, 255, 0.16);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.25);
}

.round-meta dt,
.telemetry-label,
.source-stack small {
  display: block;
  color: #a8b8d4;
  font-size: 0.78rem;
}

.round-meta dd {
  margin: 4px 0 0;
  color: var(--beacon-ink);
  overflow-wrap: anywhere;
  line-height: 1.3;
}

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

.beacon-actions button {
  border-radius: 6px;
  border-color: rgba(122, 255, 210, 0.5);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.telemetry-value,
.source-stack span {
  display: block;
  color: var(--beacon-amber);
  font-size: 1.15rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.source-stack {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.transcript-panel,
.history-panel {
  margin-top: 16px;
}

#record-json {
  max-height: 380px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid rgba(122, 255, 210, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #d7ffe8;
  font-size: 0.82rem;
  line-height: 1.45;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(116, 185, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}

.history-round {
  color: var(--beacon-amber);
}

.history-hash {
  color: var(--beacon-green);
  overflow-wrap: anywhere;
}

.beacon-note {
  margin: 16px 0 0;
  color: #c8d8f4;
  font-size: 0.98rem;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .beacon-sigil::before,
  .beacon-sigil::after {
    animation: none;
  }
}

@media (max-width: 850px) {
  .beacon-hero,
  .beacon-grid {
    grid-template-columns: 1fr;
  }

  .beacon-sigil {
    min-height: 170px;
  }
}

@media (max-width: 560px) {
  .beacon-hero,
  .beacon-panel {
    padding: 12px;
  }

  .round-meta,
  .telemetry-grid,
  .history-item {
    grid-template-columns: 1fr;
  }

  .beacon-hero h1 {
    font-size: 1.65rem;
  }
}
