/* ─── Reset & base ─────────────────────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  touch-action: manipulation;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

input,
select,
textarea,
button {
  font-size: 16px !important;
}

/* ─── Layout ───────────────────────────────────────────────────────────────── */
.betting-overlay {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: black;
  backdrop-filter: blur(20px) saturate(1.2);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#historyPanel {
  position: fixed;
  display: none;
  flex-direction: column;
  overflow: hidden;
}


.tab-content-section {
  height: 76%;
}

/* ─── Header ───────────────────────────────────────────────────────────────── */
.header-content {
  padding: 10px 16px;
  width: 100%;
  border-bottom: 1px solid rgba(32, 32, 32, 0.96);
  background-color: #020202;
}

.title-section {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
}

.left-spacer {
  width: 40px;
  height: 40px;
}

/* Always EXACT center */
.balance-amount {
  grid-column: 2;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  color: #f1c46d;
}

/* Always right */
.close-button {
  grid-column: 3;
  justify-self: end;

  width: 45px;
  height: 45px;
  cursor: pointer;

  background-image: url('../../panel/images/gameControlImages/close.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.main-title {
  font-family: "Noto Sans", sans-serif;
  font-weight: 700;
  font-size: 42px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.subtitle {
  font-size: 16px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.9) 0%, rgba(255, 193, 7, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  font-weight: 600;
  text-transform: uppercase;
  padding-top: 8px;
}

/* ─── Tabs ─────────────────────────────────────────────────────────────────── */
.tabs-section {
  padding: 20px 50px 0;
  padding-left: max(50px, env(safe-area-inset-left));
  padding-right: max(50px, env(safe-area-inset-right));
  max-width: min(1600px, calc(100vw - 40px));
  margin: 0 auto;
  width: 100%;
}

.tabs-container {
  display: flex;
  gap: 8px;
  border: 1px solid #242324;
  border-radius: 28px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  background: black;
  -webkit-overflow-scrolling: touch;
}

.tab-button {
  flex: 1;
  padding: 14px 16px;
  background: transparent;
  color: #fffffff2;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 28px;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.tab-button small {
  display: block;
  font-size: 16px;
  opacity: 0.9;
  margin-top: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.tab-button:focus,
.tab-button:focus-visible {
  outline: none;
  box-shadow: none;
}

.tab-button.active {
  font-size: 18px;
  font-weight: bold;
  background: rgba(241, 196, 109, 0.1);
  color: #f1c46d;
  border: 1px solid rgba(241, 196, 109, 0.16);
  border-radius: 28px;
}

/* ─── Content & table ──────────────────────────────────────────────────────── */
.content-section {
  flex: 1;
  padding: 0 50px;
  padding-left: max(50px, env(safe-area-inset-left));
  padding-right: max(50px, env(safe-area-inset-right));
  max-width: min(1600px, calc(100vw - 40px));
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
}

.table-container {
  border-radius: 25px;
  border: 2px solid transparent;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1;
  position: relative;
  background: black;
}

.table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
  gap: 25px;
  padding: 26px 35px;
  font-weight: 800;
  font-size: clamp(12px, 1.5vw, 14px);
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 2px;
  align-items: center;
  text-align: center;
  color: #fffffff2;
  background: #1b1a1a;
}

.table-header > div:first-child {
  justify-self: start;
}

.table-body {
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 80px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.table-body::-webkit-scrollbar { width: 5px; }

.table-body::-webkit-scrollbar-track {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.table-body::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.8) 0%, rgba(255, 193, 7, 0.9) 50%, rgba(255, 215, 0, 0.8) 100%);
  border-radius: 8px;
  border: 2px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.table-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 1) 0%, rgba(255, 193, 7, 1) 50%, rgba(255, 215, 0, 1) 100%);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

/* ─── Rows ─────────────────────────────────────────────────────────────────── */
.bet-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
  gap: 25px;
  padding: 14px 35px;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: black;
}

.bet-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  right: 0;
  bottom: 0;
  z-index: -1;
}

.bet-row:hover::before {
  left: 100%;
}

/* ─── Row cells ────────────────────────────────────────────────────────────── */
.game-column {
  display: flex;
  align-items: center;
  gap: 20px;
}

