/* General Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', sans-serif;
  background-image: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url('ui/ChatGPT%20Image%20Jul%206,%202026,%2002_31_27%20PM.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Premium Desktop Background Decoration */
.desktop-bg {
  display: none;
}



/* Main Mobile Viewport Frame */
.game-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  height: 100%;
  max-height: 960px;
  background-image: url('ui/game%20ui.png');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  border: none;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Header & Multipliers */
.game-header {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 65, 30, 0.92) 0%, rgba(8, 38, 16, 0.95) 100%);
  border-bottom: 2px solid #b8860b;
  padding: 10px 16px 8px;
}

.clock-overlay {
  position: absolute;
  top: 6px;
  right: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: #ffffff;
  opacity: 0.85;
  letter-spacing: 0.5px;
  z-index: 20;
}

.header-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.game-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 1.5px;
  background: linear-gradient(to bottom, #ffe082, #ffb300);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.ways-indicator {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 10px;
  color: #ffb300;
  border: 1px solid #ffb300;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

/* Multiplier Container */
.multiplier-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid #b8860b;
  border-radius: 8px;
  padding: 3px;
}

.multiplier-item {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 18px;
  color: #887;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 6px;
}

.multiplier-item.active {
  color: #fff;
  background: linear-gradient(180deg, #4caf50 0%, #2e7d32 100%);
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.6), inset 0 0 5px rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
  animation: pulse-active 1.5s infinite alternate;
}

@keyframes pulse-active {
  0% { filter: drop-shadow(0 0 2px rgba(76, 175, 80, 0.8)); }
  100% { filter: drop-shadow(0 0 8px rgba(76, 175, 80, 1)) brightness(1.15); }
}


/* Reel Area Viewport */
.reel-viewport {
  position: relative;
  flex-grow: 1;
  background-image: url('ui/reels-tiles-bg.png');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: none;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px;
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Buy Free Spins Button */
.buy-fs-btn {
  position: absolute;
  top: 15px;
  left: 10px;
  background: linear-gradient(180deg, #ffeb3b 0%, #f57f17 100%);
  border: 2px solid #ffffff;
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  box-shadow: 
    0 4px 0 #b75300,
    0 6px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.1s ease;
  z-index: 15;
}

.buy-fs-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.buy-fs-btn:active {
  transform: translateY(3px);
  box-shadow: 
    0 1px 0 #b75300,
    0 3px 6px rgba(0, 0, 0, 0.4);
}

.buy-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 8px;
  color: #5d2503;
  letter-spacing: 0.5px;
}

.buy-price {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 13px;
  color: #5d2503;
  margin-top: 1px;
}

/* Free Spins Active Badge */
.fs-badge {
  position: absolute;
  top: 15px;
  right: 10px;
  background: linear-gradient(180deg, #d32f2f 0%, #b71c1c 100%);
  border: 2px solid #ffb300;
  border-radius: 8px;
  padding: 6px 12px;
  display: none;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 0 15px rgba(211, 47, 47, 0.6);
  animation: fs-pulse-badge 1s infinite alternate;
  z-index: 15;
}

@keyframes fs-pulse-badge {
  0% { box-shadow: 0 0 5px rgba(211, 47, 47, 0.5); }
  100% { box-shadow: 0 0 15px rgba(211, 47, 47, 0.9), 0 0 2px #ffb300; }
}

.fs-badge-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 8px;
  color: #ffb300;
  letter-spacing: 1px;
}

.fs-badge-count {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 15px;
  color: #fff;
}

/* Marquee scrolling banner */
.marquee-banner {
  height: 28px;
  background-color: #520b04; /* Solid dark red to cover the background image's static text */
  border-top: 1.5px solid #ffb300;
  border-bottom: 1.5px solid #ffb300;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.marquee-content {
  white-space: nowrap;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 11px;
  color: #ffeb3b;
  animation: marquee 20s linear infinite;
  padding-left: 100%;
}

@keyframes marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* Dashboard metrics */
.dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(12, 55, 25, 0.92) 0%, rgba(5, 30, 12, 0.95) 100%);
  border-top: 2px solid #b8860b;
  border-bottom: 2px solid #b8860b;
}

