* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  user-select: none; /* Biar ga bisa di-block/copy pas ditap-tap di HP */
  -webkit-tap-highlight-color: transparent; /* Ilangin kotak biru pas ditap di Safari mobile */
}

body {
  background-color: #0d0000;
  background-image: radial-gradient(circle, #3a0000 0%, #0d0000 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh; /* Mengatasi bug dynamic toolbar Safari/Chrome iOS */
  overflow: hidden;
}

/* Frame Mobile */
.mobile-frame {
  width: 100%;
  max-width: 430px; /* Lebar standar iPhone Max / Android besar */
  height: 100vh;
  height: 100svh;
  background: linear-gradient(180deg, #3d0303 0%, #150000 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 10px;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
}

/* Border Emas di Desktop / iPad (Hilang pas di Layar HP) */
@media (min-width: 431px) {
  .mobile-frame {
    height: 92vh;
    max-height: 880px;
    border: 2px solid #d4af37;
    border-radius: 20px;
  }
}

/* Multiplier Bar Atas */
.top-bar {
  background: linear-gradient(180deg, #600000 0%, #2b0000 100%);
  border: 1.5px solid #d4af37;
  border-radius: 12px;
  padding: 6px 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.multiplier-box {
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-weight: 900;
  font-size: 22px;
  color: #775533;
}

.multiplier-box .mult.active {
  color: #fff176;
  text-shadow: 0 0 10px #ff9800, 0 0 20px #ff5722;
  transform: scale(1.25);
}

/* Board Mahjong */
.game-board {
  background: #142e1d; /* Hijau Karpet Mahjong */
  border: 3px solid #d4af37;
  border-radius: 12px;
  padding: 8px;
  box-shadow: inset 0 0 20px #000, 0 6px 15px rgba(0,0,0,0.6);
  flex-grow: 1;
  display: flex;
  align-items: center;
  margin: 10px 0;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: 100%;
}

/* Balok / Tile Mahjong */
.tile {
  background: linear-gradient(180deg, #ffffff 0%, #e0e0e0 80%, #cccccc 100%);
  border-radius: 8px;
  aspect-ratio: 3 / 4; /* Rasio otomatis proporsional di semua layar HP */
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  box-shadow: 0 5px 0 #999999, inset 0 -2px 4px rgba(0,0,0,0.2);
  transition: transform 0.05s ease;
}

.tile:active {
  transform: scale(0.95);
}

/* Simbol WILD */
.tile.wild {
  background: linear-gradient(180deg, #ffe066 0%, #f5af19 50%, #e65c00 100%);
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  border: 1.5px solid #fff;
  box-shadow: 0 5px 0 #b33600, 0 0 12px #ff9800;
  font-size: 14px;
  font-weight: 900;
}

/* Banner Info Kemenangan */
.win-banner {
  background: linear-gradient(90deg, #4a0000 0%, #d4af37 50%, #4a0000 100%);
  border: 1px solid #ffe066;
  border-radius: 20px;
  text-align: center;
  padding: 8px;
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  text-shadow: 1px 1px 3px #000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* Control Panel Bawah */
.bottom-panel {
  background: rgba(15, 0, 0, 0.85);
  border-radius: 16px;
  padding: 12px 10px;
  border: 1px solid #553311;
  margin-top: 10px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.info-box {
  background: linear-gradient(180deg, #1f1f1f 0%, #0a0a0a 100%);
  border: 1px solid #d4af37;
  border-radius: 8px;
  padding: 6px;
  text-align: center;
  flex: 1;
}

.info-box small {
  display: block;
  font-size: 10px;
  color: #baa372;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.info-box span {
  color: #fff;
  font-weight: bold;
  font-size: 15px;
}

.controls-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.btn-sub, .btn-add {
  background: linear-gradient(180deg, #333 0%, #111 100%);
  color: #d4af37;
  border: 1.5px solid #d4af37;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.5);
}

.btn-sub:active, .btn-add:active {
  transform: scale(0.9);
}

/* Tombol Spin Utama */
.btn-spin {
  width: 72px;
  height: 72px;
  background: radial-gradient(circle, #fff176 0%, #f5af19 60%, #e65c00 100%);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 20px #ff9800, inset 0 2px 5px rgba(255,255,255,0.8);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spin-icon {
  font-size: 32px;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
}

.btn-spin:active {
  transform: scale(0.92);
  box-shadow: 0 0 10px #ff9800;
}