.game-icon {
  width: 58px;
  height: 58px;
  border-radius: 30% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-sizing: border-box !important;
  background: black;
}

.game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: middle;
  margin: 0;
  padding: 0;
}

.game-icon span {
  font-weight: 900;
  font-size: 20px;
  color: #1a1a1a;
}

.game-details {
  min-width: 0;
  flex: 1;
}

.game-name,
.game-time {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}

.game-name {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
  color: #ffffffc4;
  background-clip: text;
  letter-spacing: 0.8px;
}

.game-time {
  color: #ffffffa3;
  background-clip: text;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.bet-type {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* type-badge: final resolved styles (overrides earlier declarations) */
.type-badge,
.type-bet,
.type-bb {
  background-clip: text;
  color: #ffffffc4;
  border: none;
  box-shadow: none;
  font-weight: 500;
  font-size: inherit;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: inline-block;
  box-sizing: border-box;
}

.amount-column {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  font-feature-settings: "tnum";
  letter-spacing: 0.8px;
}

.bet-amount {
  background-clip: text;
  color: #ffffffc4;
}

.win-amount.positive {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.win-amount.zero {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.8) 0%, rgba(220, 38, 38, 0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.round-id {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
  font-weight: 500;
  font-size: 16px;
  background-clip: text;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 10px 13px;
  border-radius: 12px;
  color: white;
}

.status-column {
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-win {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.9) 0%, rgba(34, 197, 94, 0.8) 100%);
  color: #1a1a1a;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
}

.status-loss {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 0.8) 100%);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
}

.actions-column {
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-button {
  z-index: 2;
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(241, 196, 109, 0.1);
  color: var(--gold);
  font-weight: 700;
  border: 1px solid rgba(241, 196, 109, 0.16);
  touch-action: manipulation;
}

.mobile-info-grid {
  display: none;
}

.mobile-info-item {
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.mobile-info-label {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 215, 0, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  display: block;
}

.mobile-info-value {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  display: block;
}

/* ─── Misc ─────────────────────────────────────────────────────────────────── */
::selection      { background: rgba(255, 215, 0, 0.3); color: #ffffff; }
::-moz-selection { background: rgba(255, 215, 0, 0.3); color: #ffffff; }

.betting-overlay,
.bet-row,
.game-icon,
.tab-button,
.action-button {
  will-change: transform;
}

#nextAppFrameWrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  align-items: end;
  justify-content: center;
  padding-top: 20px;
  background: transparent;
}

.modal-card iframe {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background-color: transparent;
  border: 2px solid rgb(255, 230, 0);
}

/* ─── Safari / iOS ─────────────────────────────────────────────────────────── */
@supports (-webkit-touch-callout: none) {
  .tab-button,
  .bet-row,
  .action-button,
  .close-button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .tabs-container {
    -webkit-overflow-scrolling: touch;
  }
}

/* ─── Accessibility ────────────────────────────────────────────────────────── */
@media (prefers-contrast: high) {
  .bet-row        { border-width: 2px; border-color: rgba(169, 169, 168, 0.9); }
  .mobile-info-item { border-color: rgba(161, 161, 158, 0.6); }
  .game-name,
  .balance-amount,
  .main-title     { -webkit-text-fill-color: #ffffff; }
}

@media (prefers-reduced-motion: reduce) {
  .bet-row::before { display: none; }
}

@media print {
  .betting-overlay { background: white !important; color: black !important; }
  .close-button, .actions-column { display: none !important; }
}

/* ─── Performance: disable expensive effects on low-end devices ────────────── */
@media (max-width: 1024px) {
  .tab-button::before,
  .tab-button::after,
  .tab-button:hover::before {
    display: none !important;
  }

  .tab-button {
    backdrop-filter: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  }
}

/* ─── Responsive: 882px — tabs start clipping ──────────────────────────────── */
@media (max-width: 882px) {
  .tab-button        { padding: 10px 10px; font-size: 16px; letter-spacing: 0.5px; }
  .tab-button small  { font-size: 16px; margin-top: 2px; }
  .tabs-section      { padding: 10px 16px 0; }
}

/* ─── Responsive: desktop ≥ 1920px ────────────────────────────────────────── */
@media (min-width: 1920px) {
  .tabs-section,
  .content-section {
    max-width: 1800px;
  }
}

/* ─── Responsive: desktop ≤ 1400px ────────────────────────────────────────── */
@media (max-width: 1400px) {
  .tabs-section,
  .content-section {
    padding-left: 30px;
    padding-right: 30px;
  }

  .main-title {
    font-size: 38px;
    letter-spacing: 4px;
  }

  .bet-row {
    padding: 18px 40px;
    gap: 30px;
  }

  .game-icon {
    width: 64px;
    height: 64px;
  }
}

/* ─── Responsive: tablet 769–1024px ───────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  .header-content,
  .tabs-section,
  .content-section {
    padding-left: 30px;
    padding-right: 30px;
  }

  .main-title {
    font-size: 34px;
    letter-spacing: 4px;
  }

  .bet-row {
    grid-template-columns: 2.5fr 1fr 1fr 1fr 1fr auto;
    gap: 20px;
    padding: 16px 30px;
  }

  .game-icon {
    width: 52px;
    height: 52px;
  }

  .type-badge,
  .status-indicator {
    padding: 10px 16px 10px 10px;
    font-size: 16px;
  }
}

/* ─── Responsive: desktop ≥ 769px (show full table) ───────────────────────── */
@media (min-width: 769px) {
  .table-header {
    display: grid;
    padding: 14px 35px;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    gap: 20px;
  }

  .bet-row {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    gap: 25px;
    padding: 14px 23px 14px 35px;
  }

  .mobile-info-grid { display: none !important; }

  .game-column,
  .bet-type,
  .amount-column,
  .status-column,
  .actions-column {
    display: flex !important;
    align-items: center;
  }

  .amount-column  { justify-content: center; text-align: center; }
  .actions-column { justify-content: center; }
  .game-column    { min-width: 0; }
}

/* ─── Responsive: mobile ≤ 800px ──────────────────────────────────────────── */
@media (orientation: portrait) {
  .header-content { padding: 8px 12px; }
 
}

/* ─── Responsive: mobile ≤ 768px (card layout) ────────────────────────────── */
@media (max-width: 768px) {
  .close-button{
    width: 40px;
    height: 40px;
  }
  .balance-amount{
    font-size: 20px;
  }
  
  .header-content {
    padding: 20px 20px 25px;
    flex-direction: column;
    gap: 5px;
    align-items: stretch;
  }

  .main-title {
    font-size: 30px;
    letter-spacing: 2px;
    line-height: 1.2;
  }

  .subtitle { font-size: 16px; letter-spacing: 1.5px; }

  .tabs-section   { padding: 15px 20px 0; }

  .tabs-container {
    flex-direction: row;
    gap: 8px;
  }

  .tab-button {
    border-radius: 16px;
    padding: 14px 20px;
    font-size: 16px !important;
    letter-spacing: 1px;
    text-align: center;
    width: 100%;
  }

  .content-section {
    padding: 0 20px 20px;
    flex: 1;
    min-height: 0;
  }

  .table-container {
    border-radius: 20px;
    overflow: visible;
  }

  .table-header { display: none; }
  .table-body::-webkit-scrollbar { display: none; }

  .bet-row {
    display: block;
    padding: 20px;
    margin: 15px;
    border-radius: 18px;
    border: 1.5px solid rgba(203, 203, 203, 0.3);
  }

  .bet-row::before {
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 18px 18px 0 0;
  }

  .game-column {
    gap: 15px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  }

  .game-icon    { width: 50px; height: 50px; font-size: 18px; border-radius: 15px; flex-shrink: 0; }
  .game-details { flex: 1; min-width: 0; }
  .game-name    { font-size: 16px; margin-bottom: 6px; font-weight: 600; }
  .game-time    { font-size: 16px; opacity: 0.9; }

  .mobile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 12px;
    margin-bottom: 16px;
  }

  .bet-type,
  .amount-column,
  .round-id,
  .status-column { display: none; }

  .actions-column {
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 215, 0, 0.15);
    margin-top: 16px;
  }

  .action-button { width: 44px; height: 44px; font-size: 20px !important; border-radius: 12px; }
}

/* ─── Responsive: mobile ≤ 480px ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .header-content { padding: 16px 13px 20px; }
  .main-title     { font-size: 20px; letter-spacing: 1.5px; }

  .tabs-section,
  .content-section { padding-left: 0; padding-right: 0; }

  .bet-row    { padding: 16px; border-radius: 16px; }
  .game-column { gap: 12px; margin-bottom: 14px; padding-bottom: 14px; }
  .game-icon  { width: 46px; height: 46px; font-size: 16px; }

  .mobile-info-grid { gap: 12px 8px; }
  .mobile-info-item { padding: 10px; }
  .mobile-info-value { font-size: 16px; }

  .tabs-container { gap: 5px; padding: 10px; }
  .tab-button     { border-radius: 15px; padding: 16px 2px; font-size: 16px !important;  word-break: break-word}
  .close-button {
    align-self: start;   /* move to top */
  }
}

/* ─── Responsive: landscape compact ───────────────────────────────────────── */
@media (max-width: 768px) and (max-height: 500px) and (orientation: landscape) {
  .table-header { display: none; }

  .bet-row {
    display: block;
    padding: 16px;
    margin: 15px;
    border-radius: 16px;
    border: 1.5px solid rgba(242, 242, 242, 0.3);
  }

  .game-column {
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  }

  .mobile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 8px;
    margin-bottom: 16px;
  }

  .actions-column {
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 215, 0, 0.15);
    margin-top: 16px;
  }

  .bet-type,
  .amount-column,
  .round-id,
  .status-column { display: none; }
}

