
:root {
  --bg: #0a0a12;
  --grid: #17203a;
  --card: #0f1122cc;
  --accent: #6cf5ff;
  --accent2: #f86bff;
  --text: #e9f2ff;
  --muted: #a9b4c6;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: var(--text);
  background: radial-gradient(1200px 600px at 50% -200px, #1a2a55 0%, #0a0a12 60% 70%), var(--bg);
  overflow-x: hidden;
}
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
.grid { position: fixed; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, var(--grid) 1px, transparent 1px),
                    linear-gradient(to top, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  transform: perspective(800px) rotateX(70deg) translateY(30vh);
  transform-origin: top center;
  mask-image: linear-gradient(to top, transparent 0%, black 35%, black 100%);
}
.page-head { text-align: center; padding: 24px 16px 8px; }
.title { font-size: clamp(26px, 5vw, 52px); letter-spacing: 1px; text-transform: uppercase; margin: 0 0 8px; text-shadow: 0 0 12px rgba(108,245,255,0.6), 0 0 28px rgba(248,107,255,0.35); }
.subtitle { color: var(--muted); margin: 0; font-size: 14px; }
.container { max-width: 1200px; margin: 12px auto 28px; padding: 0 16px; }
.two-col { display: grid; grid-template-columns: 2fr 1fr; align-items: stretch; gap: 16px; }
@media (min-width: 1100px) { .two-col { display: grid; grid-template-columns: 2fr 1fr; align-items: stretch; gap: 16px; } }
.card { display: flex; flex-direction: column; border: 1px solid rgba(108,245,255,0.35); border-radius: 16px; padding: 18px; backdrop-filter: blur(6px); box-shadow: 0 0 10px rgba(108,245,255,0.25), 0 0 20px rgba(248,107,255,0.15); }
.row { display: grid; grid-template-columns: 1fr; gap: 12px; }
.row-3 { grid-template-columns: 1fr; }
@media (min-width: 960px) { .row-3 { grid-template-columns: 1fr 1fr auto; align-items: start; } }
label { font-size: 13px; color: var(--muted); margin-bottom: 6px; display: inline-block; }
.invisible { visibility: hidden; height: 1em; display: block; margin-bottom: 6px; }
.field { background: #0a0d1fcc; border: 1px solid #233056; color: var(--text); border-radius: 12px; padding: 12px; width: 100%; font-size: 16px; outline: none; min-width: 0; box-shadow: inset 0 0 0 1px rgba(108,245,255,0.05); }
.field:focus { border-color: rgba(108,245,255,0.7); box-shadow: 0 0 0 3px rgba(108,245,255,0.15); }
.inputwrap { display: flex; gap: 10px; align-items: center; }
.inputwrap .currency { opacity: .7; }
.inputwrap .field { flex: 1; min-width: 0; }
.actions-inline .buttons { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.btn { appearance: none; border: 1px solid rgba(248,107,255,0.5); background: linear-gradient(135deg, rgba(248,107,255,0.15), rgba(108,245,255,0.15)); color: var(--text); padding: 10px 14px; border-radius: 12px; cursor: pointer; font-weight: 600; transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease; box-shadow: 0 8px 24px rgba(248,107,255,0.15); }
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn:active { transform: translateY(0px) scale(0.99); }
.results { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
@media (min-width: 720px) { .results { grid-template-columns: repeat(3, 1fr); } }
.tile { background: #0b0f22b3; border: 1px solid #25345f; border-radius: 14px; padding: 14px; text-align: center; }
.metric { font-size: clamp(20px, 3.2vw, 32px); font-weight: 800; letter-spacing: 0.5px; text-shadow: 0 0 10px rgba(108,245,255,0.45); }
.chart-wrap { height: 220px; margin-top: 12px; padding: 8px; background: #0b0f22b3; border: 1px solid #25345f; border-radius: 14px; }
.h2 { margin: 0; font-size: 18px; letter-spacing: .5px; text-transform: uppercase; color: var(--text); }
.games-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; }
.table-wrap { margin-top: 10px; overflow-x: auto; }
.games-table { width: 100%; border-collapse: collapse; background: #0b0f22b3; border: 1px solid #25345f; border-radius: 12px; overflow: hidden; }
.games-table th, .games-table td { padding: 10px 12px; border-bottom: 1px solid #1c2747; text-align: left; font-size: 14px; }
.games-table thead th { color: var(--muted); font-weight: 600; }
.games-table tbody tr:last-child td { border-bottom: 0; }
.muted { color: var(--muted); font-size: 12px; }
.foot { text-align: center; margin-top: 12px; color: var(--muted); font-size: 12px; }
.actions-inline .buttons { display:flex; gap:12px; align-items:center; justify-content:flex-end; }
.btn{
  position:relative;
  appearance:none;
  border-radius:12px;
  padding:0 16px;
  min-height:44px; 
  line-height:1;
  font-weight:700;
  letter-spacing:.2px;
  color:var(--text);
  background: linear-gradient(135deg, rgba(248,107,255,.10), rgba(108,245,255,.10));
  border:1px solid rgba(248,107,255,.45);
  box-shadow:
    0 6px 18px rgba(248,107,255,.14),
    inset 0 0 0 1px rgba(255,255,255,.03);
  cursor:pointer;
  transition: transform 120ms ease, filter 120ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.btn::after{
  content:"";
  position:absolute; inset:-2px;
  border-radius:14px;
  pointer-events:none;
  opacity:.0;
  box-shadow: 0 0 22px rgba(108,245,255,.55), 0 0 40px rgba(248,107,255,.35);
  transition: opacity 160ms ease;
}
.btn:hover{ filter:brightness(1.08); transform:translateY(-1px); }
.btn:hover::after{ opacity:.6; }
.btn:active{ transform:translateY(0) scale(.99); }
.btn-primary{
  background: linear-gradient(135deg, rgba(108,245,255,.16), rgba(248,107,255,.14));
  border-color: rgba(108,245,255,.70);
}
.btn-ghost{
  background: linear-gradient(135deg, rgba(248,107,255,.06), rgba(108,245,255,.06));
  border-color: rgba(248,107,255,.40);
  color: rgba(233,242,255,.9);
}
.btn-ghost:hover{ border-color: rgba(248,107,255,.55); }
.btn:focus-visible{
  outline: 2px solid rgba(108,245,255,.85);
  outline-offset: 2px;
}
.intro {
  margin: 0 0 20px;
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  padding: 16px 20px;
  border: 1px solid rgba(108,245,255,0.35);
  border-radius: 14px;
  box-shadow: 0 0 12px rgba(108,245,255,0.25), 0 0 24px rgba(248,107,255,0.15);
  background: rgba(15,17,34,0.6);
}
.intro p { margin: 0; }
.intro {
  margin: 0 0 20px;
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  padding: 16px 20px;
  border: 1px solid rgba(108,245,255,0.35);
  border-radius: 14px;
  box-shadow: 0 0 12px rgba(108,245,255,0.25), 0 0 24px rgba(248,107,255,0.15);
  background: rgba(15,17,34,0.6);
}
.row-3 .actions-inline .buttons {
  margin-top: 10px;
}
.intro { margin: 12px 0 20px; }

.glitch-text {
  animation: glitch 0.6s linear;
}

@keyframes glitch {
  0% { opacity: 0; transform: translateX(-5px); }
  20% { opacity: 1; transform: translateX(3px); }
  40% { opacity: 1; transform: translateX(-2px); }
  60% { opacity: 1; transform: translateX(2px); }
  80% { opacity: 1; transform: translateX(-1px); }
  100% { opacity: 1; transform: none; }
}

.card.intro {
  position: relative;
  overflow: hidden;
}

.card.intro::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 255, 200, 0.08) 0px,
    rgba(0, 255, 200, 0.08) 2px,
    transparent 2px,
    transparent 4px
  );
  animation: scroll 4s linear infinite;
  pointer-events: none;
}

@keyframes scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(4px); }
}

.card.intro {
  border: 2px solid rgba(255, 255, 255, 0.1);  
  border-radius: 12px; /* match rounded corners */
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.2);  
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.card.intro:hover {
  border-color: #ff0033; 
  animation: borderPulseRed 3s infinite;
}

@keyframes borderPulseRed {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 0, 51, 0.4); }
  50% { box-shadow: 0 0 30px rgba(255, 0, 51, 0.8); }
}

/* compact pill toggle */
.games-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:.75rem;
}

