/* =========================================================
     BLACKJACK PAGE LAYOUT — STAKE / RAINBET STYLE
========================================================= */

body {
  background: #0e1320;
  font-family: 'Roboto', Arial, sans-serif;
  margin: 0;
  padding: 0;
  color: #fff;
}

main {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 80px;
  padding-bottom: 80px;
}

/* =========================================================
     MAIN GAME CONTAINER
========================================================= */
.bj-value-box.tie {
    background: rgba(255, 215, 0, 0.25);
    border: 1px solid #ffd700;
    color: #ffd700;
}

.bj-card.tie {
    box-shadow: 0 0 10px 4px rgba(255, 215, 0, 0.6);
    border-radius: 6px;
}
/* ============================
   BET AMOUNT BOX
============================ */
.bj-bet-box {
    width: 100%;
    margin: 15px auto 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
    background: #0f1623;
    border: 1px solid #1e293b;
    border-radius: 12px;
}

.bj-bet-box label {
    color: #ffffff;
    font-size: 15px;
    opacity: 0.9;
}

.bj-bet-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

#bj-bet-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    background: #131b26;
    color: #fff;
    border: 1px solid #1e293b;
    border-radius: 8px;
}

.bj-bet-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bj-bet-controls button {
    background: #192233;
    border: 1px solid #1e293b;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.15s ease;
}

.bj-bet-controls button:hover {
    background: #1e293b;
}

.blackjack-wrapper {
  width: 100%;
  max-width: 1450px;
  background: #0f1424;
  border-radius: 10px;
  position: relative;
  overflow: visible;
  padding-bottom: 200px; /* SAFE SPACE FOR BUTTONS */
  border: 1px solid rgba(255,255,255,0.04);
}

/* =========================================================
     TOP GAME BAR
========================================================= */

.blackjack-topbar {
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  background: #0d1220;
}

.blackjack-topbar h2 {
  font-size: 17px;
  margin-left: 10px;
  font-weight: 500;
}

.blackjack-topbar .right {
  margin-left: auto;
  font-size: 14px;
  opacity: 0.8;
}

/* =========================================================
     THE OVAL BLACKJACK TABLE
========================================================= */

.blackjack-table {
  width: 820px;
  height: 380px;
  border-radius: 190px;
  border: 2px solid rgba(255,255,255,0.06);
  margin: 50px auto 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 80px !important; /* 🔥 KEY FIX ADDED */
}

.blackjack-ribbons {
  text-align: center;
  margin-top: 60px;
}

.blackjack-ribbons .ribbon {
  background: rgba(255,255,255,0.05);
  padding: 7px 26px;
  font-size: 11px;
  border-radius: 4px;
  margin: 3px 0;
  letter-spacing: 0.5px;
}

/* =========================================================
     DEALER + PLAYER ZONES
========================================================= */

.bj-dealer-zone {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
  position: relative;
  z-index: 10;
}

/* =========================================================
     VALUE BOXES — CLEAN & CENTERED
========================================================= */

.bj-value-box {
  background: rgba(255,255,255,0.09);
  padding: 6px 14px;
  color: #fff;
  font-size: 14px;
  border-radius: 6px;
  width: fit-content;
  margin: 10px auto;
  text-align: center;
  font-weight: 600;
  backdrop-filter: blur(4px);
  box-shadow: 0 0 6px rgba(0,0,0,0.35);
  opacity: 0;
  transform: translateY(-6px);
  animation: valueFadeIn .35s ease forwards;
  position: relative;
  z-index: 30;
}

@keyframes valueFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.player-value {
  margin-top: 12px;
}

.dealer-value {
  margin-top: 5px;
  margin-bottom: -5px;
}

/* =========================================================
     PLAYER HAND GROUPS
========================================================= */

.bj-player-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  margin-top: 25px;
  margin-bottom: 70px !important; /* SAFE GAP */
}

/* each hand column */
.bj-hand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* KEEP SPLIT CARDS IN SAME ROW */
.cards-row {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

/* =========================================================
     CARD APPEARANCE
========================================================= */

.bj-card {
  width: 62px;
  height: 90px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 3px 6px rgba(0,0,0,0.45);
  opacity: 0;
  transform: translateY(-30px);
  animation: cardSlideIn .35s ease forwards;
}

@keyframes cardSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bj-card.flipped {
  animation: flipCard 0.45s ease forwards;
}

@keyframes flipCard {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(90deg); opacity: 0; }
  100% { transform: rotateY(0deg); opacity: 1; }
}

/* =========================================================
     LOGIN BUTTON
========================================================= */

.blackjack-login-btn {
  display: block;
  width: 240px;
  padding: 10px;
  background: #ff002b;
  color: #fff;
  margin: 40px auto 0;
  text-align: center;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
}

.blackjack-login-btn:hover {
  background: #ff002c  ;
}

/* =========================================================
     CONTROLS AREA
========================================================= */

.blackjack-controls {
  width: 100%;
  height: 150px;
  background: rgba(4,8,15,0.55);
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-bottom: 20px;
}

.action-btn {
  padding: 14px 30px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  transition: .2s;
}

.action-btn:hover {
  background: rgba(255,255,255,0.12);
}

/* =========================================================
     CHIP ROW
========================================================= */

.chips-row {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.chip {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: .15s;
}

.chip:hover {
  transform: scale(1.1);
}
/* ============================================
   WIN / LOSE HIGHLIGHT COLORS
============================================ */

.win {
  box-shadow: 0 0 14px #2ecc71 !important;
  border: 1px solid #2ecc71 !important;
}

.lose {
  box-shadow: 0 0 14px #e74c3c !important;
  border: 1px solid #e74c3c !important;
}

/* Apply to cards */
.bj-card.win {
  filter: drop-shadow(0 0 8px #2ecc71);
}

.bj-card.lose {
  filter: drop-shadow(0 0 8px #e74c3c);
}

/* Value boxes (dealer & player) */
.bj-value-box.win {
  background: rgba(46, 204, 113, 0.25) !important;
}

.bj-value-box.lose {
  background: rgba(231, 76, 60, 0.25) !important;
}

/* =========================================================
     MOBILE FIXES
========================================================= */

@media (max-width: 850px) {

  .blackjack-table {
    width: 92%;
    height: 260px;
    border-radius: 130px;
    margin-top: 30px;
    margin-bottom: 120px !important; /* 🔥 MOBILE FIX */
  }

  .blackjack-controls {
    height: 160px;
  }

  .action-buttons {
    gap: 25px;
  }

  .bj-card {
    width: 48px;
    height: 70px;
  }

  .bj-player-wrapper {
    gap: 20px;
    margin-bottom: 90px !important;
  }
}

@media (max-width: 480px) {

  .bj-card {
    width: 42px;
    height: 60px;
  }

  .action-buttons {
    gap: 12px;
  }

  .bj-player-wrapper {
    gap: 10px;
    margin-bottom: 110px !important;
  }

  .blackjack-table {
    margin-bottom: 100px !important; /* EXTRA SAFE SPACE */
  }
}