@media (orientation: landscape) and (max-height: 500px) {
  .header-section  { padding: 5px; }
  .header-content  { padding: 5px 12px; }
  .main-title      { font-size: 16px; }
  .subtitle        { display: none; }
  .tabs-section    { padding-top: 6px !important; padding-left: 12px; padding-right: 12px; }
  .content-section { padding: 0 12px 8px; }
  .table-header    { padding: 16px 35px; }
  .table-body      { max-height: calc(100vh - 120px); padding-bottom: 20px; }
}

@media (orientation: landscape) and (max-height: 375px) {
  .table-body { padding-bottom: 10px; max-height: 100vh; }
}

/* ─── Responsive: portrait ─────────────────────────────────────────────────── */
@media (orientation: portrait) {
  /* .title-section {
    padding: 20px 0;
  } */

  .tab-content-section {
    width: 100%;
    height: 75%;
    flex: 1;
  }
}

@media (orientation: portrait) and (max-height: 500px) {
  .tab-content-section { height: 60%; flex: 1; }
}

/* ─── Responsive: tab-content-section height breakpoints ──────────────────── */
@media (max-height: 550px) and (orientation: landscape) {
  .tab-content-section { height: 80%; overflow-y: auto; flex: 1; }
  .table-body          { max-height: 100%; padding-bottom: 0; }
}

