:root {
  --background: #06100b;
  --background-light: #0b1911;
  --card: #102319;
  --card-light: #173526;
  --border: rgba(255, 255, 255, 0.1);
  --green: #20d477;
  --green-light: #8affbd;
  --red: #e34b58;
  --gold: #f0c674;
  --text: #effff5;
  --muted: #91a99b;
  --shadow: rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 90% 0%, #174d31 0, transparent 30%),
    linear-gradient(135deg, var(--background), var(--background-light));
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.site-shell {
  width: min(1250px, 94%);
  margin: 0 auto;
  padding: 25px 0 90px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 15px;
  color: #062314;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  box-shadow: 0 0 28px rgba(32, 212, 119, 0.28);
  font-size: 26px;
  font-weight: 900;
}

.brand h1 {
  margin: 0 0 3px;
  font-size: 27px;
}

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.balance-box {
  min-width: 190px;
  padding: 13px 18px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(16, 35, 25, 0.9);
  text-align: right;
}

.balance-box span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.balance-box strong {
  color: var(--green);
  font-size: 25px;
}

.demo-warning {
  margin-bottom: 21px;
  padding: 14px 17px;
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  color: #f8e8ba;
  background: rgba(240, 198, 116, 0.09);
  font-size: 13px;
  line-height: 1.5;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}

.game-card,
.history-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--card-light), var(--card));
  box-shadow: 0 12px 32px var(--shadow);
}

.game-card {
  min-height: 480px;
  padding: 19px;
}

.card-heading,
.history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-heading h2,
.history-header h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.game-tag {
  color: var(--green);
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1.5px;
}

.house-label {
  padding: 5px 7px;
  border-radius: 5px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
  font-size: 10px;
  text-transform: uppercase;
}

.description {
  min-height: 40px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

label {
  display: block;
  margin: 9px 0 5px;
  color: var(--muted);
  font-size: 12px;
}

input,
select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  color: var(--text);
  background: #07130c;
}

input:focus,
select:focus {
  border-color: var(--green);
}

button {
  width: 100%;
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: 8px;
  color: #062314;
  background: var(--green);
  font-weight: bold;
  transition: 0.2s ease;
}

button:hover {
  background: var(--green-light);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.secondary-button {
  color: var(--text);
  background: #254d38;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.game-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.game-message.win {
  color: var(--green);
}

.game-message.loss {
  color: var(--red);
}

.hidden {
  display: none;
}

/* Roulette */

.roulette-display {
  display: grid;
  min-height: 120px;
  margin-bottom: 13px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.roulette-display div {
  color: var(--green);
  font-size: 48px;
  font-weight: bold;
}

.roulette-display span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1px;
}

/* Poker */

.poker-area {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 9px;
  min-height: 145px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.hand-title {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  text-transform: uppercase;
}

.playing-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px;
}

.playing-card {
  display: grid;
  width: 30px;
  height: 43px;
  place-items: center;
  border-radius: 4px;
  color: #102319;
  background: #f5fff8;
  font-size: 15px;
  font-weight: bold;
}

.playing-card.red-card {
  color: #c62338;
}

.hand-rank {
  display: block;
  min-height: 15px;
  margin-top: 7px;
  color: var(--gold);
  font-size: 10px;
  text-align: center;
}

.versus {
  color: var(--gold);
  font-size: 11px;
  font-weight: bold;
}

/* Plinko */

.plinko-board {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  min-height: 160px;
  padding: 16px 12px;
  border-radius: 12px;
  background: #07130c;
}

.plinko-peg {
  width: 11px;
  height: 11px;
  margin: auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 7px rgba(32, 212, 119, 0.35);
}

.multiplier-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

/* Mines */

.mines-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  min-height: 190px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.mine-tile {
  min-height: 32px;
  margin: 0;
  padding: 0;
  color: var(--text);
  background: #28553d;
  font-size: 15px;
}

.mine-tile:hover {
  background: #377951;
}

.mine-tile.safe {
  background: #168c4c;
}

.mine-tile.mine {
  background: var(--red);
}

/* Crash */

.crash-display {
  display: grid;
  min-height: 160px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.crash-display strong {
  color: var(--green);
  font-size: 42px;
}

.crash-display span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1px;
}

/* Slots */

.slot-machine {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  min-height: 120px;
  padding: 22px 12px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.slot-machine div {
  display: grid;
  width: 62px;
  height: 70px;
  place-items: center;
  border-radius: 9px;
  color: #132519;
  background: #f1fff6;
  box-shadow: inset 0 -5px rgba(0, 0, 0, 0.12);
  font-size: 34px;
}

.payout-info {
  margin: 12px 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

/* Coin */

.coin-display {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.coin-display div {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 5px solid var(--gold);
  border-radius: 50%;
  color: #322507;
  background: linear-gradient(145deg, #ffe9a3, #b98a2b);
  font-size: 16px;
  font-weight: bold;
}

/* History */

.history-card {
  margin-top: 18px;
  padding: 19px;
}

.history-header {
  align-items: center;
}

.history-header h2 {
  margin-top: 5px;
}

.history-header button {
  width: auto;
  margin: 0;
}

.history-list {
  margin-top: 15px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 7px;
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.18);
  font-size: 13px;
}

.history-item .positive {
  color: var(--green);
  font-weight: bold;
}

.history-item .negative {
  color: var(--red);
  font-weight: bold;
}

.empty-history {
  color: var(--muted);
  font-size: 13px;
}

footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 9px;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(3, 10, 6, 0.95);
  font-size: 11px;
  letter-spacing: 1px;
  text-align: center;
}

@media (max-width: 1050px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .balance-box {
    width: 100%;
    text-align: left;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    min-height: auto;
  }
}
