/* ============================================
   STOCK SLOT - Clean Stylesheet
   ============================================ */

/* ============================================
   1. IMPORTS & CSS VARIABLES
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Poppins:wght@400;500;600;700;800&family=Roboto+Mono:wght@700&display=swap');
@import url('https://fonts.cdnfonts.com/css/blood-melt');

:root {
  --bg: #00033D;
  --panel: #001A5F;
  --text: #ffffff;
  --muted: #A3D1FF;
  --accent: #0074FF;
  --accent-soft: #24AAFF;
}

/* ============================================
   2. RESET & BASE STYLES
   ============================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#app {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Blood Melt', serif;
  color: var(--text);
  background: url('/bg.png') no-repeat center center fixed;
  background-size: cover;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   3. MAIN PAGE LAYOUT
   ============================================ */
.main-page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   4. HEADER SECTION
   ============================================ */
.header-bg {
  position: relative;
  width: 95%;
  height: 80px;
  margin: 7px auto 0;
  background: rgba(40, 87, 173, 0.75);
  /* backdrop-filter: blur(8px); */
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 20;
  flex-shrink: 0;
}

/* Header Left */
.header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0px;
}

.header-title {
  font-family: 'Blood Melt', serif;
  font-size: 24px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.live-icon-container {
  position: relative;
  width: 56px;
  height: 28px;
  display: block;
  grid-column: 1;
  grid-row: 1;
}

.live-icon {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
}

.live-1 {
  z-index: 1;
}

.live-2 {
  z-index: 2;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {

  0%,
  49% {
    opacity: 0;
  }

  50%,
  100% {
    opacity: 1;
  }
}

/* Header Center - Status Badge */
.header-center-status {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.status-badge {
  position: relative;
  background: linear-gradient(180deg, #4CAF50 0%, #2E7D32 100%);
  border-radius: 30px;
  padding: 5px 30px;
  min-width: 200px;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid #66BB6A;
}

.status-badge[data-phase="betting"] {
  background: rgba(43, 157, 6, 0.75);
  border: 1px solid rgba(0, 191, 22, 1);
}

.status-badge[data-phase="locked"] {
  background: rgba(27, 82, 216, 1);
  border: 1px solid rgba(42, 118, 255, 1);
}

.status-badge[data-phase="reveal"] {
  background: rgba(229, 204, 57, 1);
  border: 1px solid rgba(245, 235, 176, 1);
}

.status-badge[data-phase="payout"] {
  background: rgba(229, 204, 57, 1);
  border: 1px solid rgba(245, 235, 176, 1);
}

.status-badge-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.status-clock-icon {
  width: 22px;
  height: 26px;
  display: block;
}

.status-message {
  color: white;
  font-family: 'Blood Melt', serif;
  font-weight: 600;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
}

.status-timer {
  color: white;
  font-family: 'Blood Melt', serif;
  font-weight: 600;
  font-size: 15px;
}

/* Header Right */
.user-controls {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: end;
  gap: 0px;
}

.stat-box-container {
  grid-column: 1 / 3;
  grid-row: 2;
  display: flex;
  gap: 4px;
  margin-top: 4px;
  justify-self: end;
}

.stat-box {
  width: 30px;
  height: 30px;
  background: rgba(0, 3, 61, 1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.stat-icon {
  width: 16px;
  height: auto;
  margin-top: 1px;
}

.stat-value {
  font-family: 'Poppins', sans-serif;
  font-size: 8px;
  color: white;
  font-weight: 600;
  line-height: 1;
}

.game-icon {
  width: 20px;
  height: auto;
}

.info-circle {
  width: 18px;
  height: 18px;
  border: 1.5px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-text {
  font-family: 'Poppins', sans-serif;
  color: white;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  margin-top: 2px;
}

.burger-button {
  width: 20px;
  height: 20px;
  cursor: pointer;
  grid-column: 2;
  grid-row: 1;
}

.balance-text {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 500;
  opacity: 0.9;
  white-space: nowrap;
  margin-left: 2px;
}

/* ============================================
   5. MAIN CONTENT ROW
   ============================================ */
.main-content-row {
  display: flex;
  flex: 1;
  width: 98%;
  margin: 0 auto;
  position: relative;
  z-index: 5;
  /* justify-content: space-between; */
  align-items: flex-start;
  padding-top: 50px;
  gap: 0;
}

/* ============================================
   6. BOARD CONTAINER & GAME BOARD
   ============================================ */
.board-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  flex: 0 0 60%;
}

.game-board {
  position: relative;
  width: 670px;
  height: 400px;
  display: block;
}

.game-board-content {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

.board-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.board-border {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  width: auto;
  height: auto;
  z-index: 2;
}

/* Girl Character */
.girl-character {
  position: absolute;
  top: -115px;
  left: 26px;
  width: 130px;
  height: auto;
  z-index: 0;
  pointer-events: none;
}

/* ============================================
   7. LEFT PANEL (STOCK LIST) & RIGHT PANEL (LAST ROUND WINNER TABLE)
   ============================================ */
.left-panel-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  /* margin-top: 10px; */
  position: relative;
  z-index: 2;
  flex: 0 0 15%;
  align-items: center;
}

.right-panel-container {
  position: relative;
  width: 450px;
  height: 600px;
  margin-top: -30px;
  z-index: 2;
  flex: 0 0 25%;
  /* table.png as background */
  background-image: url('/table.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  /* % sides scale with width; fixed top/bottom match the ice frame borders */
  padding: 40px 4% 38px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  box-sizing: border-box;
}

/* Side panel views (desktop right panel) */
.side-lrw-view,
.side-mybets-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
  overflow: hidden;
  min-height: 0;
}

/* Side panel toggle buttons (desktop only — separate from mobile .bets-toggle-btn) */
.side-bets-toggle-container {
  display: flex;
  background-color: #26E5FF;
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.side-bets-toggle-btn {
  flex: 1;
  background: transparent;
  border: none;
  font-family: 'Blood Melt', serif;
  font-size: 13px;
  color: #004F8A;
  padding: 5px 0;
  border-radius: 9px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  letter-spacing: 1px;
}

.side-bets-toggle-btn.active {
  color: #FFFFFF;
  background-color: #004F8A;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.side-bets-toggle-btn:hover:not(.active) {
  background-color: rgba(0, 79, 138, 0.1);
}

.side-table-title {
  font-family: 'Blood Melt', serif;
  font-size: 18px;
  text-align: center;
  background: linear-gradient(180deg, #FFFFFF 30.29%, #0285F5 70.17%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
  white-space: nowrap;
}

.side-table-header {
  display: grid;
  gap: 2px;
  /* Match content padding-right so columns align with data rows */
  padding: 4px 10px 4px 2px;
  font-family: 'Blood Melt', serif;
  font-size: 14px;
  background: linear-gradient(180deg, #FFFFFF 30.29%, #0285F5 70.17%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* LRW: Date (wide) | Time | Winner (short number) */
.side-lrw-view .side-table-header,
.side-lrw-view .side-table-row {
  grid-template-columns: 2.2fr 1.5fr 1fr;
}

/* LRW Time column: left-align so header and data perfectly overlap */
.side-lrw-view .side-table-header span:nth-child(2),
.side-lrw-view .side-table-row span:nth-child(2) {
  text-align: left;
}

/* My Bets: Bet amount | Time | Bets result (long +₹ value) */
.side-mybets-view .side-table-header,
.side-mybets-view .side-table-row {
  grid-template-columns: 1.8fr 1.5fr 2.2fr;
}

.side-table-header span:nth-child(1) {
  text-align: left;
}

.side-table-header span:nth-child(2) {
  text-align: center;
}

.side-table-header span:nth-child(3) {
  text-align: right;
}

.side-table-content {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  padding-right: 8px;
}

.side-table-content::-webkit-scrollbar {
  width: 4px;
}

.side-table-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}

.side-table-content::-webkit-scrollbar-thumb {
  background: rgba(38, 229, 255, 0.6);
  border-radius: 2px;
}

.side-table-content::-webkit-scrollbar-thumb:hover {
  background: rgba(38, 229, 255, 0.9);
}

.side-table-row {
  display: grid;
  gap: 2px;
  padding: 5px 2px;
  font-family: 'Blood Melt', serif;
  font-size: 12px;
  color: #ffffff;
  align-items: center;
}

.side-table-row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-table-row span:nth-child(1) {
  text-align: left;
}

.side-table-row span:nth-child(2) {
  text-align: center;
}

.side-table-row span:nth-child(3) {
  text-align: right;
}

.right-panel {
  width: 100%;
  height: 100%;
}

.right-panel-frame {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  background: transparent;
}

.ice-element-container {
  width: 210px;
  height: 105px;
  position: relative;
  display: block;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.ice-element {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.ice-element-text-wrapper {
  position: absolute;
  top: -3px;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding-top: 0px;
}

.ice-element-title {
  font-family: 'Blood Melt', serif;
  font-size: 14px;
  margin-bottom: 0px;
  background: linear-gradient(180deg, #FFFFFF 39.58%, #0285F5 79.17%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ice-element-value {
  font-family: 'Blood Melt', serif;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(180deg, #FFFFFF 39.58%, #0285F5 79.17%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   7b. MULTIPLIER SECTION (NEW)
   ============================================ */
.mobile-multiplier-section {
  display: none !important;
}

.multiplier-section-container {
  width: 700px;
  height: 90px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  /* Removed Bg-bet.png from container */
  padding: 0;
  z-index: 4;
}

.multiplier-section-content {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  width: 100%;
  height: 100%;
}

.multiplier-button {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.multiplier-button:hover {
  transform: translateY(-2px);
}

.multiplier-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 90%;
  object-fit: fill;
  /* Ensure it stretches to fill the box */
  z-index: 0;
  transform: scale(1.5);
}

.multiplier-text-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.multiplier-title {
  font-family: 'Blood Melt', serif;
  font-size: 13px;
  font-weight: 400;
  background: linear-gradient(180deg, #FFFFFF 39.58%, #0285F5 79.17%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  white-space: nowrap;
}

.multiplier-value {
  font-family: 'Blood Melt', serif;
  font-size: 13px;
  font-weight: 400;
  background: linear-gradient(180deg, #FFFFFF 39.58%, #0285F5 79.17%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 5px;
}

/* ============================================
   8. BETTING PANEL
   ============================================ */
.betting-panel-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 5px;
  /* Adjusted from -15px to avoid overlapping the new section */
}

/* Mobile betting panel - hidden on desktop */
.mobile-betting-panel-container {
  display: none;
}

.betting-panel {
  width: 100%;
  position: relative;
  display: flex;
}

.betting-container {
  width: 100%;
  max-width: 100%;
  padding: 0px 12px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: auto;
  min-height: 115px;
}

/* Coins Section */
.coins-section {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.upper-section,
.lower-section {
  display: flex;
  gap: 10px;
}

.coin-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.coin-chip {
  width: 75px;
  height: 60px;
  cursor: pointer;
  transition: transform 0.1s;
}

.coin-chip:hover {
  transform: scale(1.05);
}

.coin-value {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  /* Let clicks pass through to the wrapper */
  z-index: 10;
}


/* Bet Controls Section */
.bet-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  height: 100%;
}

.bet-wrapper {
  position: relative;
  width: 165px;
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.button-bg-wrapper {
  position: relative;
  width: 165px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.spin-wrapper {
  position: relative;
  width: 95px;
  height: 95px;
  cursor: pointer;
  transition: transform 0.1s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.spin-wrapper:focus,
.spin-wrapper:focus-visible {
  outline: none;
}

.spin-wrapper:active {
  transform: scale(0.95);
}

.bet-button,
.button-bg-side,
.spin-button {
  width: 100%;
  height: 100%;
}

.spin-button {
  outline: none;
  border: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-tap-highlight-color: transparent;
  pointer-events: none;
}

.spin-button:focus,
.spin-button:focus-visible {
  outline: none;
}

.bet-input-container {
  position: absolute;
  top: 45%;
  left: 46%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 30px;
  gap: 2px;
}

.currency-symbol {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(180deg, #FFFFFF 19%, #0285F5 79%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  -webkit-user-select: none;
  user-select: none;
}

.bet-text1 {
  width: 80%;
  font-size: 20px;
  font-weight: 700;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  background: linear-gradient(180deg, #FFFFFF 19%, #0285F5 79%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  caret-color: #0285F5;
  text-align: center;
}

.arrow-up,
.arrow-down {
  position: absolute;
  width: 24px;
  height: 14px;
  right: 35px;
  cursor: pointer;
}

.arrow-up {
  top: 30%;
  transform: rotate(0deg);
}

.arrow-down {
  bottom: 40%;
  transform: rotate(180deg);
}

.bg-text-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bg-text-title {
  font-size: 17px;
  font-weight: 600;
  background: linear-gradient(180deg, #FFFFFF 19.58%, #0285F5 79.17%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-text-value {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(180deg, #FFFFFF 19.58%, #0285F5 79.17%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   9. MENU PAGE (HAMBURGER OVERLAY)
   ============================================ */
.menu-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
}

.menu-page.active {
  display: block;
}

.menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-container {
  position: relative;
  width: 95%;
  max-width: 500px;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* justify-content: center; */
  padding: 60px;
}

.menu-image {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  object-fit: fill;
  z-index: 1;
}

/* Separate Popup Containers */
.game-history-container,
.how-to-play-container,
.home-container {
  position: relative;
  width: 95%;
  max-width: 600px;
  min-height: 530px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px;
}

.popup-bg-image {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  object-fit: fill;
  z-index: 1;
}

.close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 10;
}

.menu-items {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 80%;
  max-width: 300px;
}

.menu-item {
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: transform 0.2s;
}

.menu-item:hover {
  transform: scale(1.05);
}

/* Menu Content Sections */
.game-history-content,
.how-to-play-content,
.home-content {
  position: relative;
  z-index: 5;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  padding: 15px;
}

.game-history-title,
.how-to-play-title,
.home-title {
  font-family: 'Blood Melt', serif;
  font-size: 45px;
  color: white;
  text-align: left;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  width: 100%;
  text-align: center;
}

/* Game History Table */
.history-table {
  width: 100%;
  margin-top: 20px;
}

.history-header {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  padding: 15px 20px;
  background: rgba(0, 26, 95, 0.3);
  border-radius: 8px;
  margin-bottom: 10px;
  width: 100%;
}

.history-column {
  font-family: 'Blood Melt', serif;
  font-size: 14px;
  font-weight: 700;
  color: white;
  text-align: left;
  text-transform: uppercase;
}

.pagination-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.pagination-arrow {
  width: 30px;
  height: 30px;
  cursor: pointer;
  transition: transform 0.2s;
}

.pagination-arrow:hover {
  transform: scale(1.1);
}

.pagination-number {
  font-family: 'Blood Melt', serif;
  font-size: 18px;
  font-weight: 600;
  color: white;
}

/* Quit/Home Content */
.quit-subtitle,
.quit-text,
.quit-full-message {
  font-family: 'Blood Melt', serif;
  color: white;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.quit-subtitle {
  font-size: 24px;
  margin: 10px 0;
}

.quit-text {
  font-size: 28px;
  margin: 5px 0;
}

.quit-full-message {
  font-size: 26px;
  margin: 10px 0;
  line-height: 1.5;
}

.quit-buttons {
  display: flex;
  gap: 30px;
  margin-top: 10px;
  justify-content: center;
}

.quit-button-wrapper {
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}

.quit-button-wrapper:hover {
  transform: scale(1.05);
}

.yes-button,
.no-button {
  width: 120px;
  height: auto;
}

.button-text2 {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Blood Melt', serif;
  font-size: 18px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* ============================================
   13. FOOTER IMAGE SECTION
   ============================================ */
.footer-image-container {
  width: 100%;
  display: none;
  justify-content: center;
  align-items: flex-end;
  z-index: 1;
  position: relative;
}

.my-bets-container {
  width: 100%;
  display: none;
  justify-content: center;
  align-items: flex-end;
  z-index: 1;
  position: relative;
}

.my-bets-container .footer-title {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: rgba(255, 255, 255, 1);
  color: rgba(255, 255, 255, 1);
  margin-bottom: 8px;
}

/* My Bets Toggle Buttons */
.bets-toggle-container {
  display: flex;
  background-color: #26E5FF;
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 15px;
  width: 90%;
  max-width: 300px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.bets-toggle-btn {
  flex: 1;
  background: transparent;
  border: none;
  font-family: 'Blood Melt', serif;
  font-size: 16px;
  color: #00365E;
  /* Dark blue text for inactive */
  padding: 5px 0;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-transform: capitalize;
  letter-spacing: 1px;
}

.bets-toggle-btn.active {
  color: #FFFFFF;
  background-color: #004F8A;
  /* Dark blue background for active */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.bets-toggle-btn:hover:not(.active) {
  background-color: rgba(0, 79, 138, 0.1);
}

.footer-image-img {
  width: 100%;
  height: 40vh;
  display: block;
  object-fit: fill;
}

.my-bets-container .footer-table-header,
.my-bets-container .footer-table-row {
  grid-template-columns: 1fr 1fr 1fr;
}

.my-bets-container .footer-table-header {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: rgba(255, 255, 255, 1);
  color: rgba(255, 255, 255, 1);
}

.footer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 70px 100px;
  z-index: 2;
}

.footer-title {
  font-family: 'Blood Melt', serif;
  font-size: 20px;
  background: linear-gradient(180deg, #FFFFFF 30%, #0285F5 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.footer-table-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  width: 100%;
  margin-bottom: 10px;
  text-align: center;
  font-family: 'Blood Melt', serif;
  font-weight: bold;
  font-size: 16px;
  background: linear-gradient(180deg, #FFFFFF 30%, #0285F5 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-table-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 12px;
  overflow-y: auto;
}

.footer-table-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  width: 100%;
  text-align: center;
  font-family: 'Blood Melt', serif;
  font-size: 12px;
  font-weight: 300;
  color: white;
}

@media (max-width: 550px) {
  .footer-overlay {
    padding: 60px 60px;
  }

  .footer-title {
    font-size: 16px;
  }

  .footer-image-container .footer-title {
    margin-bottom: 5px;
  }

  .footer-table-header {
    font-size: 14px;
    margin-bottom: 5px;
  }

  .footer-table-header span {
    white-space: normal !important;
  }

  .footer-table-row {
    font-size: 10px;
  }

  .bets-toggle-container {
    max-width: 250px;
    padding: 2px;
    margin-bottom: 5px;
  }


  .bets-toggle-btn {
    font-size: 12px;
    padding: 4px 0;
  }
}

/* ============================================
   10. RESPONSIVE - SMALL DESKTOP / LARGE LAPTOP (1025px – 1400px)
   ============================================ */
@media (max-width: 1400px) {
  .main-content-row {
    padding-top: 40px;
    gap: 5px;
  }

  .board-container {
    margin-left: 5px;
    margin-right: -20px;
  }

  .game-board {
    width: 90%;
    height: 365px;
  }

  .multiplier-section-container {
    width: 580px;
  }

  .multiplier-title {
    font-size: 10px;
  }

  .multiplier-value {
    font-size: 11px;
  }

  .right-panel-container {
    width: 420px;
    height: 640px;
    margin-top: -35px;
    padding: 50px 4% 50px;
  }

  .ice-element-container {
    width: 185px;
    height: 92px;
  }

  .ice-element-title {
    font-size: 12px;
  }

  .ice-element-value {
    font-size: 13px;
  }

  .side-table-title {
    font-size: 18px;
  }

  .side-bets-toggle-btn {
    font-size: 11px;
    letter-spacing: 0.5px;
  }

  .side-table-header {
    font-size: 14px;
  }

  .side-table-row {
    font-size: 9px;
  }

  .coin-chip {
    width: 65px;
    height: 52px;
  }

  .coin-value {
    font-size: 12px;
  }

  .bet-wrapper {
    width: 148px;
    height: 86px;
  }

  .button-bg-wrapper {
    width: 148px;
    height: 72px;
  }

  .spin-wrapper {
    width: 85px;
    height: 85px;
  }

  .arrow-up,
  .arrow-down {
    width: 20px;
    height: 12px;
    right: 25px;
  }

  .arrow-up {
    top: 28%;
  }

  .arrow-down {
    bottom: 40%;
  }
}

/* ============================================
   RESPONSIVE: MEDIUM LAPTOP (1025px – 1200px)
   ============================================ */
@media (max-width: 1200px) {
  .main-content-row {
    padding-top: 60px;
    gap: 5px;
  }

  .board-container {
    margin-left: 0px;
    margin-right: -10px;
  }

  .game-board {
    width: 500px;
    height: 315px;
  }

  .multiplier-section-container {
    width: 500px;
    height: 80px;
  }

  .multiplier-title {
    font-size: 9px;
  }

  .multiplier-value {
    font-size: 10px;
  }

  .right-panel-container {
    width: 360px;
    height: 500px;
    margin-top: -30px;
    padding: 40px 3.8% 40px;
  }

  .ice-element-container {
    width: 165px;
    height: 82px;
  }

  .ice-element-title {
    font-size: 11px;
  }

  .ice-element-value {
    font-size: 12px;
  }

  .girl-character {
    width: 110px;
    top: -90px;
    left: 20px;
  }

  .side-table-title {
    font-size: 15px;
  }

  .side-table-header {
    font-size: 12px;
  }

  .side-table-row {
    font-size: 9px;
  }

  .side-bets-toggle-btn {
    font-size: 9px;
    letter-spacing: 0;
    padding: 3px 0;
  }

  .coin-chip {
    width: 58px;
    height: 46px;
  }

  .coin-value {
    font-size: 11px;
  }

  .bet-wrapper {
    width: 135px;
    height: 78px;
  }

  .button-bg-wrapper {
    width: 135px;
    height: 65px;
  }

  .spin-wrapper {
    width: 78px;
    height: 78px;
  }

  .bet-text1 {
    font-size: 15px;
  }

  .bg-text-wrapper {
    top: 52%;
    gap: 3px;
  }

  .bg-text-title {
    font-size: 14px;
    line-height: 1;
  }

  .bg-text-value {
    font-size: 16px;
    line-height: 1;
  }
}

/* ============================================
   RESPONSIVE - TABLET / SMALL LAPTOP (769px – 1024px)
   ============================================ */
@media (max-width: 1024px) {
  .main-content-row {
    padding-top: 50px;
    gap: 4px;
  }

  .board-container {
    margin-left: 0px;
    margin-right: 0px;
  }

  .game-board {
    width: 420px;
    height: 265px;
  }

  .multiplier-section-container {
    width: 420px;
    height: 65px;
  }

  .multiplier-title {
    font-size: 7px;
  }

  .multiplier-value {
    font-size: 8px;
  }

  .right-panel-container {
    width: 300px;
    height: 380px;
    margin-top: -25px;
    padding: 40px 3.8% 40px;
  }

  .ice-element-container {
    width: 128px;
    height: 72px;
  }

  .ice-element-title {
    font-size: 10px;
    margin-bottom: -2px;
  }

  .ice-element-value {
    font-size: 11px;
  }

  .girl-character {
    width: 95px;
    top: -75px;
    left: 15px;
  }

  .side-lrw-view,
  .side-mybets-view {
    gap: 2px;
  }

  .side-table-title {
    font-size: 12px;
  }

  .side-bets-toggle-btn {
    font-size: 8px;
    letter-spacing: 0;
    padding: 2px 0;
  }

  .side-table-header {
    font-size: 9px;
  }

  .side-table-row {
    font-size: 8px;
  }

  .betting-container {
    padding: 0px 4px;
    gap: 5px;
    min-height: 80px;
  }

  .coin-chip {
    width: 48px;
    height: 38px;
  }

  .coin-value {
    font-size: 8px;
  }

  .bet-wrapper {
    width: 115px;
    height: 66px;
  }

  .button-bg-wrapper {
    width: 115px;
    height: 55px;
  }

  .spin-wrapper {
    width: 66px;
    height: 66px;
  }

  .bet-text1 {
    font-size: 11px;
  }

  .arrow-up,
  .arrow-down {
    width: 16px;
    height: 10px;
    right: 20px;
  }

  .header-bg {
    padding: 0 20px;
  }

  .footer-table-header span {
    white-space: normal !important;
  }
}

/* ============================================
   RESPONSIVE: SMALL TABLET (769px – 900px)
   ============================================ */
@media (max-width: 900px) {
  .main-content-row {
    padding-top: 40px;
    gap: 3px;
  }

  .board-container {
    margin-left: 10px;
    margin-right: -15px;
  }

  .game-board {
    width: 360px;
    height: 230px;
  }

  .multiplier-section-container {
    width: 360px;
    height: 55px;
  }

  .multiplier-title {
    font-size: 6px;
  }

  .multiplier-value {
    font-size: 7px;
  }

  .right-panel-container {
    width: 260px;
    height: 340px;
    margin-top: -20px;
    padding: 40px 3.8% 40px;
  }

  .left-panel-container {
    gap: 8px;
  }

  .ice-element-container {
    width: 95px;
    height: 52px;
  }

  .ice-element-title {
    font-size: 7px;
    margin-bottom: -1px;
  }

  .ice-element-value {
    font-size: 8px;
  }

  .girl-character {
    width: 80px;
    top: -65px;
    left: 12px;
  }

  .side-lrw-view,
  .side-mybets-view {
    gap: 1px;
  }

  .side-table-title {
    font-size: 10px;
  }

  .side-bets-toggle-btn {
    font-size: 7px;
    letter-spacing: 0;
    padding: 1px 0;
  }

  .side-table-header {
    font-size: 7px;
  }

  .side-table-row {
    font-size: 6px;
  }

  .no-data-message {
    font-size: 8px !important;
    margin-top: 8px !important;
  }

  .betting-container {
    padding: 0px 3px;
    gap: 4px;
    min-height: 70px;
  }

  .coin-chip {
    width: 42px;
    height: 33px;
  }

  .coin-value {
    font-size: 7px;
  }

  .bet-wrapper {
    width: 100px;
    height: 58px;
  }

  .button-bg-wrapper {
    width: 100px;
    height: 48px;
  }

  .spin-wrapper {
    width: 58px;
    height: 58px;
  }

  .bet-text1 {
    font-size: 10px;
  }

  .bg-text-wrapper {
    top: 54%;
    gap: 0px;
  }

  .bg-text-title {
    font-size: 9px;
    line-height: normal;
  }

  .bg-text-value {
    font-size: 10px;
    line-height: normal;
  }

  .arrow-up,
  .arrow-down {
    width: 14px;
    height: 9px;
    right: 16px;
  }
}

/* ============================================
   11. RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {

  html,
  body {
    overflow-y: auto !important;
  }

  .footer-image-container {
    display: flex;
    overflow-x: hidden;
    /* Ensure it manages the extra width internally if needed */
  }

  .footer-image-container .footer-title {
    margin-bottom: 5px;
  }

  .my-bets-container {
    display: flex;
    overflow-x: hidden;
    /* Ensure it manages the extra width internally if needed */
  }

  .footer-image-img {
    width: 130% !important;
    max-width: none !important;
    flex-shrink: 0 !important;
  }

  .header-bg {
    min-height: 70px;
    height: auto;
    padding: 5px 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
  }

  .header-left {
    grid-column: 1;
    gap: 0;
  }

  .header-title {
    font-size: 18px;
  }



  .header-center-status {
    grid-column: 2;
    position: static;
    transform: none;
  }

  .status-badge {
    min-width: 140px;
    height: 45px;
    padding: 5px 15px;
  }

  .status-message {
    font-size: 12px;
  }

  .status-timer {
    font-size: 14px;
  }

  .status-clock-icon {
    width: 18px;
    height: 22px;
  }

  .user-controls {
    grid-column: 3;
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    gap: 0px;
    align-items: center;
    justify-items: end;
  }

  /* Live badge in user controls area - top left */


  .burger-button {
    width: 18px;
    height: 18px;
    margin-bottom: 0;
    grid-column: 2;
    grid-row: 1;
  }

  .balance-text {
    display: block;
    font-size: 12px;
    margin-top: 2px;
    margin-left: 0;
  }

  .main-content-row {
    flex-direction: column;
    align-items: center;
    gap: 0px;
    padding-top: 10px;
  }

  .board-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    align-items: center;
    padding-top: 40px;
    margin-left: 0;
    margin-right: 0;
    /* No order - let children control their own order in main-content-row */
  }

  .game-board {
    width: 90vw;
    max-width: 500px;
    height: auto;
    aspect-ratio: 670 / 450;
    order: 1;
    /* Shows first */
  }

  .girl-character {
    width: 100px;
    top: -80px;
    left: 20px;
  }

  .betting-panel-container {
    display: none !important;
    /* Hide desktop betting panel on mobile */
  }

  .mobile-betting-panel-container {
    display: block;
    /* Show mobile betting panel */
    width: 90vw;
    max-width: 500px;
    order: 3;
    /* Shows last - after right panel */
  }

  .left-panel-container {
    order: 2;
    /* Shows second - after game board */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    justify-content: center;
    width: 90vw;
    max-width: 500px;
    gap: 10px;
  }

  .right-panel-container {
    display: none;
    /* Side table hidden on mobile — footer LRW shows instead */
  }

  .ice-element-container {
    width: 100%;
    min-width: 115px;
    height: 80px;
  }

  /* Make 3rd item span to second row, first position */
  .ice-element-container:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
  }

  /* 4th and 5th items continue on second row */
  .ice-element-container:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
  }

  .ice-element-container:nth-child(5) {
    grid-column: 1 / 3;
    grid-row: 2;
    max-width: 100%;
    margin: 0 auto;
  }

  .betting-container {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }

  .coins-section {
    flex-direction: row;
    gap: 10px;
  }

  .upper-section,
  .lower-section {
    gap: 6px;
  }

  .coin-chip {
    width: 50px;
    height: 50px;
  }

  .coin-value {
    font-size: 11px;
  }

  .bet-section {
    width: 100%;
    justify-content: space-around;
    gap: 10px;
  }

  .bet-wrapper,
  .button-bg-wrapper {
    width: 120px;
    height: 70px;
  }

  .spin-wrapper {
    width: 80px;
    height: 80px;
  }

  /* Menu Popups - Mobile */
  .menu-container {
    width: 90%;
    max-width: 90vw;
    min-height: auto;
    padding: 40px 20px;
  }

  .game-history-container,
  .how-to-play-container,
  .home-container {
    width: 90%;
    max-width: 90vw;
    min-height: auto;
    max-height: 85vh;
    padding: 40px 20px;
    overflow-y: auto;
  }

  .close-button {
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
  }

  .menu-items {
    width: 90%;
    gap: 10px;
  }

  .game-history-title,
  .how-to-play-title,
  .home-title {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .history-header {
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    padding: 10px 5px;
    font-size: 10px;
  }

  .history-column {
    font-size: 10px;
  }

  .pagination-section {
    margin-top: 15px;
    gap: 15px;
  }

  .pagination-arrow {
    width: 25px;
    height: 25px;
  }

  .quit-subtitle {
    font-size: 18px;
  }

  .quit-text {
    font-size: 22px;
  }

  .quit-full-message {
    font-size: 14px;
  }

  .quit-buttons {
    gap: 20px;
    margin-top: 20px;
  }

  .footer-table-header span {
    white-space: normal !important;
  }

  /* Mobile Multiplier Section */
  .board-container .multiplier-section-container {
    display: none;
  }

  .mobile-multiplier-section {
    display: flex !important;
    width: 100%;
    max-width: 400px;
    /* Constrain width for better mobile look */
    height: auto;
    margin-top: 15px;
    align-self: center;
    order: 4;
    /* Place after betting panel (order 3) */
  }

  .mobile-multiplier-section .multiplier-section-content {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 40px;
    row-gap: 5px;
    height: auto;
  }

  .mobile-multiplier-section .multiplier-button {
    height: 90px;
    /* Fixed height for mobile buttons */
  }

  .mobile-multiplier-section .multiplier-title {
    font-size: 11px;
  }

  .mobile-multiplier-section .multiplier-value {
    font-size: 13px;
  }

  .yes-button,
  .no-button {
    width: 100px;
  }
}

/* ============================================
   12. RESPONSIVE - SMALL MOBILE
   ============================================ */
@media (max-width: 480px) {
  .header-bg {
    height: 60px;
    padding: 0 10px;
  }

  .arrow-up {
    top: 20%;
    transform: rotate(0deg);
  }

  .arrow-down {
    bottom: 30%;
    transform: rotate(180deg);
  }

  .header-title {
    font-size: 14px;
  }

  .arrow-up,
  .arrow-down {
    position: absolute;
    width: 24px;
    height: 14px;
    right: 14px;
    cursor: pointer;
  }

  .status-badge {
    min-width: 100px;
    max-width: 180px;
    height: 38px;
    padding: 3px 8px;
  }

  .status-message {
    font-size: 8px;
  }

  .status-timer {
    font-size: 9px;
  }

  .status-clock-icon {
    width: 14px;
    height: 18px;
  }

  /* Show smaller live badge on very small screens */
  .live-icon-container {
    width: 40px;
    height: 20px;
  }

  .stat-box {
    width: 24px;
    height: 24px;
    border-radius: 6px;
  }

  .stat-icon {
    width: 12px;
  }

  .game-icon {
    width: 14px;
  }

  .info-circle {
    width: 14px;
    height: 14px;
    border-width: 1px;
  }

  .stat-value {
    font-size: 7px;
  }

  .info-text {
    font-size: 10px;
  }

  .burger-button {
    width: 16px;
    height: 16px;
    margin-top: 5px;
  }

  .balance-text {
    display: block;
    font-size: 10px;
  }

  .footer-table-header {
    font-size: 12px;
  }

  .footer-table-row {
    font-size: 8px;
  }

  .footer-table-header span {
    white-space: normal !important;
  }

  .coin-chip {
    width: 45px;
    height: 45px;
  }

  .mobile-betting-panel-container .upper-section,
  .mobile-betting-panel-container .lower-section {
    gap: 5px !important;
  }

  .bet-wrapper,
  .button-bg-wrapper {
    width: 100px;
    height: 60px;
  }

  .spin-wrapper {
    width: 70px;
    height: 70px;
  }

  /* Mobile Left Panel Redesign (2+3 Grid) */
  .left-panel-container,
  .right-panel {
    width: 100%;
    align-items: center;
  }

  .right-panel-frame {
    display: flex;
    flex-direction: row;
    /* Override desktop column */
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    /* Slightly reduced gap for mobile */
    width: 100%;
    /* Ensure full width availability */
  }

  .ice-element-container {
    height: 70px;
    /* Adjusted height for mobile */
    position: relative;
    /* Overwrite fixed widths from desktop */
    width: auto;
  }

  /* First 2 items - Top Row (approx 50% each) */
  .ice-element-container:nth-child(-n+2) {
    width: calc(50% - 6px);
    /* 50% minus half the gap */
  }

  /* Remaining 3 items - Bottom Row (approx 33% each) */
  .ice-element-container:nth-child(n+3) {
    width: calc(33.33% - 6px);
    /* 33% minus gap adjustments */
  }

  /* Font adjustments for smaller boxes */
  .ice-element-title {
    font-size: 13px;
  }

  .ice-element-value {
    font-size: 15px;
  }

  /* Multiplier Section Gap Fix for Small Screens */
  .mobile-multiplier-section .multiplier-section-content {
    column-gap: 10px;
  }
}

/* Further adjustments for very small screens if needed */
@media (max-width: 380px) {
  .ice-element-title {
    font-size: 11px;
  }

  .ice-element-value {
    font-size: 13px;
  }

  .mobile-betting-panel-container .spin-wrapper {
    width: 50px !important;
    height: 50px !important;
  }

  /* Footer Adjustments */
  .footer-overlay {
    padding: 55px 35px;
  }

  .footer-title {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .footer-table-header {
    font-size: 11px;
    margin-bottom: 2px;
  }

  .footer-table-row {
    font-size: 9px;
  }

  .footer-table-header span {
    white-space: normal !important;
  }
}

/* End of previous media query */

/* FORCE MOBILE RIGHT PANEL LAYOUT (2+3 Grid) */
@media screen and (max-width: 768px) {

  /* Unlock Containers */
  .left-panel-container,
  .right-panel {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  /* Force Grid Layout on Frame - USING CSS GRID (6 Column System) */
  .right-panel-frame {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 0px !important;
    width: 100% !important;
    flex: none !important;
    /* Disable flex behavior if set elsewhere */
  }

  /* Reset Child Container Sizing */
  .ice-element-container {
    height: 70px !important;
    width: 100% !important;
    /* MUST fill the grid cell */
    margin: 0 !important;
  }

  /* Top Row: 2 Items (Each spans 3 of 6 columns = 50%) */
  .ice-element-container:nth-child(-n+2) {
    grid-column: span 3 !important;
    width: 100% !important;
  }

  /* Bottom Row: 3 Items (Each spans 2 of 6 columns = 33.33%) */
  .ice-element-container:nth-child(n+3) {
    grid-column: span 2 !important;
    width: 100% !important;
  }

  /* Text Adjustments */
  .ice-element-title {
    font-size: 11px !important;
  }

  .ice-element-value {
    font-size: 12px !important;
  }

  /* MOBILE BETTING PANEL REDESIGN */

  /* 1. Toggle Panels: Hide Desktop, Show Mobile */
  .betting-panel-container {
    display: none !important;
  }

  .mobile-betting-panel-container {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    margin-top: 10px !important;
    /* padding-bottom: 20px !important; */
  }

  /* 2. Main Container Layout */
  .mobile-betting-panel-container .betting-panel {
    width: 100% !important;
  }

  .mobile-betting-panel-container .betting-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 5px !important;
    gap: 2px !important;
  }

  /* 3. Chips Section (2x3 Grid) */
  .mobile-betting-panel-container .coins-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 0px !important;
    flex: 1 !important;
    /* Take available space */
  }

  .mobile-betting-panel-container .upper-section,
  .mobile-betting-panel-container .lower-section {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    /* Spread chips evenly */
    gap: 15px !important;
  }

  /* Scale down chips for mobile */
  .mobile-betting-panel-container .coin-chip {
    width: 60px !important;
    height: 60px !important;
  }

  .arrow-up,
  .arrow-down {
    position: absolute;
    width: 16px;
    height: 12px;
    right: 18px;
    cursor: pointer;
  }

  .arrow-up {
    top: 20%;
    transform: rotate(0deg);
  }

  .arrow-down {
    bottom: 35%;
    transform: rotate(180deg);
  }

  /* 4. Bet Controls Section (Stacked + Spin) */
  .mobile-betting-panel-container .bet-section {
    display: grid !important;
    grid-template-areas:
      "input spin"
      "action spin" !important;
    grid-template-columns: auto auto !important;
    gap: 0px !important;
    align-items: center !important;
  }

  /* Input (Arrows) - Top Left of Grid */
  .mobile-betting-panel-container .bet-wrapper {
    grid-area: input !important;
    width: 100px !important;
    height: 48px !important;
    /* Reduce height */
  }

  /* Scale content or manually position */
  .mobile-betting-panel-container .bet-button {
    width: 100% !important;
    height: 100% !important;
  }

  .mobile-betting-panel-container .bet-text1 {
    font-size: 12px !important;
  }

  /* Bet Action Button - Bottom Left of Grid */
  .mobile-betting-panel-container .button-bg-wrapper {
    grid-area: action !important;
    width: 100px !important;
    height: 45px !important;
    /* Reduce height */
  }

  .mobile-betting-panel-container .button-bg-side {
    width: 100% !important;
    height: 100% !important;
  }

  .mobile-betting-panel-container .bg-text-title {
    font-size: 10px !important;
  }

  .mobile-betting-panel-container .bg-text-value {
    font-size: 11px !important;
  }

  /* Spin Button - Right Span */
  .mobile-betting-panel-container .spin-wrapper {
    grid-area: spin !important;
    width: 80px !important;
    height: 80px !important;
    margin-left: -15px !important;
  }

  .mobile-betting-panel-container .spin-button {
    width: 100% !important;
    height: 100% !important;
  }

}

@media screen and (min-width: 1441px) {
  .game-board {
    width: 750px;
    height: 480px;
  }

  .betting-panel-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .betting-panel {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .betting-container {
    width: 100%;
    max-width: 750px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

/* How to Play Styles */
.how-to-play-scroll {
  width: 97%;
  max-height: 380px;
  /* Explicit max-height for scrolling */
  height: auto;
  overflow-y: auto;
  margin-top: 10px;
  padding-right: 10px;
  text-align: left;
}

/* Custom Scrollbar for How To Play */
.how-to-play-scroll::-webkit-scrollbar {
  width: 8px;
}

.how-to-play-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.how-to-play-scroll::-webkit-scrollbar-thumb {
  background: #00d2ff;
  border-radius: 4px;
}

.rules-section {
  margin-bottom: 20px;
}

.rules-section h3 {
  font-family: 'Blood Melt', serif;
  color: white;
  font-size: 20px;
  margin-bottom: 8px;
  text-shadow: 0 0 5px #00d2ff;
}

.rules-section p {
  font-family: 'Poppins', sans-serif;
  color: white;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 5px;
  font-weight: 600;
}

.rules-section ul {
  list-style-type: disc;
  padding-left: 20px;
  margin-bottom: 10px;
}

.rules-section li {
  font-family: 'Poppins', sans-serif;
  color: white;
  font-size: 14px;
  margin-bottom: 3px;
  font-weight: 600;
}

/* ============================================
   12. ERROR MODAL
   ============================================ */
.error-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  /* Higher than menu */
  display: none;
}

.error-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-container {
  position: relative;
  width: 90%;
  max-width: 550px;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.error-bg-image {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  object-fit: fill;
  z-index: 1;
}

.error-content {
  position: relative;
  z-index: 5;
  width: 85%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.error-title {
  font-family: 'Blood Melt', serif;
  font-size: 32px;
  color: #ff4444;
  /* Red for error */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  margin-bottom: 10px;
}

.error-message {
  font-family: 'Blood Melt', serif;
  color: white;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 20px;
}

.error-button-wrapper {
  position: relative;
  width: 120px;
  height: 50px;
  cursor: pointer;
  transition: transform 0.2s;
}

.error-button-wrapper:hover {
  transform: scale(1.05);
}

.ok-button {
  width: 100%;
  height: 100%;
}

/* Demo Video Styles */
.demo-video-container {
  position: relative;
  width: 95%;
  max-width: 600px;
  min-height: 530px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px;
}

.demo-video-content {
  position: relative;
  z-index: 5;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.demo-video-title {
  font-family: 'Blood Melt', serif;
  font-size: 45px;
  color: white;
  /* Icy blue text */
  text-shadow: 0 0 10px rgba(0, 210, 255, 0.7);
  margin-bottom: 20px;
}

.video-wrapper {
  width: 100%;
  max-width: 480px;
  /* Constrain video width */
  margin-bottom: 20px;
  border: 2px solid #00d2ff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
  background: #000;
}

.demo-player {
  width: 100%;
  height: auto;
  display: block;
}

.language-tabs {
  display: flex;
  width: 100%;
  max-width: 480px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.tab-button {
  flex: 1;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  font-family: 'Blood Melt', serif;
  font-size: 18px;
  color: #aaa;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s;
}

.tab-button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.tab-button.active {
  background: linear-gradient(180deg, #0cebeb 0%, #20e3b2 100%);
  /* Icy gradient based on image */
  background: rgba(40, 87, 173, 0.8);
  /* Or similar blue theme */
  background: linear-gradient(to right, #2b5876 0%, #4e4376 51%, #2b5876 100%);
  /* Placeholder gradient */
  background: rgba(255, 255, 255, 0.2);
  /* Fallback */

  /* Trying to match the image: Solid selected state vs clear unselected */
  background: linear-gradient(180deg, #3a7bd5 0%, #00d2ff 100%);
  background: rgba(58, 123, 213, 0.6);

  color: white;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
  font-weight: 700;
  border-bottom: 2px solid #00d2ff;
}

/* ============================================
   13. TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 3000;
  /* Highest priority */
  background: rgba(0, 40, 85, 0.9);
  border: 1px solid #00d2ff;
  border-radius: 8px;
  padding: 15px 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-container.show {
  transform: translateX(0);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-icon {
  font-size: 20px;
}

.toast-message {
  font-family: 'Blood Melt', serif;
  color: white;
  font-size: 16px;
  text-shadow: 0 0 5px rgba(0, 210, 255, 0.5);
  white-space: nowrap;
}

/* Error Toast */
.error-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 3000;
  background: rgba(40, 0, 0, 0.95);
  border: 2px solid #ff3333;
  border-radius: 8px;
  padding: 15px 20px;
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.4);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 320px;
}

.error-toast-container.show {
  transform: translateX(0);
}

.error-toast-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.error-toast-title {
  font-family: 'Blood Melt', serif;
  color: #ff3333;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(255, 51, 51, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.error-toast-message {
  font-family: 'Blood Melt', serif;
  color: #ffcccc;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Responsive adjustments for smaller devices */
@media (max-width: 480px) {
  .error-toast-container {
    right: 10px;
    top: 10px;
    max-width: calc(100vw - 40px);
    padding: 12px 16px;
  }

  .error-toast-title {
    font-size: 14px;
  }

  .error-toast-message {
    font-size: 12px;
  }
}

/* ============================================
   12. RESULT POPUP
   ============================================ */
.result-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-popup-container {
  position: relative;
  width: 400px;
  height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 20px;
}

/* Background Glow/Filter */
.result-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  height: 500px;
  background: #00C0F8;
  opacity: 0.1;
  filter: blur(52.8px);
  border-radius: 20px;
  z-index: 0;
}

.result-popup-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}

.result-content {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

/* Title */
.result-title {
  font-family: 'Blood Melt', serif;
  font-size: 36px;
  background: linear-gradient(180deg, #FFFFFF 23%, #0285F5 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0px 0px 6.8px rgba(0, 0, 0, 0.7));
  margin-top: 5px;
  margin-bottom: 5px;
  margin-left: 12px;
  letter-spacing: 1px;
}

/* Result Info Row (Round | Image | Time) */
.result-info-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  margin-bottom: 0px;
}

/* Lady Image Wrapper - Update */
.result-image-wrapper {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  margin-left: 12px;
}

.result-lady-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

/* Info Text (Round / Time) */
.result-info-text {
  font-family: 'Blood Melt', serif;
  font-size: 12px;
  font-weight: 400;
  display: flex;
  align-items: center;
  white-space: nowrap;

  /* Gradient & Shadow to match reference */
  background: linear-gradient(180deg, #FFFFFF 20%, #0285F5 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
  position: relative;
  top: -50px;
}

.result-info-text.left {
  text-align: right;
  left: 32px;
  z-index: 2;
}

.result-info-text.right {
  text-align: left;
  left: -8px;
  z-index: 2;
}

/* Text Container */
.result-text-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
}

/* Main Result Text (WIN/LOSS) */
.result-main-text {
  font-family: 'Blood Melt', serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 100%;
  text-align: center;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 5px 0;
}

.win-text {
  background-image: linear-gradient(180deg, #FFFFFF 39.58%, #0CC915 79.17%);
}

.loss-text {
  background-image: linear-gradient(180deg, #FFFFFF 16.89%, #FF3E3E 65.48%);
}


/* Sub Text / Timer */
.result-sub-text {
  font-family: 'Blood Melt', serif;
  font-size: 20px;
  text-transform: uppercase;
  margin-top: 10px;
  text-align: center;
  line-height: 1.2;
  background: linear-gradient(175.47deg, #FFFFFF 13.6%, #0285F5 86.97%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.result-timer {
  display: block;
  background: linear-gradient(180deg, #FFFFFF 20%, #0285F5 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  font-size: 20px;
  font-weight: bold;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

/* OK Button */
.result-ok-button {
  background: url('/Button-bg.png') no-repeat center center;
  background-size: contain;
  width: 160px;
  height: 60px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  margin-bottom: 30px;
  transition: transform 0.1s;
}

.result-ok-button:active {
  transform: scale(0.95);
}

.ok-text {
  font-family: 'Blood Melt', serif;
  font-size: 24px;
  color: white;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.6);
  margin-top: -4px;
}

/* ============================================
   13. WINNING SYMBOL ANIMATION
   ============================================ */
@keyframes symbolBlink {
  0% {
    filter: brightness(1) drop-shadow(0 0 0 transparent);
    transform: scale(1);
  }

  50% {
    filter: brightness(1.5) drop-shadow(0 0 10px gold);
    transform: scale(1.1);
  }

  100% {
    filter: brightness(1) drop-shadow(0 0 0 transparent);
    transform: scale(1);
  }
}

.symbol-blink {
  animation: symbolBlink 1s infinite ease-in-out;
  z-index: 10;
  position: relative;
}

/* ============================================
   13. FINAL OVERRIDES (Small Screens)
   ============================================ */
@media (max-width: 480px) {

  /* Ensure coin gap is reduced on very small screens, overriding the 768px rule */
  .mobile-betting-panel-container .upper-section,
  .mobile-betting-panel-container .lower-section {
    gap: 5px !important;
  }
}

/* Override for mobile spin wrapper */
@media (max-width: 380px) {
  .mobile-betting-panel-container .spin-wrapper {
    width: 60px !important;
    height: 60px !important;
  }

  /* Decrease Bets Toggle Size */
  .bets-toggle-container {
    padding: 2px !important;
    max-width: 240px !important;
    margin-bottom: 10px !important;
    border-radius: 10px !important;
  }

  .bets-toggle-btn {
    padding: 3px 0 !important;
    font-size: 13px !important;
    border-radius: 6px !important;
  }
}