@media (max-height: 400px) and (orientation: landscape) {
  .tab-content-section { height: 79%; overflow-y: auto; }
}

@media (max-height: 376px) and (orientation: landscape) {
  .tab-content-section { height: 58%; }
}

@media (max-height: 360px) and (orientation: landscape) {
  .tab-content-section { height: 57%; }
}

@media (max-height: 344px) and (orientation: landscape) {
  .tab-content-section { height: 76%; }
}

/* ─── Legacy history panel classes (from style.css) ────────────────────────── */
:root {
  --en-lang-size: 2.5vw;
  --th-txt-size: 2vw;
}

.displayNone  { visibility: hidden; }
.displayHideDS { display: none; }
.displayhide  { display: none; }
.break-all    { word-break: break-all; }
.text-center  { align-items: center !important; }
.contentBonus { color: #ffca0d; }

#historyMain { width: 100%; height: 100%; }

#historyHeader {
  box-sizing: content-box;
  border-bottom: 2.77px solid #a48723;
  width: 98%;
  height: 14%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: auto;
}

.h-heading {
  display: flex;
  align-items: center;
  width: 80vw;
  margin: auto;
  justify-content: center;
  height: 100%;
}

.headingText {
  font-size: min(7vmin, 56px);
  color: #ffca0d;
  line-height: 0.9;
  font-family: "Noto Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

.imageDiv { display: flex; gap: 1.2rem; visibility: hidden; }
.imageDiv img { width: 50%; background-color: rgba(0,0,0,0.8); border: 1px solid #fff; border-radius: 10px; padding: 0.8rem 0.5rem; }
.imageDiv img:hover { background-color: #515151; cursor: pointer; }

.ToggleDiv {
  background-color: #ffca0d;
  padding: 0 1.2rem;
  display: flex;
  font-family: "Inter-Medium";
  font-size: min(7vmin, 1.78rem);
  color: black;
  align-items: center;
  border-radius: 10px;
  gap: 10px;
  border: 1px solid white;
  font-weight: 700;
  justify-content: center;
  white-space: nowrap;
}
.ToggleDiv:hover { background-color: #cba009; cursor: pointer; }
.ToggleDiv img   { width: min(7vmin, 20%); height: 20%; }
.ToggleDiv p     { margin: 0; padding: 0; }

.h-close {
  font-size: 28px;
  font-weight: bold;
  opacity: 1;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  height: 100%;
}

#h-detailsMainContainer {
  width: 100%;
  height: 81%;
  display: flex;
  flex-direction: column;
  font-family: "Noto Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

#h-detailsSelectorBtns_Container {
  width: 80%;
  display: none !important;
  align-self: center;
  margin-top: 25px;
}

.h-detailsSelectorBtn {
  cursor: pointer;
  width: 100%;
  aspect-ratio: 480.67 / 107;
  background-color: rgba(0,0,0,0.5);
  border: 1px solid white;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: var(--en-lang-size);
  line-height: 1.2;
  --borderRadius: 0.6vw;
}
.h-detailBtns_subText { font-size: 0.5em; }
.h-detailsSelectorBtn:first-child { background: #ffca0d; color: black; pointer-events: none; border-top-left-radius: var(--borderRadius); border-bottom-left-radius: var(--borderRadius); }
.h-detailsSelectorBtn:last-child  { border-top-right-radius: var(--borderRadius); border-bottom-right-radius: var(--borderRadius); }

#h-historyTables_Wrapper { height: 100%; overflow-y: auto; overflow-x: hidden; position: relative; margin-top: 15px; }
#h-spinner-Wrapper { position: absolute; top: 50%; left: 50%; translate: -50% -50%; display: none; }

#h-historyTable_Container {
  width: 80vw;
  margin: auto;
  translate: calc(var(--scrollWidth) / 2) 0;
  display: grid;
  grid-template-columns: auto repeat(3, 1fr) auto;
  font-size: 1.33vw;
  font-family: "Noto Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}
#h-historyTable_Container > div { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
#h-historyTable_Container > .h-tableContent { padding: 1em 0.5em; box-sizing: content-box; }
.h-tableContent { cursor: pointer; font-size: 1rem; color: #bcbcbc; }
.h-tableContent > p { margin-bottom: 0 !important; }
#h-historyTable_Container > .h-tableTitle { padding-inline: 0.5em; box-sizing: content-box; text-transform: uppercase; font-weight: 500; border-bottom: 0.01em solid #202020; font-size: 1.125rem; color: #fff; }
.h-detailIcon { width: 0.5em; display: grid; place-items: center; }

/* isMobile */
#historyPanel[isMobile="true"] #historyHeader { height: 15%; border-width: 2px; }
#historyPanel[isMobile="true"] .h-close { width: 85px; }
#historyPanel[isMobile="true"] .h-close img { margin: auto; height: 64%; }
#historyPanel[isMobile="true"] .h-heading { margin-left: 40px; }

/* isLand */
#historyPanel[isLand="true"] #h-detailsSelectorBtns_Container { width: 60%; display: none; }
#historyPanel[isLand="true"] .h-detailsSelectorBtn { aspect-ratio: 150/39; font-size: 1.5vw; }
#historyPanel[isLand="true"] #h-historyTable_Container { font-size: 1.5vw; width: 75vw; }
#historyPanel[isLand="true"] .displayhide { display: none; }
#historyPanel[isLand="true"] .ToggleDiv { font-size: 16px; width: 7rem; }
#historyPanel[isLand="true"] .ToggleDiv img { width: 25%; height: 25%; }
#historyPanel[isLand="true"] .h-heading { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: 1fr; margin: 0; }
#historyPanel[isLand="true"] .headingText { grid-column: 2 / span 3; text-align: center; }
#historyPanel[isLand="true"] .ToggleDiv { grid-column: 5 / span 5; padding: 0.3rem 1.2rem; }

/* Modal */
.modal-overlay { display: none; justify-content: center; align-items: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); z-index: 999; }
#gameHistoryIFrame { width: 100%; border: none; overflow: auto; flex-grow: 1; }
#gameHistoryIFrame button { display: none !important; }
.modalContent { display: flex; flex-direction: column; background-color: #fff; padding: 8px; border-radius: 16px; width: 90% !important; height: 75vh; position: relative; }
.modalContentHeader { display: flex; justify-content: flex-end; align-items: flex-start; margin-bottom: 4px; }
.close-btn { cursor: pointer; max-width: 48px; background: none; border: none; z-index: 100; }
.close-btn:focus { outline: none; }
.close-btn img { width: 100%; }

#loader { border: 8px solid #f3f3f3; border-radius: 50%; border-top: 12px solid #444; width: 50px; height: 50px; animation: spin 1s linear infinite; z-index: 99999; display: block; }
@keyframes spin { 100% { transform: rotate(360deg); } }
.center { position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: auto; }

.bottom-container { display: flex; justify-content: center; align-items: center; background: #000; position: fixed; bottom: 0; width: 100%; height: 10%; }
.bottom_image_container { height: 100%; width: 100%; display: flex; justify-content: center; align-items: center; flex: 1; padding: 1rem; }
.bottom_image_container img { width: 100%; height: 100%; object-fit: contain; }

.candy_cancel_btn { box-sizing: border-box; width: 20%; height: 100%; display: flex; justify-content: flex-end !important; align-items: center !important; cursor: pointer; }
.candy_cancel_btn img { width: 60px; height: 60px; object-fit: contain; }

@media screen and (max-width: 1024px) { .close-btn { width: 32px; } }
@media (min-width: 1180px) and (max-width: 1290px) { .headingText { font-size: min(7vmin, 46px); } }
@media (min-width: 950px) and (max-width: 1180px)  { .headingText { font-size: min(7vmin, 38px); } }
@media (max-width: 750px) { .displayhide { display: none; } }
@media (orientation: landscape) { .bottom_image_container { padding: 0.5rem; } }
@media (orientation: landscape) and (max-height: 500px) { .h-tableContent, #h-historyTable_Container > .h-tableTitle { font-size: 16px; } }

@media (orientation: portrait) {
  .ToggleDiv { font-size: max(16px, min(4vmin, 1rem)); }
  .displayNone, .displayhide { display: none; }
  #historyPanel[isMobile="true"] #historyHeader { height: 9.5%; }
  #historyPanel[isMobile="true"] .h-close { width: auto; }
  #historyPanel[isMobile="true"] .h-close img { margin: auto; height: 50%; }
  #historyPanel[isMobile="true"] .h-heading { margin-left: 0; }
  #historyHeader { width: 94%; height: 7.5%; align-items: flex-end; }
  .h-heading .headingText { font-size: min(3vh, 26px); align-items: flex-end; }
  .headingText { white-space: normal; }
  #h-detailsMainContainer, #lower { width: 100%; flex: 1; }
  .h-detailsSelectorBtn { aspect-ratio: 120.67/39; font-size: 3vw; --borderRadius: 1.6vw; }
  #h-detailsSelectorBtns_Container { width: 96%; display: none; }
  #h-historyTable_Container { width: 96%; font-size: 3vw; grid-template-columns: auto repeat(2, 1fr) auto auto; }
  #h-historyTable_Container > .h-tableTitle { padding-inline: 0.8em; }
}

@media (orientation: portrait) and (max-width: 530px) { .h-tableContent, #h-historyTable_Container > .h-tableTitle { font-size: 16px; } }
@media (min-width: 1920px) { #h-detailsMainContainer, #lower { height: 86%; } }
@media (max-height: 376px) { #lower { height: 61%; } }
@media (max-height: 360px) { .lower { height: 60%; } }
@media (max-height: 344px) { #lower { height: 76%; flex: 1; } }