.metric-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(184, 134, 11, 0.5);
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.metric-box.highlight {
  border-color: #ffb300;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3), 0 0 8px rgba(255, 179, 0, 0.2);
}

.metric-box.win-pulse {
  animation: win-box-glow 0.5s ease 5 alternate;
  background: rgba(255, 179, 0, 0.1);
}

@keyframes win-box-glow {
  0% { border-color: #ffb300; box-shadow: 0 0 2px #ffb300; }
  100% { border-color: #ffe082; box-shadow: 0 0 10px #ffb300; }
}

.metric-label {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 9px;
  color: #7ebf7e;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.metric-val {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
}

.metric-box.highlight .metric-val {
  color: #ffd54f;
}

/* Controls Panel */
.controls-panel {
  background: linear-gradient(180deg, rgba(60, 28, 18, 0.92) 0%, rgba(26, 11, 7, 0.95) 100%);
  padding: 12px 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.control-btn {
  background: linear-gradient(180deg, #ffeb3b 0%, #f57f17 100%);
  border: 2px solid #ffffff;
  color: #5d2503;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 0 #b75300,
    0 6px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.1s ease;
}

.control-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.control-btn:active {
  transform: translateY(3px);
  box-shadow: 
    0 1px 0 #b75300,
    0 3px 6px rgba(0, 0, 0, 0.4);
}

.square-btn {
  width: 52px;
  height: 52px;
  border-radius: 12px;
}

.square-btn.active {
  background: linear-gradient(180deg, #4caf50 0%, #1b5e20 100%) !important;
  border-color: #fff !important;
  box-shadow: 
    0 4px 0 #0f4010,
    0 6px 12px rgba(0, 0, 0, 0.4) !important;
}

.round-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.math-symbol {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: #5d2503;
  line-height: 1;
}

.btn-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 8px;
  margin-top: 4px;
  color: #5d2503;
  letter-spacing: 0.5px;
}

.square-btn.active .btn-label {
  color: #fff !important;
}

.menu-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

/* Icons within buttons */
.icon-turbo {
  width: 18px;
  height: 18px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%235d2503"><path d="M11 21h-1l1-7H5.5L13 3h1l-1 7h5.5L11 21z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.square-btn.active .icon-turbo {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffffff"><path d="M11 21h-1l1-7H5.5L13 3h1l-1 7h5.5L11 21z"/></svg>');
}

.icon-auto {
  width: 18px;
  height: 18px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%235d2503"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.square-btn.active .icon-auto {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffffff"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></svg>');
}

.icon-menu {
  width: 20px;
  height: 20px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%235d2503"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Central Spin Button */
.spin-btn-outer {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #e0e0e0 80%);
  padding: 3px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
}

.spin-btn-outer:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(255, 179, 0, 0.3);
}

.spin-btn-outer:active {
  transform: scale(0.97);
}

.spin-btn {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffeb3b 0%, #f57f17 100%);
  border: 3.5px solid #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 
    0 5px 0 #b75300,
    inset 0 2px 4px rgba(255, 255, 255, 0.6);
  transition: all 0.1s ease;
}

.spin-btn:active {
  transform: translateY(3px);
  box-shadow: 
    0 2px 0 #b75300,
    inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.spin-arrow {
  width: 32px;
  height: 32px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%235d2503"><path d="M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L5.7 17.74C4.62 16.07 4 14.12 4 12c0-4.42 3.58-8 8-8zm0 14c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26l-1.46 1.46c1.08 1.67 1.7 3.62 1.7 5.8 0 4.42-3.58 8-8 8v-3l-4 4 4 4v-3z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.4s ease;
}

.spin-btn.spinning .spin-arrow {
  animation: rotate-spin 1s linear infinite;
}

@keyframes rotate-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.auto-count-display {
  position: absolute;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 16px;
  color: #5d2503;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* Modals Overlay and Content Styling */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(135deg, #3d1c12 0%, #200d07 100%);
  border: 3px solid #ffb300;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
  padding: 20px;
  position: relative;
  max-height: 85%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: #ffb300;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 18px;
  text-align: center;
  color: #ffb300;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

/* Tab Bar inside Menu Modal */
.modal-tabs {
  display: flex;
  border-bottom: 2px solid #5c3b2e;
  margin-bottom: 15px;
}

.tab-btn {
  flex-grow: 1;
  background: none;
  border: none;
  padding: 8px;
  color: #8d756d;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  color: #ffb300;
  border-bottom: 3px solid #ffb300;
  margin-bottom: -2.5px;
}

.tab-content {
  display: none;
  flex-grow: 1;
  overflow-y: auto;
}

.tab-content.active {
  display: block;
}

/* Paytable view list */
.paytable-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.paytable-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #4a2d24;
}

.pay-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.pay-info {
  flex-grow: 1;
}

.pay-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 12px;
  color: #ffb300;
}

.pay-desc {
  font-size: 10px;
  color: #bbb;
  margin-top: 2px;
  line-height: 1.3;
}

.paytable-separator {
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 11px;
  color: #ffe082;
  margin: 10px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Paytable Grid Card system */
.paytable-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.symbol-pay-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #4a2d24;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.symbol-container-info {
  width: 32px;
  height: 40px;
  background: #eee;
  border-radius: 4px;
  border-bottom: 4px solid #7d8;
  border-right: 2px solid #bbb;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tile-face-dummy {
  font-size: 20px;
  font-weight: bold;
}

.green-dragon { color: #084; }
.red-dragon { color: #b32; }
.white-dragon { color: #339; }
.wind-east { color: #339; }
.dot-9 { color: #339; }
.bamboo-9 { color: #084; }
.character-8 { color: #b32; }
.bamboo-5 { color: #084; }
.dot-5 { color: #339; }
.dot-2 { color: #339; }

.payout-rates {
  font-size: 10px;
  color: #aaa;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.payout-rates span {
  color: #fff;
  font-weight: 700;
}

.rules-text {
  font-size: 11px;
  line-height: 1.5;
  color: #ddd;
}

.rules-text h3 {
  font-family: 'Outfit', sans-serif;
  color: #ffb300;
  font-size: 13px;
  margin: 12px 0 4px;
}

.rules-text ul {
  padding-left: 15px;
  margin-top: 4px;
}

/* Modals Footers and General Buttons */
.modal-footer {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.primary-btn {
  flex-grow: 1;
  background: linear-gradient(180deg, #ffb300 0%, #ff8f00 100%);
  border: 1.5px solid #fff;
  border-radius: 8px;
  color: #3e180e;
  padding: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.primary-btn:active {
  transform: translateY(1px);
}

/* Buy Confirmation specific dialog */
.confirm-box {
  text-align: center;
}

.confirm-box p {
  font-size: 13px;
  color: #ddd;
  margin: 12px 0 20px;
  line-height: 1.4;
}

.confirm-box p strong {
  color: #ffd54f;
  font-size: 16px;
}

.confirm-buttons {
  display: flex;
  gap: 12px;
}

.primary-btn.cancel {
  background: linear-gradient(180deg, #5c3b2e 0%, #3d1c12 100%);
  color: #fff;
  border-color: #8d756d;
}

/* Autoplay selection box */
.auto-box {
  max-width: 320px;
}

.auto-buttons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 15px 0;
}

.auto-opt-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid #5c3b2e;
  border-radius: 8px;
  padding: 10px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auto-opt-btn:hover {
  border-color: #ffb300;
  background: rgba(255, 179, 0, 0.1);
}

/* Splashes: Welcome and Free Spins */
.splash-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.splash-overlay.active {
  display: flex;
}

.splash-content {
  text-align: center;
  max-width: 360px;
  background: radial-gradient(circle, #3e180e 0%, #1a0b07 100%);
  border: 3px solid #ffb300;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 0 25px rgba(255, 179, 0, 0.4);
  animation: splash-zoom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes splash-zoom {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.splash-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 26px;
  color: #ffb300;
  letter-spacing: 1.5px;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  margin-bottom: 8px;
}

.splash-dragon-art {
  width: 120px;
  height: 120px;
  margin: 15px auto;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%23ffb300" stroke-width="4" stroke-dasharray="8 4"/><path d="M50 20 A30 30 0 0 1 80 50 A30 30 0 0 1 50 80 A30 30 0 0 1 20 50 Z" stroke="%23ffb300" stroke-width="2" fill="none"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  animation: fs-pulse-dragon 3s linear infinite;
}

@keyframes fs-pulse-dragon {
  0% { transform: rotate(0deg) scale(0.95); opacity: 0.8; }
  50% { transform: rotate(180deg) scale(1.05); opacity: 1; }
  100% { transform: rotate(360deg) scale(0.95); opacity: 0.8; }
}

.splash-subtitle {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.splash-btn {
  background: linear-gradient(180deg, #ffc107 0%, #ff8f00 100%);
  border: 2px solid #fff;
  border-radius: 20px;
  padding: 10px 30px;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 14px;
  color: #3e180e;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease;
  letter-spacing: 1px;
}

.splash-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(255, 179, 0, 0.5);
}

.splash-btn:active {
  transform: scale(0.95);
}

/* Big Win Splash Overlay styling */
.big-win-overlay {
  background: rgba(0, 0, 0, 0.9);
  z-index: 110;
}

.big-win-content {
  text-align: center;
  animation: big-win-pulse-scale 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes big-win-pulse-scale {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.big-win-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 48px;
  letter-spacing: 2px;
  background: linear-gradient(to bottom, #fff9c4, #fbc02d, #f57f17);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
  margin-bottom: 10px;
  animation: text-glow 1.5s infinite alternate;
}

@keyframes text-glow {
  0% { filter: drop-shadow(0 0 5px rgba(255, 179, 0, 0.6)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8)); }
  100% { filter: drop-shadow(0 0 20px rgba(255, 179, 0, 1)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8)) brightness(1.2); }
}

.big-win-counter {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 40px;
  color: #fff;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
  margin-bottom: 8px;
}

.big-win-mult {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: #ffb300;
  margin-bottom: 25px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.big-win-btn {
  border-radius: 25px;
  padding: 12px 40px;
}

/* Full Page Splash Screen Main Menu */
.welcome-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('ui/ChatGPT%20Image%20Jul%206,%202026,%2002_31_27%20PM.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.welcome-screen.active {
  display: flex;
}

.welcome-play-btn {
  position: absolute;
  bottom: 35%; /* Aligns precisely over the Play button visual area */
  background: linear-gradient(180deg, #ffeb3b 0%, #f57f17 100%);
  border: 4px solid #fff;
  border-radius: 40px;
  color: #5d2503;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 32px;
  padding: 12px 64px;
  cursor: pointer;
  box-shadow: 
    0 8px 0 #b75300,
    0 15px 25px rgba(0, 0, 0, 0.4),
    inset 0 4px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.1s ease;
  animation: play-bounce 1.5s infinite ease-in-out;
  letter-spacing: 2px;
}

@keyframes play-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.03); }
}

.welcome-play-btn:active {
  transform: translateY(4px) scale(0.98);
  box-shadow: 
    0 4px 0 #b75300,
    0 8px 15px rgba(0, 0, 0, 0.4),
    inset 0 4px 0 rgba(255, 255, 255, 0.5);
}

/* Particle system containers (coins fallback) */
.coins-explosion {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

/* Responsive adjustment for mobiles */
@media (max-width: 480px) {
  .game-wrapper {
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    max-width: 100%;
    max-height: 100%;
    border: none;
    border-radius: 0;
  }
}
@media (min-width: 481px) {
  /* Center on desktop and display frame borders */
  .game-wrapper {
    border-radius: 16px;
    height: 95vh;
  }
}

/* Free Spins Mode Red/Gold styling adjustments */
.game-wrapper.in-free-spins {
  box-shadow: 0 10px 30px rgba(211, 47, 47, 0.4), inset 0 0 80px rgba(180, 0, 0, 0.35);
}

.game-wrapper.in-free-spins .game-header {
  background: linear-gradient(180deg, rgba(140, 28, 17, 0.85) 0%, rgba(82, 11, 4, 0.9) 100%);
}

.game-wrapper.in-free-spins .multiplier-container {
  background: rgba(127, 0, 0, 0.3);
  border: 1.5px solid #ff5252;
}

.game-wrapper.in-free-spins .dashboard {
  background: linear-gradient(180deg, rgba(66, 15, 10, 0.92) 0%, rgba(30, 5, 3, 0.95) 100%);
  border-color: #d32f2f;
}

.game-wrapper.in-free-spins .controls-panel {
  background: linear-gradient(180deg, rgba(82, 13, 4, 0.92) 0%, rgba(30, 5, 3, 0.95) 100%);
}

.game-wrapper.in-free-spins .marquee-banner {
  background-color: #7f0000;
  border-color: #d32f2f;
}

.game-wrapper.in-free-spins .control-btn {
  background: linear-gradient(180deg, #ff5252 0%, #d32f2f 100%);
  border-color: #fff;
  color: #fff;
  box-shadow: 
    0 4px 0 #7f0000,
    0 6px 12px rgba(0, 0, 0, 0.4);
}

.game-wrapper.in-free-spins .control-btn .btn-label {
  color: #fff !important;
}

.game-wrapper.in-free-spins .control-btn .math-symbol {
  color: #fff;
}

.game-wrapper.in-free-spins .control-btn.active {
  background: linear-gradient(180deg, #4caf50 0%, #1b5e20 100%) !important;
  border-color: #fff !important;
  box-shadow: 
    0 4px 0 #0f4010,
    0 6px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Red / white icon fills inside free spins */
.game-wrapper.in-free-spins .icon-turbo {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffffff"><path d="M11 21h-1l1-7H5.5L13 3h1l-1 7h5.5L11 21z"/></svg>');
}

.game-wrapper.in-free-spins .icon-auto {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffffff"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></svg>');
}

.game-wrapper.in-free-spins .icon-menu {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffffff"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>');
}

.game-wrapper.in-free-spins .spin-btn-outer {
  background: radial-gradient(circle, #ffffff 0%, #ff8a80 80%);
}

.game-wrapper.in-free-spins .spin-btn {
  background: linear-gradient(180deg, #ff5252 0%, #d32f2f 100%);
  border-color: #fff;
  box-shadow: 
    0 5px 0 #7f0000,
    inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.game-wrapper.in-free-spins .spin-btn:active {
  transform: translateY(3px);
  box-shadow: 
    0 2px 0 #7f0000,
    inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.game-wrapper.in-free-spins .auto-count-display {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* ===== Welcome / Splash Screen ===== */
.welcome-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-image: url('ui/ChatGPT%20Image%20Jul%206,%202026,%2002_31_27%20PM.png');
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.welcome-screen.active {
  opacity: 1;
  pointer-events: all;
}

.welcome-play-btn {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 28px;
  letter-spacing: 3px;
  color: #5d2503;
  background: linear-gradient(180deg, #ffeb3b 0%, #f57f17 100%);
  border: 3px solid #ffffff;
  border-radius: 20px;
  padding: 18px 70px;
  cursor: pointer;
  box-shadow:
    0 6px 0 #b75300,
    0 8px 20px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.6);
  transition: all 0.15s ease;
  animation: play-btn-pulse 2s infinite alternate;
}

.welcome-play-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.welcome-play-btn:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 #b75300,
    0 4px 10px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

@keyframes play-btn-pulse {
  0% { filter: drop-shadow(0 0 6px rgba(255, 235, 59, 0.5)); }
  100% { filter: drop-shadow(0 0 18px rgba(255, 235, 59, 0.9)) brightness(1.05); }
}
