/* ==========================
      CRASH GAME LAYOUT
========================== */


/* ==========================
      LEFT PANEL — BETTING UI
========================== */

/* ==========================
      CRASH GAME LAYOUT
========================== */

.crash-container {
  width: 100%;
  max-width: 1200px;
  margin: 90px auto 30px;
  display: flex;
  gap: 20px;
  padding: 0 10px;
}

/* ==========================
      LEFT PANEL — BETTING UI
========================== */

.crash-left {
  flex: 1;
  background: #0f1623;
  border: 1px solid #1e293b;
  padding: 15px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ✅ CASHOUT GOLD BUTTON */
#betBtn.cashout {
  background: #FFD700 !important;
  border: 2px solid #fff !important;
  color: #000 !important;
  font-weight: 900 !important;
}

/* ✅ DISABLED BUTTON STATE */
#betBtn.disabled,
#betBtn:disabled {
  background: #555 !important;
  border: 1px solid #333 !important;
  color: #999 !important;
  font-weight: 700 !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

/* GRAPH CANVAS */
.crash-graph {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  opacity: 0.9;
}

/* ==========================
      COUNTDOWN BAR
========================== */

.crash-countdown {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 20px;
  background: #0b111a;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #222;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.25);
}

.countdown-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff1f1f, #550000);
  transition: width 0.1s linear;
  animation: countdownGlow 1.5s ease-in-out infinite alternate;
}

@keyframes countdownGlow {
  from { filter: drop-shadow(0 0 6px rgba(255,0,0,0.6)); }
  to   { filter: drop-shadow(0 0 14px rgba(255,0,0,1)); }
}

.countdown-text {
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  pointer-events: none;
  text-shadow: 0 0 5px rgba(255,0,0,0.8), 0 0 8px rgba(255,0,0,0.3);
}

/* ==========================
      SHAKE FX
========================== */

@keyframes shake {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(-1px, -0.5px) rotate(-0.2deg); }
  50%  { transform: translate(1px, 0.5px) rotate(0.2deg); }
  75%  { transform: translate(-1px, 0.5px) rotate(-0.2deg); }
  100% { transform: translate(1px, -0.5px) rotate(0.2deg); }
}

.crash-scene.shake {
  animation: shake 0.12s infinite;
  transform-origin: center;
}

/* ==========================
      TABS
========================== */

.crash-tabs {
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #1e293b;
}

.crash-tabs .tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  background: #1e2633;
  color: #aaa;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

.crash-tabs .tab.active {
  background: #ff002b;
  color: #000;
}

/* ==========================
      BETTING UI
========================== */

.bet-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bet-section label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.bet-row {
  display: flex;
  gap: 10px;
}

.bet-row input {
  flex: 1;
  background: #1e2633;
  border: 1px solid #2a3343;
  border-radius: 6px;
  padding: 6px 8px;
  height: 38px;
  color: #fff;
  font-size: 15px;
}

.quick-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-btns button {
  background: #2a3343;
  border: none;
  color: #fff;
  border-radius: 6px;
  padding: 6px 8px;
  height: 38px;
  cursor: pointer;
  font-size: 13px;
}

.quick-values {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.quick-values button {
  background: #1e2633;
  border: 1px solid #2a3343;
  border-radius: 6px;
  padding: 6px 0;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

.bet-button {
  width: 100%;
  background: #ff002b;
  border: none;
  border-radius: 10px;
  color: #000;
  font-size: 16px;
  font-weight: 700;
  padding: 12px;
  cursor: pointer;
}

/* ...rest unchanged... */


.demo-note {
  font-size: 12px;
  color: #888;
  text-align: center;
  margin-top: -10px;
}

/* ==========================
      RIGHT PANEL — SCENE
========================== */

.crash-right {
  flex: 2;
  background: #0f1623;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 15px;
  position: relative;
}

/* SCENE AREA */
.crash-scene {
  width: 100%;
  position: relative;
  overflow: hidden;
  height: 420px;
  border-radius: 12px;
}

/* BACKGROUND */
.crash-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* ROCKET */
.crash-rocket {
  width: 120px;
  position: absolute;
  left: 50%;
  bottom: 140px;
  transform: translateX(-50%);
  image-rendering: high-quality;
  z-index: 3;
  margin-bottom: -5%;
}

/* SMOKE */
.crash-smoke {
  position: absolute;
  bottom: 75px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: auto;
  pointer-events: none;
  z-index: 3;
}

/* MULTIPLIER TEXT */
.crash-multiplier {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 32px;
  font-weight: 700;
  color: #00d57f;
  text-shadow: 0 0 6px #000;
  z-index: 10;
}

/* ==========================
      FOOT STATS
========================== */

.bottom-stats {
  margin-top: 10px;
  display: flex;
  gap: 12px;
}

.payout-box,
.win-box {
  flex: 1;
  background: #1e2633;
  border: 1px solid #2a3343;
  padding: 10px;
  border-radius: 8px;
}

.stat-label {
  color: #aaa;
  font-size: 12px;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.stat-row input {
  flex: 1;
  background: #0f1623;
  border: 1px solid #2a3343;
  border-radius: 6px;
  padding: 8px;
  color: #fff;
}

.stat-x,
.stat-percent {
  font-size: 16px;
  color: #ddd;
}

/* ==========================
      MOBILE RESPONSIVE
========================== */

@media (max-width: 768px) {

  .crash-container {
    flex-direction: column;
    gap: 18px;
    padding: 0 6px;
    margin-top: 95px;
  }

  .crash-right {
    order: 1;
    width: 100%;
  }
  
  .crash-rocket {
    margin-bottom: -8%;
  }

  .crash-left {
    order: 2;
    width: 100%;
  }

  .crash-scene {
    height: 300px;
  }

  .crash-rocket {
    width: 90px;
    bottom: 110px;
  }

  .crash-smoke {
    width: 45px;
    bottom: 65px;
  }

  .crash-multiplier {
    font-size: 26px;
  }

  .bottom-stats {
    flex-direction: column;
  }

  .payout-box,
  .win-box {
    width: 100%;
  }

  .quick-values {
    grid-template-columns: repeat(4, 1fr);
  }

  .bet-row {
    flex-direction: row;
  }
}
