:root {
  --bg-1: #0f1d2a;
  --bg-2: #1f3044;
  --bg-3: #f5a623;
  --ink: #f7f6f3;
  --muted: rgba(247, 246, 243, 0.72);
  --panel: rgba(10, 20, 30, 0.58);
  --panel-border: rgba(255, 255, 255, 0.14);
  --good: #8fe388;
  --bad: #ff7d7d;
}

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

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: "Space Grotesk", "Noto Sans SC", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(245, 166, 35, 0.35), transparent 42%),
    radial-gradient(circle at 85% 10%, rgba(82, 164, 255, 0.35), transparent 48%),
    linear-gradient(150deg, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 0.7px, transparent 0.7px);
  background-size: 4px 4px;
  pointer-events: none;
  opacity: 0.25;
}

.shell {
  width: min(980px, 92vw);
  margin: 0 auto;
  padding: 48px 0 56px;
  display: grid;
  gap: 22px;
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  gap: 14px;
}

.back-link {
  width: fit-content;
  text-decoration: none;
  color: #ffe2b3;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f9cc7a;
  font-size: 0.9rem;
}

h1 {
  font-size: clamp(2rem, 4.8vw, 3.3rem);
  line-height: 1.05;
}

.intro {
  color: var(--muted);
  max-width: 66ch;
  line-height: 1.6;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 42px rgba(6, 12, 20, 0.34);
}

h2 {
  margin-bottom: 14px;
  font-size: 1.2rem;
}

h3 {
  margin: 14px 0 10px;
  font-size: 1.03rem;
}

.inline-form,
.match-controls,
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

input[type="text"],
input[type="number"],
select {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 210px;
  font-size: 0.95rem;
}

input::placeholder {
  color: rgba(247, 246, 243, 0.55);
}

input:focus,
select:focus,
button:focus {
  outline: 2px solid rgba(245, 166, 35, 0.8);
  outline-offset: 2px;
}

.mode-switch {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
  color: var(--muted);
}

.mode-switch label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(9, 17, 26, 0.45);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(120deg, #f8c36a, #f3924e);
  color: #1c1106;
  border-color: transparent;
}

.btn-accept {
  background: rgba(112, 221, 97, 0.16);
  border-color: rgba(143, 227, 136, 0.58);
}

.btn-reject {
  background: rgba(255, 95, 95, 0.14);
  border-color: rgba(255, 125, 125, 0.52);
}

.muted {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.game-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

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

.chips span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.86rem;
  color: var(--muted);
}

.meta-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.meta-grid div {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  padding: 10px;
}

.meta-grid dt {
  color: var(--muted);
  font-size: 0.84rem;
}

.meta-grid dd {
  font-weight: 700;
  margin-top: 4px;
}

.status {
  margin-top: 12px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.action-area {
  margin-top: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 14px;
}

#proposerCoinsRange {
  width: min(460px, 90%);
  margin: 8px 0;
}

.log-list {
  margin-top: 10px;
  list-style: none;
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.log-list li {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.88rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 640px) {
  .shell {
    width: 94vw;
    padding-top: 34px;
  }

  .panel {
    padding: 16px;
  }

  input[type="text"],
  input[type="number"],
  select {
    min-width: 100%;
  }
}