.seg-toggle{
  position:relative;
  display:inline-grid;
  grid-template-columns:1fr 1fr;
  align-items:center;
  padding:2px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  border-radius:999px;
  user-select:none;
}

.seg-btn{
  appearance:none;
  border:0;
  background:transparent;
  font:inherit;
  font-size:.85rem;
  color:#cfd3ff;
  padding:6px 12px;
  line-height:1;
  border-radius:999px;
  position:relative;
  z-index:1;
  cursor:pointer;
}

.seg-btn:focus-visible{
  outline:2px solid #8ab4ff;
  outline-offset:2px;
  border-radius:12px;
}

.seg-thumb{
  position:absolute;
  top:2px;
  left:2px;
  bottom:2px;
  width:calc(50% - 2px);
  border-radius:999px;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(117,168,255,.5), rgba(117,168,255,.2) 60%, rgba(255,255,255,.1) 100%),
    rgba(255,255,255,.18);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.35), 0 4px 16px rgba(0,0,0,.35);
  transition:transform .22s cubic-bezier(.4,0,.2,1);
}

.seg-toggle.worst .seg-thumb{
  transform:translateX(100%);
}

.seg-btn[aria-pressed="true"]{
  color:#fff;
  font-weight:600;
}

.games-card { display: flex; flex-direction: column; }
.games-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.table-wrap { flex: 1 1 auto; overflow: auto; }  
.games-foot { margin-top: auto; padding: 10px 0 6px; text-align: centre; }
#gamesHelp { font-size: 0.85rem; color: var(--muted); }
