/* =========================================================
   Jekpoti — shared game screen parts
   Used by every game (slots, balloon, roulette, blackjack):
   the header with the back button and logo, the message bar,
   the bet stepper and chips, the small buttons and the
   rules / paytable panel.
   ========================================================= */
.pill {
  display: inline-block;
  background: rgba(8,4,20,.74);
  color: #ece4ff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}
.mhead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.mhead .back {
  justify-self: start;
}
.mtitle {
  text-align: center;
}
.logo {
  margin: 0;
  font-size: clamp(22px,4.6vw,44px);
  line-height: 1.15;
  background: linear-gradient(180deg,#fffbe0 0%,#ffe066 32%,#f2a900 58%,#fff1a8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1.5px #6b3a00;
  filter: drop-shadow(0 3px 0 #2a1400) drop-shadow(0 0 18px rgba(255,200,60,.45));
}

.msg {
  min-height: 56px;
  margin: 12px auto 0;
  max-width: 820px;
  padding: 10px 14px;
  border-radius: 14px;
  text-align: center;
  background: rgba(6,3,14,.82);
  border: 2px solid rgba(255,215,94,.35);
  color: #fff;
  font-weight: 800;
  font-size: clamp(14px,2.4vw,17px);
  line-height: 1.35;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.msg.win {
  background: linear-gradient(90deg,#14532d,#1f7a43);
  border-color: #5be37d;
}
.msg.lose {
  color: #ffd6d6;
}
.msg.near {
  background: rgba(77,42,18,.92);
  border-color: #ff9f43;
}
.msg.special {
  background: rgba(18,63,77,.92);
  border-color: var(--teal);
}
.msg small {
  display: block;
  font-weight: 700;
  opacity: .85;
  margin-top: 4px;
}

.bet {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,.5);
  border-radius: 14px;
  padding: 5px;
  border: 1px solid rgba(255,215,94,.35);
}
.bet button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg,#3a3a3a,#111);
  border: 2px solid #777;
  font-size: 20px;
  font-weight: 900;
}
.bet button:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.bet .val {
  width: 84px;
  text-align: center;
}
.bet .val input {
  width: 100%;
  background: #000;
  border: 1px solid #444;
  border-radius: 8px;
  color: #fff;
  font: 400 20px 'Bungee',sans-serif;
  text-align: center;
  padding: 2px 0;
  -moz-appearance: textfield;
  appearance: textfield;
}
.bet .val input::-webkit-outer-spin-button,
.bet .val input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.bet .val input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.bet .val input:disabled {
  opacity: .6;
}
.bet .val input.over {
  outline: 2px solid var(--red);
  color: #ffb3b8;
}
.bet .val small {
  display: block;
  color: #cbb8ff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 2px;
}
.chips {
  display: flex;
  justify-content: safe center;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: thin;
}
.chips button {
  flex: 0 0 auto;
  min-width: 54px;
  padding: 4px 8px;
  border-radius: 8px;
  line-height: 1.05;
  text-align: center;
  background: linear-gradient(180deg,#3a3a3a,#0d0d0d);
  border: 2px solid #5a5a5a;
  font-family: 'Bungee','Noto Sans Georgian',sans-serif;
  font-weight: 900;
  font-size: 15px;
  color: #fff;
}
.chips button small {
  display: block;
  font-size: 9px;
  color: #ffd75e;
  letter-spacing: .5px;
}
.chips button:hover {
  border-color: #ffd75e;
}
.chips button.on {
  background: linear-gradient(180deg,#5fd36a,#17702a);
  border-color: #c8ff9e;
}
.chips button.allin {
  background: linear-gradient(180deg,#ff5a6e,#7a0a1c);
  border-color: #ffb3bd;
}
.chips button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.subrow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.auto {
  background: rgba(8,4,20,.8);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
}

/* ---------- phones: compact header, message and bet controls ---------- */
@media (max-width: 700px), (max-height: 500px) and (orientation: landscape) {
  body[data-theme] {
    padding-bottom: calc(200px + env(safe-area-inset-bottom));
  }
  main {
    padding-top: 10px;
  }
  .mhead {
    grid-template-columns: auto 1fr;
    gap: 8px;
    margin-bottom: 8px;
    scroll-margin-top: 60px;
  }
  .mhead > span:last-child {
    display: none;
  }
  .mhead .back {
    padding: 6px 10px;
    font-size: 13px;
  }
  .logo {
    font-size: clamp(18px,5.4vw,26px);
    text-align: left;
    -webkit-text-stroke: 1px #6b3a00;
  }
  .mtitle {
    text-align: left;
  }
  .msg {
    min-height: 44px;
    max-height: 84px;
    overflow-y: auto;
    margin-top: 8px;
    padding: 7px 10px;
    font-size: 13px;
    border-radius: 12px;
  }
  .msg small {
    font-size: 12px;
  }
  .bet {
    padding: 4px;
    gap: 4px;
  }
  .bet button {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
  .bet .val {
    width: 70px;
  }
  .bet .val input {
    font-size: 18px;
  }
  .chips {
    margin-top: 6px;
    justify-content: flex-start;
  }
  .chips button {
    min-width: 46px;
    padding: 3px 6px;
    font-size: 13px;
  }
}
/* landscape phones: everything a bit tighter */
@media (max-height: 500px) and (orientation: landscape) {
  body[data-theme] {
    padding-bottom: calc(110px + env(safe-area-inset-bottom));
  }
  .chips {
    margin-top: 0;
  }
  main {
    padding-top: 4px;
  }
  .topbar {
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .mhead {
    margin-bottom: 4px;
  }
  .logo {
    font-size: 18px;
  }
}

/* ---------- rules / paytable panel (<details class="paytable">) ---------- */
.paytable {
  max-width: 820px;
  margin: 18px auto 0;
  background: rgba(26,15,52,.95);
  border: 1px solid rgba(255,215,94,.35);
  border-radius: 18px;
  padding: 16px;
  scroll-margin-top: 70px;
}
.paytable summary {
  cursor: pointer;
  font-weight: 900;
  font-size: 17px;
}
.paytable h4 {
  margin: 16px 0 8px;
  color: var(--gold);
  font-size: 15px;
}
.pt-intro {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,215,94,.1);
  border: 1px solid rgba(255,215,94,.35);
  line-height: 1.55;
}
.pt-intro .eq {
  font-family: 'Bungee','Noto Sans Georgian',sans-serif;
  color: #fff;
}
.pt-table {
  display: grid;
  gap: 6px;
}
.pt-row {
  display: grid;
  align-items: center;
  gap: 6px;
  background: var(--bg2);
  border-radius: 12px;
  padding: 6px 8px;
}
.pt-head {
  background: none;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
  color: var(--gold);
  text-align: center;
}
.pt-head span:first-child {
  text-align: left;
}
.pt-sym {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pt-sym img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pt-sym .e {
  font-size: 36px;
}
.pt-cell {
  text-align: center;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.pt-cell b {
  font-family: 'Bungee','Noto Sans Georgian',sans-serif;
  font-weight: 400;
  font-size: clamp(15px,2.8vw,21px);
  color: #fff;
}
.pt-cell small {
  color: #ffd75e;
  font-weight: 800;
  font-size: 12px;
}
.pt-cell.low b {
  color: #ff9aa6;
}
.pt-none {
  color: #5d4e85;
  font-weight: 900;
  font-size: 18px;
}
.pt-wild {
  background: linear-gradient(90deg,rgba(255,60,220,.22),var(--bg2) 70%);
}
.pt-special {
  background: linear-gradient(90deg,rgba(255,200,0,.16),var(--bg2) 70%);
}
.pt-dud {
  background: rgba(0,0,0,.2);
}
.pt-span {
  grid-column: 2 / -1;
  font-size: 13px;
  line-height: 1.55;
  color: #e9e0ff;
}
.pt-span small {
  display: block;
  color: var(--muted);
}
.pt-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pt-line {
  text-align: center;
  background: var(--bg2);
  border-radius: 10px;
  padding: 6px 8px;
}
.pt-line svg {
  display: block;
  height: 44px;
}
.pt-line small {
  font-weight: 800;
  color: var(--muted);
}
.pt-rules {
  margin: 0;
  padding-left: 20px;
  line-height: 1.65;
}
.pt-rules b {
  color: #fff;
}
.rtp {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #3a1630;
  border: 1px solid #ff4d8d55;
  line-height: 1.5;
}
.rtp b {
  color: var(--gold);
}
