
*{box-sizing:border-box;margin:0;padding:0}
body{
  margin:0;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:#1b0f10;
  color:#fdfdfd;
}
.page-bg{
  min-height:100vh;
  background:radial-gradient(circle at top,#3b2317 0,#1b0f10 55%,#090305 100%);
  padding-bottom:80px;
}

/* Header / balance */
.header{
  padding:16px 18px 10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.header-title{
  font-size:20px;
  font-weight:700;
  color:#ffd666;
}
.clear-history-btn {
    width: 95%;
    margin: 10px auto;
    display: block;
    padding: 12px;
    border-radius: 12px;
    background: #a30000;
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}
.clear-history-btn:hover {
    background: #cc0000;
}
.empty-history {
    padding: 20px;
    text-align: center;
    color: #ffcc66;
    font-size: 16px;
}

.badge-balance{
  background:rgba(0,0,0,.6);
  border-radius:999px;
  padding:6px 12px;
  font-size:13px;
}
.badge-balance span{font-weight:700}

/* Common card */
.card{
  background:#2b1715;
  border-radius:22px;
  padding:18px 16px;
  margin:10px 14px;
  box-shadow:0 16px 32px rgba(0,0,0,.7);
}

/* Login */
.center-card{
  max-width:420px;
  margin:60px auto;
  background:#ffffff;
  border-radius:28px;
  padding:26px 20px 24px;
  text-align:center;
  box-shadow:0 20px 40px rgba(0,0,0,.65);
}
.logo-text{
  font-size:22px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#f4b41a;
  margin-bottom:8px;
}
.subtitle{
  color:#777;
  font-size:14px;
  margin-bottom:16px;
}
input{
  width:100%;
  padding:12px 14px;
  margin:6px 0 8px;
  border-radius:14px;
  border:1px solid #d4d4d4;
  font-size:14px;
  outline:none;
}
input:focus{
  border-color:#f4b41a;
  box-shadow:0 0 0 2px rgba(244,180,26,.25);
}
input.shake{animation:shake .25s}
.btn-primary{
  width:100%;
  border:none;
  border-radius:999px;
  padding:12px 0;
  margin-top:10px;
  background:linear-gradient(135deg,#f9d65c,#f4b41a);
  color:#2a150d;
  font-weight:700;
  font-size:15px;
  cursor:pointer;
  box-shadow:0 12px 24px rgba(0,0,0,.5);
}
.error{
  color:#e53935;
  font-size:13px;
  min-height:18px;
  margin-top:6px;
}

/* Wallet card */
.wallet-card{
  background:linear-gradient(165deg,#f4b41a,#e39910);
  color:#2b1811;
  border-radius:24px;
  padding:18px 18px 14px;
  margin:4px 14px 16px;
  box-shadow:0 18px 38px rgba(0,0,0,.8);
}
.wallet-amount{
  font-size:30px;
  font-weight:800;
}
.wallet-label{
  font-size:13px;
  opacity:.85;
}

/* Game list on home */
.games-grid{
  margin:0 14px 10px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.game-card{
  background:#fdfdfd;
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 16px 30px rgba(0,0,0,.75);
  color:#1f1510;
}
.game-thumb{
  position:relative;
  height:160px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:40px;
}
.game-play-btn{
  position:absolute;
  left:10px;
  top:10px;
  padding:6px 14px;
  border-radius:999px;
  background:#f4b41a;
  color:#2b1811;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(0,0,0,.6);
}
.game-body{padding:10px 12px 14px;}
.game-title{font-weight:600;font-size:15px;margin-bottom:4px;}
.odds-chip{
  display:inline-block;
  padding:3px 10px;
  border-radius:999px;
  background:#f4b41a;
  color:#2b1811;
  font-size:11px;
  font-weight:600;
}

/* Wallet actions */
.action-row{
  display:flex;
  gap:10px;
  margin:8px 14px 4px;
}
.action-tile{
  flex:1;
  border-radius:18px;
  padding:12px 8px;
  text-align:center;
  font-size:13px;
  cursor:pointer;
  box-shadow:0 14px 30px rgba(0,0,0,.75);
}
.action-tile span{display:block;}
.action-tile.deposit{background:#2e7d32;}
.action-tile.withdraw{background:#ef6c00;}

/* Promotions / history cards */
.promo-card{
  background:#2d1816;
  border-radius:18px;
  padding:12px 14px;
  margin:10px 14px;
  box-shadow:0 12px 26px rgba(0,0,0,.75);
  border:1px solid rgba(244,180,26,.4);
}
.promo-title{font-weight:600;font-size:15px;margin-bottom:4px;}
.promo-sub{font-size:13px;opacity:.92;}

/* Empty state */
.empty-state{
  margin:16px 14px;
  background:#3a221a;
  border-radius:20px;
  padding:28px 14px 24px;
  text-align:center;
  box-shadow:0 14px 30px rgba(0,0,0,.85);
}
.empty-icon{font-size:30px;margin-bottom:10px;}

/* Account */
.profile-card{
  background:linear-gradient(145deg,#f4b41a,#e08e12);
  padding:18px 18px 18px;
  border-radius:0 0 26px 26px;
  color:#2b1810;
}
.profile-row{display:flex;align-items:center;gap:12px;}
.profile-avatar{
  width:44px;height:44px;border-radius:50%;
  background:#fff6d0;
  display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:20px;
}
.profile-name{font-size:17px;font-weight:600;}
.profile-email{font-size:13px;}
.account-card{
  margin:12px 12px 16px;
  background:#fdfdfd;
  color:#201814;
  border-radius:20px;
  box-shadow:0 14px 30px rgba(0,0,0,.75);
}
.account-item{
  padding:10px 14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:14px;
  border-top:1px solid #eee;
}
.account-item:first-child{border-top:none;}
.account-item-label{display:flex;align-items:center;gap:8px;}
.logout-bar{
  margin:0 14px 80px;
  background:#b71c1c;
  border-radius:999px;
  padding:10px 0;
  text-align:center;
  font-weight:600;
  box-shadow:0 14px 30px rgba(0,0,0,.85);
  cursor:pointer;
}

/* Bottom nav */
.nav{
  position:fixed;
  bottom:0;left:0;width:100%;
  background:#120809;
  border-top:1px solid rgba(255,214,102,.2);
  display:flex;
  justify-content:space-around;
  padding:4px 0 3px;
}
.nav a{
  flex:1;
  text-align:center;
  text-decoration:none;
  font-size:11px;
  color:#b7a37e;
}
.nav-icon{font-size:16px;display:block;}
.nav-label{display:block;margin-top:1px;}
.nav a.active{color:#ffd666;font-weight:600;}

/* Modal */
.modal{
  position:fixed;inset:0;
  background:rgba(0,0,0,.75);
  display:none;align-items:center;justify-content:center;
  z-index:20;
}
.modal.open{display:flex;}
.modal-inner{
  width:88%;max-width:420px;
  background:#2b1715;
  border-radius:22px;
  padding:16px 14px 14px;
  box-shadow:0 24px 50px rgba(0,0,0,.85);
}
.modal-header{
  display:flex;justify-content:space-between;align-items:center;
  margin-bottom:8px;
}
.modal-title{font-weight:600;font-size:16px;}
.modal-close{cursor:pointer;font-size:20px;}
.quick-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;}
.amount-chip{
  flex:1 1 calc(50% - 8px);
  padding:8px 0;
  text-align:center;
  border-radius:14px;
  background:#3a221a;
  border:1px solid rgba(244,180,26,.7);
  font-size:14px;
  cursor:pointer;
}

/* Game layout */
.game-layout{padding:0 14px;}
.game-panel{
  background:#2b1715;
  border-radius:22px;
  padding:16px 14px 16px;
  margin-top:10px;
  box-shadow:0 18px 36px rgba(0,0,0,.85);
  position:relative;
  transform-origin:center;
  transition:transform .25s ease, box-shadow .25s ease;
}
.game-panel.win-anim{
  animation:hbWin3D .6s ease-out;
  box-shadow:0 22px 48px rgba(255,214,102,.8);
}
.game-panel.lose-anim{
  animation:hbLose3D .55s ease-out;
  box-shadow:0 18px 40px rgba(244,81,65,.75);
}
.game-title-main{font-size:16px;font-weight:600;margin-bottom:4px;}
.game-sub{font-size:13px;opacity:.9;}
.bet-row{margin-top:12px;}
.bet-row input{margin-top:6px;}
.chip-row{
  display:flex;
  gap:8px;
  margin-top:8px;
  flex-wrap:wrap;
}
.chip{
  flex:1 1 calc(33% - 8px);
  padding:7px 0;
  border-radius:18px;
  border:1px solid rgba(244,180,26,.8);
  text-align:center;
  font-size:13px;
  cursor:pointer;
}
.game-actions{
  margin-top:10px;
  display:flex;
  gap:8px;
}
.game-actions .btn-primary{margin-top:0;font-size:14px;padding:11px 0;}
.game-result{
  margin-top:10px;
  min-height:20px;
  font-size:14px;
  transition:transform .2s ease,color .2s ease;
}
.game-result.win-text{color:#8bc34a;transform:scale(1.03);}
.game-result.lose-text{color:#ff7043;transform:scale(1.03);}

/* HiLo specific */
.hilo-card{
  margin-top:10px;
  width:80px;height:110px;
  border-radius:10px;
  border:2px solid #f4b41a;
  display:flex;align-items:center;justify-content:center;
  font-size:30px;
  background:#1b2430;
  box-shadow:0 10px 24px rgba(0,0,0,.8);
  transform-origin:center;
}
.hilo-card.flip{
  animation:cardFlip .5s ease;
}

/* Mines grid */
.mines-grid{
  margin-top:10px;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:6px;
}
.mine-tile{
  height:44px;
  border-radius:10px;
  background:#3a2520;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
  font-size:18px;
}
.mine-tile.safe{
  background:#33691e;
  animation:safeGlow .4s ease-out;
}
.mine-tile.bomb{
  background:#b71c1c;
  animation:bombShake .4s ease-out;
}

/* Keno */
.keno-grid{
  margin-top:10px;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:6px;
}
.keno-num{
  height:34px;
  border-radius:10px;
  background:#3a2520;
  display:flex;align-items:center;justify-content:center;
  font-size:13px;
  cursor:pointer;
}
.keno-num.selected{
  background:#f4b41a;
  color:#2b1811;
}
.keno-num.hit{
  animation:kenoHit .45s ease-out;
  box-shadow:0 0 0 2px rgba(255,214,102,.9);
}

/* Slots */
.slot-reels{
  margin-top:12px;
  display:flex;
  gap:8px;
  justify-content:center;
}
.slot-reel{
  width:60px;height:60px;
  border-radius:12px;
  background:#111;
  display:flex;align-items:center;justify-content:center;
  font-size:30px;
  box-shadow:0 10px 22px rgba(0,0,0,.85);
}
.slot-reel.spinning{
  animation:slotSpin .6s linear infinite;
}

/* Aviator */
.aviator-sky{
  margin-top:10px;
  height:80px;
  border-radius:16px;
  background:linear-gradient(135deg,#102030,#214060);
  position:relative;
  overflow:hidden;
}
.plane{
  position:absolute;
  left:10px;top:34px;
  font-size:24px;
  transition:transform .6s ease;
}
.plane.fly{
  transform:translateX(120px) translateY(-20px);
}
.aviator-mult{
  margin-top:8px;
  font-size:18px;
  font-weight:700;
  color:#ffd666;
}

/* Cricket */
.cricket-field{
  margin-top:10px;
  height:80px;
  border-radius:16px;
  background:radial-gradient(circle at center,#33691e,#1b5e20);
  position:relative;
  overflow:hidden;
}
.ball{
  position:absolute;
  left:10px;top:32px;
  width:14px;height:14px;
  border-radius:50%;
  background:#ffeb3b;
  box-shadow:0 0 6px rgba(0,0,0,.8);
}
.ball.bowl{
  animation:ballBowl .6s ease-out;
}
.cricket-score{
  margin-top:8px;
  font-weight:600;
}

/* Animations */
@keyframes shake{
  0%{transform:translateX(0)}25%{transform:translateX(-4px)}50%{transform:translateX(4px)}75%{transform:translateX(-3px)}100%{transform:translateX(0)}
}
@keyframes hbWin3D{
  0%{transform:perspective(800px) translateY(0) scale(1) rotateX(0);}
  30%{transform:perspective(800px) translateY(-6px) scale(1.03) rotateX(4deg);}
  60%{transform:perspective(800px) translateY(-2px) scale(1.01) rotateX(-2deg);}
  100%{transform:perspective(800px) translateY(0) scale(1) rotateX(0);}
}
@keyframes hbLose3D{
  0%{transform:perspective(800px) translateX(0) rotateZ(0);}
  20%{transform:perspective(800px) translateX(-5px) rotateZ(-2deg);}
  40%{transform:perspective(800px) translateX(5px) rotateZ(2deg);}
  60%{transform:perspective(800px) translateX(-3px) rotateZ(-1deg);}
  80%{transform:perspective(800px) translateX(3px) rotateZ(1deg);}
  100%{transform:perspective(800px) translateX(0) rotateZ(0);}
}
@keyframes safeGlow{
  0%{transform:scale(0.9);box-shadow:0 0 0 0 rgba(139,195,74,.3);}
  100%{transform:scale(1);box-shadow:0 0 0 6px rgba(139,195,74,0);}
}
@keyframes bombShake{
  0%,100%{transform:translateX(0);}
  25%{transform:translateX(-3px);}
  50%{transform:translateX(3px);}
  75%{transform:translateX(-2px);}
}
@keyframes kenoHit{
  0%{transform:scale(0.9);}
  50%{transform:scale(1.1);}
  100%{transform:scale(1);}
}
@keyframes slotSpin{
  0%{transform:translateY(0);}
  100%{transform:translateY(12px);}
}
@keyframes cardFlip{
  0%{transform:rotateY(0);}
  50%{transform:rotateY(90deg);}
  100%{transform:rotateY(0);}
}
@keyframes ballBowl{
  0%{transform:translateX(0);}
  100%{transform:translateX(120px);}
}

/* Responsive */
@media(max-width:480px){
  .center-card{margin:40px 16px;}
}
