.limbo-main {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(20px, 5vh, 56px) 20px 80px;
}

.limbo-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

/* ── Header (balance / claim) ── */
.limbo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.limbo-balance { display: flex; flex-direction: column; gap: 2px; }
.limbo-balance-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.limbo-balance-value {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: -0.5px;
  transition: color 0.25s;
}
.limbo-balance-value.flash-win  { color: var(--green); }
.limbo-balance-value.flash-lose { color: var(--red); }

.limbo-claim {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.12s;
}
.limbo-claim:not(:disabled) {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(124, 109, 250, 0.3);
}
.limbo-claim:not(:disabled):hover  { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(124, 109, 250, 0.45); }
.limbo-claim:not(:disabled):active { transform: translateY(1px); }
.limbo-claim:disabled { cursor: not-allowed; opacity: 0.75; }
.limbo-claim-icon { font-size: 1rem; line-height: 1; }
.limbo-claim-text { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.2px; }

/* ── Main grid ── */
.limbo-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
}
.limbo-board {
  padding: 28px 28px 36px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.limbo-controls {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
}

/* ── History ── */
.limbo-history {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 28px;
}
.limbo-chip {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  animation: limboChipIn 0.25s ease-out;
}
.limbo-chip.win  { color: var(--green); border-color: rgba(52, 211, 153, 0.4); }
.limbo-chip.lose { color: var(--red);   border-color: rgba(248, 113, 113, 0.4); }
@keyframes limboChipIn {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ── The big multiplier display ── */
.limbo-display {
  position: relative;
  flex: 1;
  min-height: 280px;
  background: linear-gradient(180deg, var(--surface2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.3s;
}
.limbo-display.win  { border-color: rgba(52, 211, 153, 0.55); }
.limbo-display.lose { border-color: rgba(248, 113, 113, 0.55); }

.limbo-display-glow {
  position: absolute;
  inset: -40%;
  z-index: -1;
  background: radial-gradient(circle at 50% 50%, rgba(124, 109, 250, 0.18), transparent 60%);
  opacity: 0.6;
  transition: background 0.3s, opacity 0.3s;
}
.limbo-display.win  .limbo-display-glow { background: radial-gradient(circle at 50% 50%, rgba(52, 211, 153, 0.28), transparent 60%); opacity: 1; }
.limbo-display.lose .limbo-display-glow { background: radial-gradient(circle at 50% 50%, rgba(248, 113, 113, 0.22), transparent 60%); opacity: 1; }

.limbo-result {
  font-family: var(--mono);
  font-size: clamp(3rem, 9vw, 5.4rem);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  color: var(--text);
  transition: color 0.25s, transform 0.25s;
}
.limbo-result.rolling { color: var(--accent); }
.limbo-result.win     { color: var(--green); transform: scale(1.04); }
.limbo-result.lose    { color: var(--red); }
.limbo-x {
  font-size: 0.55em;
  font-weight: 500;
  margin-left: 4px;
  opacity: 0.7;
  letter-spacing: 0;
}

.limbo-target-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
}
.limbo-target-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 0.7rem;
}
.limbo-target-val {
  color: var(--accent);
  font-weight: 600;
}

.limbo-sub {
  color: var(--muted);
  font-size: 0.85rem;
  min-height: 1.2em;
  text-align: center;
  padding: 0 16px;
}
.limbo-sub.win  { color: var(--green); }
.limbo-sub.lose { color: var(--red); }

/* ── Form fields (mirror dice) ── */
.limbo-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.limbo-field-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.limbo-field-quick {
  display: inline-flex;
  gap: 4px;
}
.limbo-field-quick button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-family: var(--mono);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.limbo-field-quick button:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface2);
}

.limbo-input-wrap {
  display: flex;
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  transition: border-color 0.15s;
}
.limbo-input-wrap:focus-within { border-color: var(--accent); }
.limbo-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 0;
  outline: none;
  width: 100%;
  -moz-appearance: textfield;
}
.limbo-input-wrap input::-webkit-outer-spin-button,
.limbo-input-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.limbo-input-prefix, .limbo-input-suffix {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.9rem;
}
.limbo-input-prefix { margin-right: 6px; }
.limbo-input-suffix { margin-left: 6px; }

.limbo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.limbo-profit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.limbo-profit-label { color: var(--muted); font-size: 0.78rem; }
.limbo-profit-value { color: var(--green); font-family: var(--mono); font-weight: 600; font-size: 0.95rem; }

.limbo-play-btn {
  margin-top: auto;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(124, 109, 250, 0.32);
  transition: transform 0.12s, box-shadow 0.18s, opacity 0.18s;
}
.limbo-play-btn:hover  { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(124, 109, 250, 0.45); }
.limbo-play-btn:active { transform: translateY(1px); }
.limbo-play-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Responsive ── */
@media (max-width: 820px) {
  .limbo-grid { grid-template-columns: 1fr; }
  .limbo-board {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 22px 20px 28px;
  }
  .limbo-controls { padding: 20px; }
  .limbo-display { min-height: 220px; }
}
@media (max-width: 480px) {
  .limbo-header { padding: 14px 18px; }
  .limbo-balance-value { font-size: 1.35rem; }
  .limbo-result { font-size: 2.6rem; }
}
