/* ===== Ludo King Ultra-Premium Design & Animation System ===== */
:root {
  --red: #E52521;
  --red-dark: #990000;
  --green: #00A651;
  --green-dark: #006020;
  --yellow: #FFD200;
  --yellow-dark: #C69200;
  --blue: #009FE3;
  --blue-dark: #006699;
  --gold: #FFD700;
  --gold-light: #FFF4A3;
  --gold-dark: #B87700;
  --bg-dark: #071936;
  --bg-mid: #0D3468;
  --bg-light: #154D96;
  --card-bg: rgba(7, 25, 54, 0.88);
  --text: #FFFFFF;
  --text-muted: #A3C0E8;
  --shadow: rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: #041024;
}

body {
  font-family: "Baloo 2", system-ui, -apple-system, sans-serif;
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
}

/* Authentic Ludo King Royal Background */
#app {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  background-color: #08234B;
  background-image:
    radial-gradient(circle at 50% 20%, rgba(26, 86, 160, 0.45) 0%, rgba(4, 16, 36, 0.88) 100%),
    linear-gradient(180deg, rgba(2, 17, 43, 0.3) 0%, rgba(2, 15, 37, 0.6) 100%),
    url("assets/ui/ludo-tile-background.png");
  background-position: center, center, center;
  background-size: cover, cover, cover;
  background-repeat: no-repeat;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

/* ===== SCREENS ===== */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.screen.active { display: flex; }

/* Particles Canvas/Layer */
.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* ================= AUTH SCREEN ================= */
.screen.auth {
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 350px;
  background: linear-gradient(165deg, #104B99 0%, #082858 100%);
  border: 3px solid var(--gold);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 215, 0, 0.25);
  position: relative;
  z-index: 2;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.auth-tab {
  flex: 1;
  background: #0A3774;
  border: 2px solid #2868BA;
  color: #CFE0FF;
  font-weight: 800;
  font-size: 16px;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.auth-tab.active {
  background: linear-gradient(145deg, #FFDF40, #E6A100);
  color: #4A2800;
  border-color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(230, 161, 0, 0.4);
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 12px;
}
.auth-form.active { display: flex; }

.auth-form input {
  background: #062046;
  border: 2px solid #2868BA;
  border-radius: 12px;
  color: #FFFFFF;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.auth-form input:focus { border-color: var(--gold); }
.auth-form input::placeholder { color: #6E97D4; }

.auth-error {
  color: #FF8080;
  font-size: 13px;
  min-height: 18px;
  text-align: center;
  font-weight: 600;
}

.auth-note {
  text-align: center;
  color: #CFE0FF;
  font-size: 13px;
  margin-top: 14px;
}
.auth-note b { color: var(--gold); }

/* ================= HOME SCREEN ================= */
.screen.home {
  justify-content: center;
  align-items: center;
  padding: 30px 20px;
  gap: 24px;
}

/* Wallet Bar */
.wallet-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  z-index: 10;
  gap: 6px;
}

.wb-user {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(4, 20, 48, 0.75);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  border-radius: 24px;
  padding: 3px 10px 3px 3px;
  font-weight: 800;
  font-size: 13px;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 0;
  overflow: hidden;
}

.wb-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

.wb-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.wb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
  background: #0B2B54;
}

.wb-vip {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.wb-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.wb-icon-btn, .wb-logout {
  background: rgba(4, 20, 48, 0.75);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  color: #FFD700;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}
.wb-icon-btn:hover, .wb-logout:hover {
  border-color: #FFFFFF;
  transform: scale(1.08);
}
.wb-icon-btn:active, .wb-logout:active {
  transform: scale(0.95);
}

.wb-coins {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(160deg, #104388, #072552);
  border: 1.5px solid var(--gold);
  border-radius: 20px;
  padding: 3px 6px 3px 8px;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s;
}
.wb-coins:active { transform: scale(0.96); }

.wb-plus {
  background: linear-gradient(145deg, #00C853, #007E33);
  border: 1px solid #69F0AE;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* 3D Animated Logo */
.logo-wrap {
  text-align: center;
  position: relative;
  z-index: 2;
  margin-top: 10px;
}
.logo-wrap.small { transform: scale(0.85); margin-top: 0; }

.crown-icon {
  display: inline-block;
  animation: crownBob 2.2s ease-in-out infinite;
  filter: drop-shadow(0 6px 14px rgba(255, 215, 0, 0.5));
}
@keyframes crownBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

.logo-text {
  font-size: 72px;
  font-weight: 800;
  letter-spacing: 6px;
  line-height: 1;
  text-shadow:
    0 4px 0 rgba(0, 0, 0, 0.8),
    0 8px 24px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(255, 215, 0, 0.35);
}

.l {
  display: inline-block;
  animation: letterDrop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}
.l:nth-child(1) { animation-delay: 0.1s; }
.l:nth-child(2) { animation-delay: 0.2s; }
.l:nth-child(3) { animation-delay: 0.3s; }
.l:nth-child(4) { animation-delay: 0.4s; }

@keyframes letterDrop {
  0% { transform: translateY(-40px) scale(0.4); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.l-red { color: #FF333A; }
.l-blue { color: #38BDF8; }
.l-yellow { color: #FFD700; }
.l-green { color: #00E676; }

.logo-subtitle {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 14px;
  color: var(--gold);
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.7);
  margin-top: -4px;
  padding-left: 14px;
}

/* Play Now Hero Section */
.play-now-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  z-index: 2;
}

.play-now-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(180deg, #2ED85C 0%, #159B30 65%, #0B6B1E 100%);
  border: 3.5px solid #86EFAC;
  border-radius: 22px;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 1.5px;
  padding: 18px 52px;
  cursor: pointer;
  font-family: inherit;
  box-shadow:
    0 8px 0 #074E14,
    0 14px 28px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(46, 216, 92, 0.35);
  animation: heroPulse 2s ease-in-out infinite;
  overflow: hidden;
  transition: transform 0.1s, box-shadow 0.1s;
}

/* Light Sweep Shimmer */
.play-now-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(30deg);
  animation: shimmerSweep 2.8s infinite;
}

@keyframes shimmerSweep {
  0% { left: -60%; }
  35%, 100% { left: 130%; }
}

@keyframes heroPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

.play-now-btn:active {
  transform: translateY(5px);
  box-shadow: 0 3px 0 #074E14, 0 6px 14px rgba(0, 0, 0, 0.5);
}

.play-now-sub {
  color: #BCD6F7;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* ===== HOME SCREEN OFFERS & COUPONS BANNER SHELF ===== */
.home-promos-wrap {
  width: 100%;
  max-width: 440px;
  margin: 18px auto 28px;
  padding: 0 16px;
  box-sizing: border-box;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hp-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.hp-shelf {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 215, 0, 0.4) transparent;
}

.hp-shelf::-webkit-scrollbar {
  height: 4px;
}
.hp-shelf::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.4);
  border-radius: 4px;
}

.promo-card {
  flex: 0 0 calc(100% - 10px);
  max-width: 380px;
  scroll-snap-align: start;
  background: linear-gradient(160deg, #104388 0%, #082858 100%);
  border: 1.5px solid rgba(255, 215, 0, 0.55);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.promo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 15px rgba(255, 215, 0, 0.2);
}

.promo-banner-img {
  width: 100%;
  aspect-ratio: 2.1 / 1;
  max-height: 140px;
  object-fit: cover;
  display: block;
  background: #061935;
  border-bottom: 1px solid rgba(255, 215, 0, 0.25);
}

.promo-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.promo-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  background: linear-gradient(135deg, #FFB300, #E65100);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.promo-title {
  font-size: 15px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
}

.promo-msg {
  font-size: 12px;
  color: #CADDF8;
  line-height: 1.4;
}

.promo-coupon-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed var(--gold);
  border-radius: 10px;
  padding: 6px 10px;
  margin-top: 4px;
}

.promo-code {
  font-family: monospace;
  font-size: 13px;
  font-weight: 800;
  color: #FFE082;
  letter-spacing: 1px;
}

.promo-btn {
  background: linear-gradient(180deg, #FFD54F 0%, #FFA000 100%);
  border: 1px solid #FFF59D;
  border-radius: 8px;
  color: #0A2540;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.promo-btn:hover {
  transform: scale(1.04);
  background: linear-gradient(180deg, #FFE082 0%, #FFB300 100%);
}

/* ================= LOBBY SCREEN ================= */
.screen.lobby {
  align-items: center;
  overflow-y: auto;
  padding: 60px 16px 30px;
}

.lobby-scroll {
  width: 100%;
  max-width: 440px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title {
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  margin-top: 6px;
}

.player-cards {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.pcard {
  flex: 1;
  background: linear-gradient(160deg, rgba(16, 67, 136, 0.85), rgba(7, 37, 82, 0.95));
  backdrop-filter: blur(10px);
  border: 2px solid #2868BA;
  border-radius: 16px;
  color: #BCD6F7;
  padding: 14px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.pcard:hover { border-color: var(--gold); color: #FFFFFF; }

.pcard.selected {
  border-color: var(--gold);
  background: linear-gradient(160deg, rgba(255, 215, 0, 0.25), rgba(16, 67, 136, 0.9));
  color: var(--gold);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3), inset 0 0 15px rgba(255, 215, 0, 0.15);
  transform: translateY(-2px);
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.amt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(160deg, #104388, #072552);
  border: 2px solid #2868BA;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 4px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.amt-btn:hover { border-color: var(--gold); }

.amt-btn.selected {
  background: linear-gradient(145deg, #FFDF40, #E6A100);
  color: #4A2800;
  border-color: #FFFFFF;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.4);
  transform: scale(1.02);
}

.find-match-btn {
  background: linear-gradient(180deg, #2ED85C 0%, #159B30 100%);
  border: 2.5px solid #86EFAC;
  box-shadow: 0 6px 0 #074E14, 0 10px 20px rgba(0, 0, 0, 0.4);
  font-size: 20px;
  padding: 16px;
  border-radius: 18px;
  margin-top: 6px;
}

.lobby-note {
  text-align: center;
  color: #A3C0E8;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 4px;
}

/* ================= MATCHMAKING SCREEN ================= */
.screen.matchmaking {
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mm-inner {
  text-align: center;
  max-width: 360px;
  padding: 28px 20px;
  background: linear-gradient(165deg, rgba(16, 75, 153, 0.9), rgba(8, 40, 88, 0.95));
  border: 3px solid var(--gold);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(255, 215, 0, 0.25);
}

.mm-radar-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
}

.mm-radar-ring {
  position: absolute;
  inset: 0;
  border: 3px solid var(--gold);
  border-radius: 50%;
  animation: radarWave 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  opacity: 0;
}
.mm-radar-ring.delay { animation-delay: 1s; }

@keyframes radarWave {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

.mm-center-badge {
  position: relative;
  z-index: 2;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFDF40 0%, #D48800 100%);
  border: 3px solid #FFFFFF;
  display: grid;
  place-items: center;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.mm-countdown {
  font-size: 36px;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
  margin-bottom: 8px;
}

.mm-title {
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.mm-meta {
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 15px;
}

.mm-status {
  color: #CFE0FF;
  font-size: 14px;
  margin-bottom: 14px;
}

.mm-pot {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 20px;
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  margin-bottom: 20px;
}

/* ================= GAME SCREEN (ZERO-SCROLL MOBILE FIT) ================= */
.screen.game {
  padding: 4px 6px;
  justify-content: space-between;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden !important;
  display: none;
  flex-direction: column;
}
.screen.game.active {
  display: flex;
}

/* Header with Emotes, Chat, Pot & Leave */
.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
  min-height: 36px;
  flex-shrink: 0;
  z-index: 20;
}

.gh-left, .gh-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gh-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(4, 20, 48, 0.85);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  color: #FFD700;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s, border-color 0.15s;
}
.gh-btn:hover {
  transform: scale(1.08);
  border-color: #FFFFFF;
}
.gh-btn:active {
  transform: scale(0.92);
}

.gh-btn.mic-btn {
  position: relative;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gh-btn.mic-btn.on {
  background: linear-gradient(145deg, #00E676, #00A651);
  border-color: #A7F3D0;
  color: #FFFFFF;
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.7), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.gh-btn.mic-btn.on::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid #00E676;
  opacity: 0;
  animation: micRipple 1.8s ease-out infinite;
}

@keyframes micRipple {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.gh-btn.leave {
  background: linear-gradient(145deg, #E52521, #A31118);
  border-color: #FFA3A3;
  color: #FFFFFF;
}

.gh-pot {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.45);
  border: 1.5px solid var(--gold);
  border-radius: 16px;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Speaking Wave Ripple on Player Avatar */
.player-card.speaking .pc-avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #00E676;
  box-shadow: 0 0 10px #00E676;
  animation: speakingPulse 1s ease-in-out infinite;
  z-index: 5;
  pointer-events: none;
}

@keyframes speakingPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.22); opacity: 0.3; }
}

/* Player Cards Top & Bottom */
.game-top, .game-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  flex-shrink: 0;
  z-index: 10;
}

.player-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: linear-gradient(160deg, #0F305C 0%, #081D3D 100%);
  border: 2px solid #1A5699;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  flex: 1 1 0;
  min-width: 0;
  max-width: 140px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.player-card.active-turn {
  background: linear-gradient(160deg, #164C8F 0%, #0A2954 100%);
  transform: scale(1.04);
}

.player-card.red.active-turn {
  border-color: #FF333A;
  box-shadow: 0 0 16px rgba(255, 51, 58, 0.6), 0 0 28px rgba(255, 51, 58, 0.25);
}
.player-card.green.active-turn {
  border-color: #00E676;
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.6), 0 0 28px rgba(0, 230, 118, 0.25);
}
.player-card.yellow.active-turn {
  border-color: #FFD700;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.6), 0 0 28px rgba(255, 215, 0, 0.25);
}
.player-card.blue.active-turn {
  border-color: #00B0FF;
  box-shadow: 0 0 16px rgba(0, 176, 255, 0.6), 0 0 28px rgba(0, 176, 255, 0.25);
}

/* Avatar & SVG Countdown Timer Ring */
.pc-avatar-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.pc-timer-ring {
  position: absolute;
  inset: -1px;
  width: 36px;
  height: 36px;
  transform: rotate(-90deg);
  pointer-events: none;
}

.timer-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 2.2;
}

.timer-progress {
  fill: none;
  stroke: #00E676;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 119.38;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.1s linear, stroke 0.3s;
}

.pc-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  background: #0B2B54;
}

.pc-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  overflow: hidden;
  min-width: 0;
  flex: 1;
}

.pc-name {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Board Area & Authentic Frame */
.board-area {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: 2px 0;
}

.board-frame {
  position: relative;
  display: grid;
  place-items: center;
  background: #061836;
  padding: 4px;
  border-radius: 8px;
  border: 3px solid #C59B27;
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(0, 159, 227, 0.2),
    inset 0 0 8px rgba(0, 0, 0, 0.6);
  transition: transform 0.1s;
  max-width: 100%;
  max-height: 100%;
}

.board-frame.shake {
  animation: boardShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes boardShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* As big as the screen allows: full app width minus screen padding (12px) and frame
   (padding + border, 14px); height leaves room for the header and player cards. */
#board {
  width: min(calc(100vw - 26px), calc(100dvh - 200px), 454px);
  height: min(calc(100vw - 26px), calc(100dvh - 200px), 454px);
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  display: block;
}

/* "SIX!" Explosion Banner */
.six-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: radial-gradient(circle, #FFE082 0%, #FFB300 60%, #E65100 100%);
  border: 3.5px solid #FFFFFF;
  border-radius: 24px;
  padding: 14px 28px;
  text-align: center;
  box-shadow: 0 0 50px rgba(255, 179, 0, 0.85), 0 10px 30px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  z-index: 40;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.six-banner.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.six-badge {
  font-size: 34px;
  font-weight: 800;
  color: #FFFFFF;
  text-shadow: 0 3px 0 #BF360C, 0 6px 12px rgba(0, 0, 0, 0.4);
  line-height: 1;
}

.six-text {
  font-size: 24px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.six-sub {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #4A1500;
}

/* "KNOCKOUT!" Banner */
.ko-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: linear-gradient(145deg, #EF4444, #991B1B);
  border: 3px solid #FFFFFF;
  border-radius: 20px;
  padding: 12px 24px;
  text-align: center;
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.8), 0 10px 30px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  z-index: 40;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ko-banner.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.ko-text {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 2px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

/* Floating Reaction Bubble */
.floating-reaction {
  position: absolute;
  pointer-events: none;
  z-index: 35;
  animation: floatReaction 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

@keyframes floatReaction {
  0% { transform: translate(-50%, 0) scale(0.3); opacity: 0; }
  25% { transform: translate(-50%, -25px) scale(1.25); opacity: 1; }
  75% { transform: translate(-50%, -70px) scale(1); opacity: 0.9; }
  100% { transform: translate(-50%, -110px) scale(0.7); opacity: 0; }
}

.turn-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: linear-gradient(145deg, rgba(7, 25, 54, 0.95), rgba(4, 15, 33, 0.9));
  backdrop-filter: blur(12px);
  padding: 6px 18px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  border: 1.5px solid var(--gold);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  z-index: 25;
}
.turn-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Center 3D Dice Button & Turn Arrow */
.dice-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0 6px;
  perspective: 900px;
}

.turn-arrow {
  position: absolute;
  top: -26px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
  z-index: 10;
}
.turn-arrow.show {
  opacity: 1;
  animation: arrowBob 0.65s ease-in-out infinite alternate;
}
@keyframes arrowBob {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.dice-btn {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(145deg, #0B2554 0%, #04122C 100%);
  border: 3px solid var(--gold);
  cursor: pointer;
  box-shadow:
    0 4px 0 var(--gold-dark),
    0 8px 18px rgba(0, 0, 0, 0.55),
    inset 0 1px 2px rgba(255, 255, 255, 0.2);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  overflow: visible;
}

.dice-btn:disabled {
  opacity: 0.75;
  cursor: default;
}

.dice-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--gold-dark), 0 4px 10px rgba(0, 0, 0, 0.45);
}

/* 3D Scene Viewport */
.dice-scene {
  width: 44px;
  height: 44px;
  perspective: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Real 3D Dice Cube with Extra-Rounded Casino Corners */
.dice-cube {
  width: 44px;
  height: 44px;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  transform: rotateX(0deg) rotateY(0deg);
  transition: transform 0.8s cubic-bezier(0.18, 0.89, 0.32, 1.12);
  border-radius: 12px;
  background: #FFFFFF;
}

.cube-core {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, #FFFFFF 0%, #F1F5F9 50%, #E2E8F0 100%);
  transform: translateZ(0);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.dice-cube.land-bounce {
  animation: cubeLandBounce 0.35s ease-out;
}

@keyframes cubeLandBounce {
  0% { transform: scale(0.92); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* 6 Cube Faces (Front, Back, Right, Left, Top, Bottom) */
.cube-face {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #FFFFFF 0%, #F8FAFC 55%, #E2E8F0 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.9),
    inset 0 -1.5px 3px rgba(0, 0, 0, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.25);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 4px;
  box-sizing: border-box;
}

.cube-face.face-1 { transform: rotateY(0deg) translateZ(22px); }
.cube-face.face-6 { transform: rotateY(180deg) translateZ(22px); }
.cube-face.face-2 { transform: rotateY(90deg) translateZ(22px); }
.cube-face.face-5 { transform: rotateY(-90deg) translateZ(22px); }
.cube-face.face-3 { transform: rotateX(90deg) translateZ(22px); }
.cube-face.face-4 { transform: rotateX(-90deg) translateZ(22px); }

/* Realistic Dice Pips (Dots) */
.cube-face .pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FF5A52 0%, #E52521 70%, #990000 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.35);
  align-self: center;
  justify-self: center;
  transition: background 0.3s;
}

/* Face 1 center pip */
.cube-face.face-1 .pip {
  width: 12px;
  height: 12px;
  grid-column: 2;
  grid-row: 2;
}

/* Face 2 pips */
.cube-face.face-2 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.cube-face.face-2 .pip:nth-child(2) { grid-column: 3; grid-row: 3; }

/* Face 3 pips */
.cube-face.face-3 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.cube-face.face-3 .pip:nth-child(2) { grid-column: 2; grid-row: 2; }
.cube-face.face-3 .pip:nth-child(3) { grid-column: 3; grid-row: 3; }

/* Face 4 pips */
.cube-face.face-4 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.cube-face.face-4 .pip:nth-child(2) { grid-column: 3; grid-row: 1; }
.cube-face.face-4 .pip:nth-child(3) { grid-column: 1; grid-row: 3; }
.cube-face.face-4 .pip:nth-child(4) { grid-column: 3; grid-row: 3; }

/* Face 5 pips */
.cube-face.face-5 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.cube-face.face-5 .pip:nth-child(2) { grid-column: 3; grid-row: 1; }
.cube-face.face-5 .pip:nth-child(3) { grid-column: 2; grid-row: 2; }
.cube-face.face-5 .pip:nth-child(4) { grid-column: 1; grid-row: 3; }
.cube-face.face-5 .pip:nth-child(5) { grid-column: 3; grid-row: 3; }

/* Face 6 pips */
.cube-face.face-6 .pip:nth-child(1) { grid-column: 1; grid-row: 1; }
.cube-face.face-6 .pip:nth-child(2) { grid-column: 3; grid-row: 1; }
.cube-face.face-6 .pip:nth-child(3) { grid-column: 1; grid-row: 2; }
.cube-face.face-6 .pip:nth-child(4) { grid-column: 3; grid-row: 2; }
.cube-face.face-6 .pip:nth-child(5) { grid-column: 1; grid-row: 3; }
.cube-face.face-6 .pip:nth-child(6) { grid-column: 3; grid-row: 3; }

/* Dynamic Pip Colors matching active player turn */
.dice-cube.color-red .pip {
  background: radial-gradient(circle at 35% 35%, #FF5A52 0%, #E52521 70%, #990000 100%);
}
.dice-cube.color-green .pip {
  background: radial-gradient(circle at 35% 35%, #34D399 0%, #009B48 70%, #064E3B 100%);
}
.dice-cube.color-yellow .pip {
  background: radial-gradient(circle at 35% 35%, #FDE047 0%, #EAB308 70%, #854D0E 100%);
}
.dice-cube.color-blue .pip {
  background: radial-gradient(circle at 35% 35%, #60A5FA 0%, #0070BA 70%, #1E3A8A 100%);
}

.dice-label {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.5px;
  margin-top: 3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  text-align: center;
  min-height: 18px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.dice-label b {
  color: #FFFFFF;
  background: rgba(255, 215, 0, 0.3);
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 215, 0, 0.6);
  font-size: 12px;
}

.dice-label.highlight-roll {
  animation: labelRollPulse 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes labelRollPulse {
  0% { transform: scale(0.8); opacity: 0.7; }
  50% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Reactions Bar (Drawer Popup) */
.reaction-bar {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px) scale(0.9);
  opacity: 0;
  pointer-events: none;
  display: flex;
  gap: 8px;
  background: rgba(4, 20, 48, 0.95);
  backdrop-filter: blur(12px);
  border: 2px solid var(--gold);
  border-radius: 24px;
  padding: 6px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.3);
  z-index: 35;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s;
}

.reaction-bar.show {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.reaction-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform 0.15s, background-color 0.15s;
}
.reaction-btn:hover {
  transform: scale(1.2);
  background: rgba(255, 215, 0, 0.2);
  border-color: var(--gold);
}
.reaction-btn:active { transform: scale(0.9); }

/* In-Match Chat Modal */
.match-chat {
  position: absolute;
  z-index: 45;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 10px;
  border: 2px solid var(--gold);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(17, 66, 126, 0.98), rgba(5, 27, 62, 0.98));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  transform: translateY(calc(100% + 20px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.match-chat.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.chat-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
}
.chat-title button {
  border: 0;
  background: transparent;
  color: #B9D7FF;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.chat-messages {
  min-height: 32px;
  max-height: 80px;
  overflow-y: auto;
  padding: 4px 0;
}
.chat-message {
  width: fit-content;
  max-width: 90%;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 3px;
}

.quick-messages {
  display: flex;
  gap: 5px;
  margin: 3px 0 6px;
  overflow-x: auto;
}
.quick-messages button {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #DBEEFF;
  padding: 3px 8px;
  font: 700 10px "Baloo 2", sans-serif;
  cursor: pointer;
}

.chat-composer {
  display: flex;
  gap: 6px;
}
.chat-composer input {
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  padding: 6px 8px;
  outline: none;
  background: #FFFFFF;
  color: #12345E;
  font: 600 12px "Baloo 2", sans-serif;
}
.chat-composer button {
  width: 32px;
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  color: #093364;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* ================= MODAL & TOAST ================= */
.modal {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 50;
}
.modal.show { display: grid; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  background: linear-gradient(165deg, #104B99 0%, #082555 100%);
  border: 3.5px solid var(--gold);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  width: 85%;
  max-width: 330px;
  box-shadow: 0 0 60px rgba(255, 215, 0, 0.25), 0 20px 60px rgba(0, 0, 0, 0.7);
  z-index: 1;
}

/* Confetti Overlay */
.confetti-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  will-change: transform, opacity;
  animation-name: confettiFall;
  animation-timing-function: linear;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

.result-card { padding-top: 36px; }

.result-badge {
  width: 90px;
  height: 90px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  animation: trophyBounce 0.7s cubic-bezier(0.2, 1.4, 0.5, 1);
}

.result-card.win .result-badge {
  background: radial-gradient(circle at 40% 30%, #FFF2A8, #FFC21C 55%, #E0930A);
  box-shadow: 0 0 0 6px rgba(255, 215, 0, 0.25), 0 8px 24px rgba(224, 147, 10, 0.55);
}
.result-card.lose .result-badge {
  background: radial-gradient(circle at 40% 30%, #4A6A92, #26456E 60%, #16294A);
  box-shadow: 0 0 0 6px rgba(41, 64, 94, 0.35), 0 8px 22px rgba(0, 0, 0, 0.5);
}

@keyframes trophyBounce {
  0% { transform: scale(0) rotate(-30deg); }
  60% { transform: scale(1.2) rotate(6deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.result-card.win #goTitle {
  color: var(--gold);
  font-size: 32px;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
  margin: 6px 0;
}
.result-card.lose #goTitle {
  color: #CFE0FF;
  font-size: 28px;
  font-weight: 800;
  margin: 6px 0;
}

.winner-tokens img { width: 36px; height: auto; }

.prize-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 14px;
  padding: 10px 24px;
  margin: 8px auto 14px;
  border: 1px solid rgba(255, 215, 0, 0.35);
}

.prize-label {
  font-size: 12px;
  color: #A9C4E6;
  font-weight: 700;
}
.prize-amt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 26px;
  font-weight: 800;
}
.result-card.win .prize-amt { color: #4ADE80; }
.result-card.lose .prize-amt { color: #CFE0FF; }

.go-sub {
  color: #A9C4E6;
  font-size: 13px;
  margin-bottom: 18px;
}

/* 3D Action Buttons */
.big-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 16px;
  border: none;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  color: #4A2800;
  background: linear-gradient(180deg, #FFDF40 0%, #FFA000 100%);
  box-shadow: 0 5px 0 #C67D00, 0 8px 18px rgba(0, 0, 0, 0.4);
  margin-bottom: 10px;
  transition: all 0.15s;
}
.big-btn:hover { filter: brightness(1.05); }
.big-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #C67D00;
}

.big-btn.ghost {
  background: transparent;
  color: #CFE0FF;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}
.big-btn.ghost:hover { border-color: #FFFFFF; }

.toast {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-40px);
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  color: #FFFFFF;
  padding: 9px 20px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid var(--gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 100;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================= WALLET SCREEN ================= */
.screen.wallet {
  align-items: center;
  overflow-y: auto;
  padding: 20px 16px;
}

.wallet-inner {
  width: 100%;
  max-width: 420px;
  margin: auto;
  position: relative;
  background: linear-gradient(165deg, #104B99, #082555);
  border: 3px solid var(--gold);
  border-radius: 20px;
  padding: 22px 18px 28px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
}

.balance-box {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.balance-label { font-size: 13px; color: #CFE0FF; font-weight: 600; }
.balance-val { font-size: 32px; font-weight: 800; color: var(--gold); }

.wallet-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.wtab {
  flex: 1;
  background: #0A3774;
  border: 2px solid #2868BA;
  color: #CFE0FF;
  font-weight: 800;
  padding: 10px 4px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s;
}

.wtab.active {
  background: linear-gradient(145deg, #FFDF40, #E6A100);
  color: #4A2800;
  border-color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(230, 161, 0, 0.35);
}

.wpane { display: none; flex-direction: column; gap: 10px; }
.wpane.active { display: flex; }

.wpane-help {
  font-size: 13px;
  color: #BCD6F7;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: 10px;
}

.wlabel {
  font-size: 13px;
  font-weight: 700;
  color: #CFE0FF;
  margin-top: 4px;
}

.wpane input, .wpane textarea {
  background: #062046;
  border: 2px solid #2868BA;
  border-radius: 12px;
  color: #FFFFFF;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
}
.wpane input::placeholder, .wpane textarea::placeholder { color: #6E97D4; }

.amount-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.amount-chips button {
  flex: 1;
  min-width: 65px;
  background: #0A3774;
  border: 2px solid #2868BA;
  color: #FFFFFF;
  font-weight: 800;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.amount-chips button:active { background: var(--gold); color: #4A2800; }

.pay-methods { display: flex; flex-direction: column; gap: 8px; }
.pm-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 2px solid #2868BA;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
}
.pm-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold) inset;
}

.pm-label { font-weight: 800; margin-bottom: 3px; }
.pm-kind {
  font-size: 10px;
  background: #0F3560;
  color: #7CC4FF;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 4px;
  font-weight: 700;
}
.pm-line { font-size: 13px; color: #CFE0FF; }
.empty-note { color: #BCD6F7; font-size: 13px; text-align: center; padding: 14px; }

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
}
.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: 10px 14px;
}
.tx-type { font-weight: 700; font-size: 14px; }
.tx-note { font-size: 11px; color: #A9C4E6; }
.tx-amt { font-weight: 800; font-size: 16px; }
.tx-row.pos .tx-amt { color: #4ADE80; }
.tx-row.neg .tx-amt { color: #FF8080; }

.back-btn {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFDF40, #E6A100);
  border: 2px solid #FFFFFF;
  color: #4A2800;
  cursor: pointer;
  z-index: 5;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s;
}
.back-btn:active { transform: scale(0.92); }

/* Coupon Row */
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; text-transform: uppercase; }
.coupon-row button {
  background: linear-gradient(145deg, #00C853, #007E33);
  border: none;
  color: #FFFFFF;
  font-weight: 800;
  padding: 0 20px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
}
.coupon-msg { font-size: 13px; min-height: 16px; }
.coupon-msg.ok { color: #4ADE80; }
.coupon-msg.err { color: #FF8080; }

/* ================= MODAL & POPUP FRAMEWORK ================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal.show {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 22, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 360px;
  background: linear-gradient(165deg, #104B99, #082555);
  border: 3px solid var(--gold);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 215, 0, 0.2);
  transform: translateY(20px) scale(0.94);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-card {
  transform: translateY(0) scale(1);
}

.offer-modal-card {
  max-width: 380px;
  padding: 24px 18px 20px;
}

.offer-image {
  max-height: 180px;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.recharge-modal-card { max-width: 340px; }
.rm-check {
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  animation: rmPop 0.45s cubic-bezier(0.2, 1.4, 0.5, 1);
}
@keyframes rmPop { 0% { transform: scale(0); } 100% { transform: scale(1); } }

.recharge-modal-card h2, .offer-modal-card h2 {
  color: var(--gold);
  margin: 6px 0 10px;
}
.rm-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 15px;
}
.rm-line b {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
}
.rm-sub { font-size: 13px; color: #CFE0FF; line-height: 1.5; margin: 10px 0; }
.rm-ref {
  font-size: 13px;
  color: #BCD6F7;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 12px;
}
.rm-bonus {
  font-size: 13px;
  color: #4ADE80;
  background: rgba(34, 167, 69, 0.15);
  border: 1px solid rgba(34, 167, 69, 0.4);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 10px;
}

.offer-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  color: #FFFFFF;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s, background 0.15s;
}
.offer-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}
.offer-emoji {
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  animation: rmPop 0.5s cubic-bezier(0.2, 1.4, 0.5, 1);
}
.offer-ribbon {
  display: inline-block;
  background: linear-gradient(145deg, #EF4444, #B91C1C);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 4px 18px;
  border-radius: 999px;
  margin: 8px 0 4px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
.offer-msg {
  font-size: 15px;
  color: #EAF2FF;
  line-height: 1.5;
  margin: 8px 0 16px;
  white-space: pre-wrap;
}

/* ================= INLINE SVG ICONS ================= */
.svg-icon { display: inline-block; vertical-align: middle; }
.inline-icon { display: inline-flex; align-items: center; vertical-align: middle; }
.inline-icon .svg-icon { display: block; }
.crown-icon .svg-icon { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4)); }
.trophy .svg-icon { filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45)); }
.rm-check .svg-icon { filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.6)); }
.offer-emoji .svg-icon { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35)); }

/* ================= HOME REFER & EARN BANNER ================= */
.home-refer-banner {
  width: 100%;
  background: linear-gradient(135deg, #FF6B00 0%, #D9480F 50%, #B83200 100%);
  border: 2.5px solid #FFD700;
  border-radius: 18px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(217, 72, 15, 0.4), 0 0 15px rgba(255, 215, 0, 0.25);
  margin-top: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}
.home-refer-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(217, 72, 15, 0.5), 0 0 20px rgba(255, 215, 0, 0.35);
}
.home-refer-banner:active {
  transform: translateY(1px);
}
.home-refer-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: bannerShimmer 3.5s infinite;
}
@keyframes bannerShimmer {
  0% { left: -100%; }
  40%, 100% { left: 140%; }
}

.hr-left { display: flex; flex-direction: column; gap: 3px; }
.hr-badge {
  font-size: 11px;
  font-weight: 800;
  color: #FFF9C4;
  letter-spacing: 0.8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.hr-title {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.hr-sub {
  font-size: 12px;
  color: #FFE3D1;
  font-weight: 600;
}
.hr-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.hr-btn-text {
  background: linear-gradient(145deg, #FFDF40, #E6A100);
  color: #4A2800;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* ================= REFER & EARN SCREEN ================= */
.screen.refer {
  align-items: center;
  overflow-y: auto;
  padding: 16px;
}
.refer-inner {
  width: 100%;
  max-width: 440px;
  margin: auto;
  position: relative;
  background: linear-gradient(165deg, #104B99, #082555);
  border: 3px solid var(--gold);
  border-radius: 20px;
  padding: 24px 18px 30px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.refer-hero {
  text-align: center;
  margin-top: 10px;
}
.refer-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  animation: rmPop 0.5s cubic-bezier(0.2, 1.4, 0.5, 1);
  filter: drop-shadow(0 6px 16px rgba(255, 215, 0, 0.4));
}
.refer-hero h2 {
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 6px;
}
.refer-subtitle {
  font-size: 13.5px;
  color: #CFE0FF;
  line-height: 1.5;
}
.refer-subtitle b {
  color: #FFDF40;
}

/* Code Card */
.refer-code-card {
  background: rgba(0, 0, 0, 0.35);
  border: 2px dashed rgba(255, 215, 0, 0.6);
  border-radius: 16px;
  padding: 14px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rc-label {
  font-size: 11.5px;
  font-weight: 800;
  color: #A9C4E6;
  letter-spacing: 1px;
}
.rc-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.rc-code {
  font-size: 24px;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 3px;
  font-family: monospace;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.rc-copy-btn {
  background: linear-gradient(145deg, #FFDF40, #E6A100);
  border: 2px solid #FFFFFF;
  color: #4A2800;
  font-weight: 800;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
.rc-copy-btn:active { transform: scale(0.94); }
.rc-link-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 4px;
}
.rc-link-preview {
  font-size: 11px;
  color: #8EB7ED;
  word-break: break-all;
  opacity: 0.9;
  flex: 1;
  text-align: left;
}
.rc-link-copy-btn {
  background: rgba(255, 215, 0, 0.2);
  border: 1px solid var(--gold);
  color: #FFDF40;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s;
}
.rc-link-copy-btn:hover { background: rgba(255, 215, 0, 0.35); }

/* QR Code Card */
.refer-qr-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 16px;
  padding: 14px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.qr-header h3 {
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.qr-header p {
  font-size: 11.5px;
  color: #A9C4E6;
}
.qr-code-box {
  background: #FFFFFF;
  padding: 10px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
}
.qr-code-box img {
  width: 120px;
  height: 120px;
  border-radius: 6px;
  object-fit: contain;
}

/* Share Section */
.refer-share-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.refer-share-section h3 {
  font-size: 13px;
  color: #A9C4E6;
  font-weight: 700;
  margin-left: 2px;
}
.refer-share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px;
}
.share-btn {
  border: none;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 11.5px;
  padding: 9px 4px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s;
}
.share-btn:active { transform: scale(0.95); }
.share-btn.whatsapp { background: linear-gradient(145deg, #25D366, #128C7E); }
.share-btn.telegram { background: linear-gradient(145deg, #2AABEE, #229ED9); }
.share-btn.facebook { background: linear-gradient(145deg, #1877F2, #0E52B7); }
.share-btn.generic  { background: linear-gradient(145deg, #8B5CF6, #6D28D9); }

/* Stats Grid */
.refer-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.stat-card {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 10px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-card.gold {
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(255, 215, 0, 0.1);
}
.sc-val {
  font-size: 17px;
  font-weight: 900;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.stat-card.gold .sc-val { color: var(--gold); }
.sc-lbl {
  font-size: 11px;
  color: #A9C4E6;
  font-weight: 600;
}

/* Referral Milestones */
.refer-milestones-card {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.refer-milestones-card h3 {
  font-size: 14px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.ms-subtitle {
  font-size: 11.5px;
  color: #A9C4E6;
  margin-top: -6px;
}
.milestones-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.milestone-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
  border-radius: 12px;
  gap: 10px;
}
.milestone-item.unlocked {
  border-color: rgba(255, 215, 0, 0.6);
  background: rgba(255, 215, 0, 0.12);
}
.milestone-item.claimed {
  opacity: 0.7;
  border-color: rgba(0, 230, 118, 0.4);
}
.ms-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ms-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #FFFFFF;
}
.ms-reward {
  font-size: 11.5px;
  color: #FFDF40;
  font-weight: 700;
}
.ms-claim-btn {
  background: linear-gradient(145deg, #00E676, #00A651);
  border: 1px solid #FFFFFF;
  color: #003816;
  font-weight: 900;
  font-size: 11.5px;
  padding: 6px 14px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 230, 118, 0.3);
  transition: transform 0.15s;
}
.ms-claim-btn:active { transform: scale(0.94); }
.ms-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
}
.ms-badge.locked {
  background: rgba(255, 255, 255, 0.1);
  color: #A9C4E6;
}
.ms-badge.claimed {
  background: rgba(0, 230, 118, 0.2);
  color: #00E676;
}

/* Referred Friends History List */
.refer-history-card {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.refer-history-card h3 {
  font-size: 14px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.referral-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}
.ref-friend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  border-radius: 10px;
}
.ref-friend-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ref-friend-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(145deg, #009FE3, #006DA0);
  color: #FFFFFF;
  font-weight: 900;
  font-size: 13px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.ref-friend-details {
  display: flex;
  flex-direction: column;
}
.ref-friend-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #FFFFFF;
}
.ref-friend-date {
  font-size: 10.5px;
  color: #8EB7ED;
}
.ref-friend-reward {
  font-size: 12px;
  font-weight: 800;
  color: #00E676;
}
.ref-empty {
  text-align: center;
  color: #A9C4E6;
  font-size: 12px;
  padding: 16px 8px;
}

/* How it works */
.refer-steps {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.refer-steps h3 {
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 2px;
}
.step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFDF40, #E6A100);
  color: #4A2800;
  font-weight: 900;
  font-size: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.step-text {
  font-size: 12.5px;
  color: #E2EDFF;
  line-height: 1.45;
}
.step-text b { color: #FFFFFF; }

/* ============================================================ *
 * FLOATING BOTTOM NAVIGATION BAR
 * ============================================================ */
.bottom-navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(5, 20, 48, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1.5px solid rgba(255, 215, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 990;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.bottom-navbar .nav-item {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: #8EB7ED;
  cursor: pointer;
  position: relative;
  transition: color 0.2s, transform 0.15s;
}

.bottom-navbar .nav-item.active {
  color: #FFD700;
  transform: translateY(-2px);
}

.bottom-navbar .nav-item.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, #FFE885, #FFD700, #E6A100);
  box-shadow: 0 2px 8px #FFD700;
}

.bottom-navbar .nav-icon {
  display: grid;
  place-items: center;
  transition: transform 0.2s;
}
.bottom-navbar .nav-item.active .nav-icon {
  transform: scale(1.15);
}

.bottom-navbar .nav-label {
  font-size: 11px;
  font-weight: 700;
  font-family: "Baloo 2", sans-serif;
  letter-spacing: 0.3px;
}

.bottom-navbar .nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  background: #EF4444;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1.5px solid #051430;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.6);
}

/* ============================================================ *
 * GLOBAL CHAT & CHALLENGES SCREEN
 * ============================================================ */
.screen.chats {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding-bottom: 64px;
  background: linear-gradient(165deg, #092042 0%, #041228 100%);
}
.screen.chats.active { display: flex; }

.chats-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1.5px solid rgba(255, 215, 0, 0.2);
  backdrop-filter: blur(10px);
}

.ch-info h2 {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 2px;
}

.ch-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #4ADE80;
  font-weight: 700;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 8px #4ADE80;
  animation: pulseOnline 1.6s infinite;
}
@keyframes pulseOnline {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.create-challenge-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #FF6B00 0%, #D9480F 100%);
  border: 1.5px solid #FFD700;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(255, 107, 0, 0.4);
  transition: transform 0.15s;
}
.create-challenge-btn:active { transform: scale(0.95); }

.chats-feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chats-welcome {
  text-align: center;
  padding: 18px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  border: 1px dashed rgba(255, 215, 0, 0.3);
  margin-bottom: 4px;
}

.cw-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 6px;
  display: grid;
  place-items: center;
  color: var(--gold);
}

.chats-welcome h3 {
  font-size: 15px;
  color: var(--gold);
  margin: 0 0 4px;
}
.chats-welcome p {
  font-size: 12px;
  color: #A9C4E6;
  margin: 0;
  line-height: 1.4;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Chat Message Bubbles */
.chat-bubble-wrap {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: fadeInMsg 0.2s ease;
}
@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-bubble-wrap.other {
  align-self: flex-start;
  background: rgba(16, 75, 153, 0.6);
  border: 1px solid rgba(40, 104, 186, 0.5);
  border-bottom-left-radius: 2px;
}

.chat-bubble-wrap.me {
  align-self: flex-end;
  background: linear-gradient(135deg, #FF9100 0%, #E65100 100%);
  border: 1px solid #FFD700;
  color: #FFFFFF;
  border-bottom-right-radius: 2px;
}

.cb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

.cb-user {
  font-weight: 800;
  color: #FFD700;
}
.chat-bubble-wrap.me .cb-user { color: #FFF8D6; }

.cb-time {
  font-size: 10px;
  color: #A9C4E6;
}
.chat-bubble-wrap.me .cb-time { color: rgba(255, 255, 255, 0.8); }

.cb-text {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

/* Challenge Cards inside Chat */
.chat-challenge-wrap {
  width: 100%;
  animation: fadeInMsg 0.2s ease;
}

.chat-challenge-card {
  background: linear-gradient(135deg, rgba(16, 75, 153, 0.95), rgba(8, 37, 85, 0.95));
  border: 2px solid var(--gold);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 215, 0, 0.2);
}

.chal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 6px;
}

.chal-user-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #FFFFFF;
}
.chal-time {
  font-size: 10.5px;
  color: #8EB7ED;
  margin-left: 4px;
}

.chal-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.chal-badge.open {
  background: rgba(34, 197, 94, 0.2);
  color: #4ADE80;
  border: 1px solid #4ADE80;
}
.chal-badge.in-progress {
  background: rgba(234, 179, 8, 0.2);
  color: #FACC15;
  border: 1px solid #FACC15;
}
.chal-badge.cancelled {
  background: rgba(239, 68, 68, 0.2);
  color: #FF8080;
  border: 1px solid #EF4444;
}

.chal-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12.5px;
  color: #DBEEFF;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 8px 10px;
}

.chal-detail {
  display: flex;
  align-items: center;
  gap: 4px;
}
.chal-detail.gold b { color: var(--gold); }

.chal-actions { width: 100%; }

.chal-btn {
  width: 100%;
  padding: 9px;
  border-radius: 12px;
  font-family: "Baloo 2", sans-serif;
  font-weight: 900;
  font-size: 13.5px;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.chal-btn.accept {
  background: linear-gradient(180deg, #FFDF40 0%, #FFA000 100%);
  border: none;
  color: #4A2800;
  box-shadow: 0 4px 12px rgba(255, 160, 0, 0.4);
}
.chal-btn.accept:active { transform: scale(0.96); }

.chal-btn.cancel {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #EF4444;
  color: #FF8080;
  font-size: 12px;
}
.chal-btn.waiting {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #A9C4E6;
  cursor: default;
}

.chats-composer {
  padding: 10px 14px;
  background: rgba(5, 20, 48, 0.95);
  border-top: 1.5px solid rgba(255, 215, 0, 0.2);
  display: flex;
  gap: 8px;
}

.chats-composer input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 9px 16px;
  color: #FFFFFF;
  font: 600 13.5px "Baloo 2", sans-serif;
  outline: none;
}
.chats-composer input::placeholder { color: #8EB7ED; }
.chats-composer input:focus { border-color: var(--gold); }

.chats-composer button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, #FFDF40, #E6A100);
  color: #4A2800;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 10px rgba(230, 161, 0, 0.4);
  transition: transform 0.15s;
}
.chats-composer button:active { transform: scale(0.92); }

/* ============================================================ *
 * ACCOUNT / PROFILE SCREEN
 * ============================================================ */
.screen.account {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 20px 16px 80px;
  background: linear-gradient(165deg, #092042 0%, #041228 100%);
}
.screen.account.active { display: flex; }

.account-inner {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.acc-profile-card {
  text-align: center;
  margin-bottom: 18px;
}

.acc-avatar-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 8px;
}
.acc-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  object-fit: cover;
}
.acc-vip-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: var(--gold);
  border-radius: 50%;
  padding: 4px;
  border: 2px solid #041228;
  display: grid;
  place-items: center;
}

.acc-username {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 2px;
}
.acc-user-id {
  font-size: 12px;
  color: #8EB7ED;
  font-weight: 600;
}

.acc-balance-card {
  background: linear-gradient(135deg, rgba(16, 75, 153, 0.7), rgba(8, 37, 85, 0.7));
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.abc-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.abc-label { font-size: 12px; color: #8EB7ED; font-weight: 600; }
.abc-val {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 24px;
  font-weight: 900;
  color: var(--gold);
}

.abc-actions {
  display: flex;
  gap: 6px;
}
.abc-btn {
  padding: 8px 14px;
  border-radius: 12px;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
  border: none;
  transition: transform 0.15s;
}
.abc-btn.deposit {
  background: linear-gradient(145deg, #00E676, #00A651);
  color: #003816;
  box-shadow: 0 3px 10px rgba(0, 230, 118, 0.3);
}
.abc-btn.withdraw {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}
.abc-btn:active { transform: scale(0.95); }

.acc-stats-section h3 {
  font-size: 15px;
  color: var(--gold);
  margin: 0 0 10px;
}

.acc-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.acc-stat-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.acc-stat-box.highlight {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(34, 197, 94, 0.1);
}
.acc-stat-box.gold {
  border-color: rgba(255, 215, 0, 0.4);
  background: rgba(255, 215, 0, 0.1);
}

.as-val {
  font-size: 20px;
  font-weight: 900;
  color: #FFFFFF;
}
.acc-stat-box.highlight .as-val { color: #4ADE80; }
.acc-stat-box.gold .as-val { color: var(--gold); }

.as-lbl {
  font-size: 11px;
  color: #8EB7ED;
  font-weight: 600;
}

.acc-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.acc-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 12px 14px;
  color: #FFFFFF;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.acc-option-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 215, 0, 0.4);
}

.ao-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ao-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 215, 0, 0.15);
  color: var(--gold);
  display: grid;
  place-items: center;
}
.acc-option-item.danger .ao-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

.ao-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.ao-title {
  font-size: 14px;
  font-weight: 800;
}
.ao-sub {
  font-size: 11px;
  color: #8EB7ED;
}

.ao-arrow { color: #8EB7ED; }

/* ============================================================ *
 * CREATE CHALLENGE MODAL STYLING
 * ============================================================ */
.challenge-modal-card {
  max-width: 360px;
}

.cm-header {
  text-align: center;
  margin-bottom: 14px;
}
.cm-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 6px;
  display: grid;
  place-items: center;
}
.cm-header h2 {
  font-size: 18px;
  color: var(--gold);
  margin: 0 0 4px;
}
.cm-header p {
  font-size: 12px;
  color: #CFE0FF;
  margin: 0;
}

.cm-players-select {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.cm-pbtn {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  background: #0A3774;
  border: 2px solid #2868BA;
  color: #FFFFFF;
  font-weight: 800;
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s;
}
.cm-pbtn.active {
  background: linear-gradient(145deg, #FFDF40, #E6A100);
  color: #4A2800;
  border-color: #FFFFFF;
}

.cm-stake-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.cm-sbtn {
  flex: 1;
  min-width: 52px;
  padding: 8px;
  border-radius: 10px;
  background: #0A3774;
  border: 1.5px solid #2868BA;
  color: #FFFFFF;
  font-weight: 800;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.cm-sbtn.active {
  background: var(--gold);
  color: #4A2800;
  border-color: #FFFFFF;
}

.cm-pot-info {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #CFE0FF;
}
.cm-pot-info b {
  color: var(--gold);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}


/* ============================================================ *
 * CHAT: online players, direct challenges, invites, moderation
 * ============================================================ */
button.ch-online-badge {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}
.ch-online-more {
  color: var(--gold);
  font-size: 11px;
  margin-left: 2px;
}

.chats-status {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #FDE68A;
  background: rgba(234, 179, 8, 0.14);
  border-top: 1px solid rgba(234, 179, 8, 0.35);
  text-align: center;
}
.chats-composer input:disabled { opacity: 0.5; }
.chats-composer button:disabled { filter: grayscale(1); opacity: 0.6; cursor: not-allowed; }

.cb-user-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 800;
  color: #FFD700;
  cursor: pointer;
  text-decoration: underline dotted rgba(255, 215, 0, 0.6);
  text-underline-offset: 2px;
}

.chat-system-msg {
  align-self: center;
  max-width: 92%;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #FFF4A3;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 12px;
  padding: 7px 12px;
  word-break: break-word;
}
.sys-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  color: #4A2800;
  background: var(--gold);
  border-radius: 6px;
  padding: 1px 6px;
  margin-right: 4px;
}

.chat-challenge-card.direct { border-color: #FF6B00; box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 0 15px rgba(255,107,0,0.3); }
.chat-challenge-card.invite { border-color: #4ADE80; box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 0 15px rgba(74,222,128,0.25); }
.chal-vs { color: #FF9F43; font-weight: 900; font-size: 11px; }
.chal-joined { font-size: 11.5px; color: #A9C4E6; margin: -4px 0 8px; }
.chal-row { display: flex; gap: 6px; }
.chal-row .chal-btn { flex: 1; }
.chal-row .chal-btn.slim, .chal-btn.slim { flex: 0 0 auto; width: auto; padding: 8px 12px; }
.chal-body { flex-wrap: wrap; }

.cm-hint { font-size: 11.5px; color: #A9C4E6; text-align: left; margin-top: 4px; }
.ic-timer { font-size: 12px; color: #FDE68A; margin: 4px 0 10px; font-weight: 700; }
.incoming-card .big-btn + .big-btn { margin-top: 8px; }

.player-sheet-card { max-width: 300px; }
.ps-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  color: #4A2800;
  background: linear-gradient(145deg, #FFDF40, #E6A100);
  border: 3px solid #FFFFFF;
}
.player-sheet-card h2 { color: #FFFFFF; font-size: 20px; margin-bottom: 2px; }
.ps-status { font-size: 13px; color: #A9C4E6; margin-bottom: 14px; }
.big-btn:disabled { filter: grayscale(0.8); opacity: 0.7; cursor: not-allowed; }

.online-card { max-width: 380px; text-align: left; }
.online-card h2 { color: var(--gold); font-size: 18px; text-align: center; }
.online-sub { font-size: 12px; color: #A9C4E6; text-align: center; margin: 2px 0 12px; }
.online-list { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; }
.online-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 10px;
}
.online-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #FFFFFF;
  background: linear-gradient(145deg, #2868BA, #0A3774);
  border: 2px solid #4ADE80;
}
.online-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.online-info b { color: #FFFFFF; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-info span { color: #A9C4E6; font-size: 11.5px; }
.online-row .chal-btn { width: auto; }
.online-row .chal-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.mm-share-hint {
  margin: 10px auto 0;
  max-width: 300px;
  font-size: 12.5px;
  font-weight: 700;
  color: #BBF7D0;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(74, 222, 128, 0.5);
  border-radius: 12px;
  padding: 8px 12px;
  text-align: center;
}

/* in-match chat */
.chat-message.me { margin-left: auto; background: rgba(255, 145, 0, 0.35); }
#btnOpenChat.has-unread { position: relative; }
#btnOpenChat.has-unread::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 6px #EF4444;
}

/* ===== Account: details, password, history ===== */
.acc-section {
  width: 100%;
  margin-top: 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px;
}
.acc-section h3 {
  font-size: 15px;
  color: var(--gold);
  margin: 0 0 10px;
}
.acc-details { margin: 0; display: flex; flex-direction: column; }
.acc-details > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}
.acc-details > div:last-child { border-bottom: 0; }
.acc-details dt { color: #A9C4E6; }
.acc-details dd { margin: 0; color: #FFFFFF; font-weight: 700; text-align: right; word-break: break-all; }

.acc-pass-form { display: flex; flex-direction: column; gap: 10px; }
.acc-pass-form input {
  background: #062046;
  border: 2px solid #2868BA;
  border-radius: 12px;
  color: #FFFFFF;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.acc-pass-form input:focus { border-color: var(--gold); }
.acc-pass-form input::placeholder { color: #6E97D4; }

.acc-hist-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.acc-hist-tab {
  flex: 1;
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #CFE0FF;
  font: 700 12px inherit;
  font-family: inherit;
  cursor: pointer;
}
.acc-hist-tab.active { background: var(--gold); color: #3B2600; border-color: var(--gold); }
.acc-hist-list { max-height: 380px; }
.tx-date { font-size: 10px; color: #7FA3D3; margin-top: 2px; }
.tx-row.neutral .tx-amt { color: #FFD54F; }

/* ============================================================ *
 * UI POLISH: effects, home stats, custom stake, recharge steps,
 * refer progress, account rank. (Entrance animations use the
 * `translate` property so existing `transform` effects still work.)
 * ============================================================ */

/* ---- Shared micro-effects (fx.js) ---- */
.fx-ripple-host { overflow: hidden; }
.fx-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  transform: scale(0);
  animation: fxRipple 0.6s ease-out forwards;
}
@keyframes fxRipple { to { transform: scale(1); opacity: 0; } }

.fx-pop { animation: fxPop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); display: inline-block; }
@keyframes fxPop { 40% { scale: 1.22; color: #FFF4A3; } 100% { scale: 1; } }

.fx-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 3000;
  animation: fxBurst 0.85s cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
}
@keyframes fxBurst {
  0% { translate: -50% -50%; opacity: 1; rotate: 0deg; }
  100% { translate: calc(-50% + var(--dx)) calc(-50% + var(--dy) + 60px); opacity: 0; rotate: 540deg; }
}
.fx-done { background: linear-gradient(180deg, #2ED85C, #159B30) !important; color: #FFFFFF !important; border-color: #86EFAC !important; }

/* ---- Staggered screen entrances ---- */
@keyframes fxRise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
.screen.home.active > :not(.particles):not(.wallet-bar),
.screen.lobby.active .lobby-scroll > *,
.screen.refer.active .refer-inner > :not(.back-btn),
.screen.account.active .account-inner > *,
.screen.wallet.active .wallet-inner > :not(.back-btn) {
  animation: fxRise 0.45s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.screen.active :is(.lobby-scroll, .refer-inner, .account-inner, .wallet-inner) > :nth-child(2),
.screen.home.active > :nth-child(3) { animation-delay: 0.05s; }
.screen.active :is(.lobby-scroll, .refer-inner, .account-inner, .wallet-inner) > :nth-child(3),
.screen.home.active > :nth-child(4) { animation-delay: 0.1s; }
.screen.active :is(.lobby-scroll, .refer-inner, .account-inner, .wallet-inner) > :nth-child(4),
.screen.home.active > :nth-child(5) { animation-delay: 0.15s; }
.screen.active :is(.lobby-scroll, .refer-inner, .account-inner, .wallet-inner) > :nth-child(5),
.screen.home.active > :nth-child(6) { animation-delay: 0.2s; }
.screen.active :is(.lobby-scroll, .refer-inner, .account-inner, .wallet-inner) > :nth-child(n+6),
.screen.home.active > :nth-child(n+7) { animation-delay: 0.25s; }
.wpane.active { animation: fxRise 0.3s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  .screen.active *, .wpane.active { animation-duration: 0.01ms !important; animation-delay: 0s !important; }
}

/* ---- Home ---- */
.screen.home { justify-content: safe center; gap: 18px; padding-bottom: 84px; }
.home-stats {
  width: 100%;
  max-width: 420px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  z-index: 1;
}
.home-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 215, 0, 0.25);
  background: linear-gradient(160deg, rgba(16, 67, 136, 0.8), rgba(7, 37, 82, 0.9));
  color: #FFFFFF;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s;
}
.home-stat:active { transform: scale(0.95); }
.home-stat:hover { border-color: rgba(255, 215, 0, 0.6); }
.hs-top { display: flex; align-items: center; gap: 5px; font-size: 18px; color: var(--gold); }
.hs-top b { color: #FFFFFF; font-weight: 900; }
.hs-lbl { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.hs-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: hsPulse 1.8s infinite;
}
@keyframes hsPulse { 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.home-refer-banner { transition: transform 0.15s; }
.home-refer-banner:active { transform: scale(0.98); }

/* ---- Lobby: presets, custom stake, summary ---- */
.amt-btn { transition: transform 0.15s, box-shadow 0.2s, background 0.2s; }
.amt-btn:active { transform: scale(0.94); }
.amt-btn.locked { opacity: 0.45; filter: grayscale(0.6); }
.amount-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.amt-btn { position: relative; min-width: 0; }
.amt-btn.locked::after { content: "\1F512"; position: absolute; top: 2px; right: 4px; font-size: 9px; }
.screen.lobby { padding-bottom: 84px; }

.stake-custom {
  background: rgba(0, 0, 0, 0.28);
  border: 2px dashed rgba(255, 215, 0, 0.35);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.stake-custom.active { border-style: solid; border-color: var(--gold); box-shadow: 0 0 18px rgba(255, 215, 0, 0.25); background: rgba(255, 215, 0, 0.06); }
.stake-custom.invalid { border-color: #FF6B6B; box-shadow: 0 0 14px rgba(255, 80, 80, 0.25); }
.stake-custom-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--gold); }
.stake-range { color: var(--text-muted); font-weight: 600; letter-spacing: 0; }
.stake-row { display: flex; gap: 8px; align-items: stretch; }
.stake-step {
  width: 48px;
  flex: none;
  border-radius: 12px;
  border: 2px solid #2868BA;
  background: linear-gradient(160deg, #104388, #072552);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}
.stake-step:active { transform: scale(0.92); }
.stake-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 12px;
  border: 2px solid #2868BA;
  background: #062046;
}
.stake-input-wrap:focus-within { border-color: var(--gold); }
.stake-input-wrap { min-width: 0; }
.stake-input-wrap input { width: 100%; }
.stake-input-wrap input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 20px;
  font-weight: 800;
  padding: 10px 0;
}
.stake-input-wrap input::placeholder { color: #6E97D4; font-weight: 600; font-size: 15px; }
.stake-input-wrap input::-webkit-outer-spin-button,
.stake-input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stake-input-wrap input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.stake-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stake-quick button {
  padding: 7px 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
  color: #CFE0FF;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.stake-quick button:active { transform: scale(0.94); }
.stake-error { font-size: 12px; font-weight: 700; color: #FF8A8A; text-align: center; }
.stake-error:empty { display: none; }

.match-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 215, 0, 0.3);
  background: rgba(0, 0, 0, 0.3);
}
.msum-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; }
.msum-item + .msum-item { border-left: 1px solid rgba(255, 255, 255, 0.1); }
.msum-item span { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.msum-item b { display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 900; color: #FFFFFF; }
.msum-item.win { background: linear-gradient(180deg, rgba(46, 216, 92, 0.18), rgba(21, 155, 48, 0.08)); }
.msum-item.win b { color: #4ADE80; }

/* ---- Recharge ---- */
.rc-steps { list-style: none; display: flex; align-items: center; margin: 0 0 12px; padding: 0; }
.rc-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.rc-steps li + li::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 50%;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 0;
  transition: background 0.3s;
}
.rc-steps li.done + li::before { background: linear-gradient(90deg, #2ED85C, #FFD700); }
.rcs-num {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 14px;
  background: #0A3774;
  border: 2px solid #2868BA;
  color: #CFE0FF;
  transition: all 0.25s;
}
.rcs-lbl { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.rc-steps li.current .rcs-num { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 12px rgba(255, 215, 0, 0.5); }
.rc-steps li.current .rcs-lbl { color: var(--gold); }
.rc-steps li.done .rcs-num { background: #22C55E; border-color: #86EFAC; color: #FFFFFF; font-size: 0; }
.rc-steps li.done .rcs-num::after { content: "\2713"; font-size: 15px; }

.amount-chips button { position: relative; transition: transform 0.15s, background 0.2s, border-color 0.2s; }
.amount-chips button:active { transform: scale(0.94); }
.amount-chips button.selected {
  background: linear-gradient(145deg, #FFDF40, #E6A100);
  color: #4A2800;
  border-color: #FFFFFF;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.4);
}
.amount-chips button[data-tag] { overflow: visible; }
.amount-chips { padding-top: 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
.amount-chips button[data-tag]::after {
  content: attr(data-tag);
  position: absolute;
  top: -9px;
  left: 50%;
  translate: -50% 0;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 8px;
  background: #E52521;
  color: #FFFFFF;
  letter-spacing: 0.5px;
}
.rc-receive {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.4);
  font-size: 13px;
  color: #CFE0FF;
  animation: fxRise 0.25s ease-out both;
}
.rc-receive[hidden] { display: none; }
.rc-receive b { display: flex; align-items: center; gap: 5px; color: #4ADE80; font-size: 15px; }
.pm-copy {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.5);
  background: rgba(255, 215, 0, 0.12);
  color: var(--gold);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  vertical-align: middle;
}
.pm-card { transition: border-color 0.2s, transform 0.15s; }
.pm-card:active { transform: scale(0.98); }

/* ---- Refer progress ---- */
.refer-progress {
  width: 100%;
  margin: 12px 0 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.14), rgba(255, 107, 0, 0.1));
  border: 1.5px solid rgba(255, 215, 0, 0.4);
}
.rp-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; }
.rp-label { font-size: 13px; font-weight: 700; color: #FFFFFF; }
.rp-count { font-size: 13px; font-weight: 900; color: var(--gold); white-space: nowrap; }
.rp-bar { height: 10px; border-radius: 6px; background: rgba(0, 0, 0, 0.4); overflow: hidden; }
.rp-fill, .acc-xp-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #FFA000, #FFD700, #FFF4A3, #FFD700);
  background-size: 200% 100%;
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.3, 1);
  animation: barShine 2.4s linear infinite;
}
@keyframes barShine { from { background-position: 200% 0; } to { background-position: 0 0; } }
.stat-card { transition: transform 0.15s; }
.stat-card:hover { transform: translateY(-2px); }

/* ---- Account rank & level ---- */
.acc-avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #FFD700, #E52521, #009FE3, #00A651, #FFD700);
  animation: avatarSpin 4s linear infinite;
  z-index: 0;
}
.acc-avatar-wrap > .acc-avatar { position: relative; z-index: 1; }
.acc-avatar-wrap > .acc-vip-badge { z-index: 2; }
@keyframes avatarSpin { to { rotate: 360deg; } }
.acc-rank-row { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.acc-rank-badge, .acc-level {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.acc-rank-badge { background: linear-gradient(135deg, #64748B, #334155); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, 0.3); }
.acc-rank-badge[data-rank="pro"] { background: linear-gradient(135deg, #009FE3, #006699); }
.acc-rank-badge[data-rank="expert"] { background: linear-gradient(135deg, #00A651, #006020); }
.acc-rank-badge[data-rank="master"] { background: linear-gradient(135deg, #A855F7, #6B21A8); }
.acc-rank-badge[data-rank="grandmaster"] { background: linear-gradient(135deg, #E52521, #990000); }
.acc-rank-badge[data-rank="legend"] { background: linear-gradient(135deg, #FFDF40, #E6A100); color: #4A2800; box-shadow: 0 0 14px rgba(255, 215, 0, 0.6); }
.acc-level { background: rgba(255, 215, 0, 0.14); color: var(--gold); border: 1px solid rgba(255, 215, 0, 0.45); }
.acc-xp { width: 100%; max-width: 260px; margin: 10px auto 0; display: flex; flex-direction: column; gap: 4px; }
.acc-xp-bar { height: 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.4); overflow: hidden; }
.acc-xp-lbl { font-size: 11px; color: var(--text-muted); text-align: center; }
.acc-stat-box { transition: transform 0.15s; }
.acc-stat-box:hover { transform: translateY(-2px); }
.acc-pass-show { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #CFE0FF; cursor: pointer; }
.acc-pass-show input { width: 16px; height: 16px; accent-color: var(--gold); }

/* ============================================================ *
 * SPIN & WIN, referral rule
 * ============================================================ */
.hsb-text { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hsb-text b { font-size: 17px; font-weight: 900; letter-spacing: 0.5px; }
.hsb-text span { font-size: 12px; color: rgba(255, 255, 255, 0.85); }

.spin-card { width: min(92vw, 380px); max-height: 92vh; overflow-y: auto; padding: 22px 18px 18px; }
.spin-title { color: var(--gold); font-size: 24px; margin: 0; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
.spin-sub { color: #CFE0FF; font-size: 13px; margin: 2px 0 12px; }
.spin-wheel-wrap {
  position: relative;
  width: min(78vw, 290px);
  aspect-ratio: 1;
  margin: 0 auto 12px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.55));
}
#spinCanvas { width: 100%; height: 100%; display: block; border-radius: 50%; will-change: transform; }
.spin-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  translate: -50% 0;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 30px solid #FFD700;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.5));
  z-index: 2;
}
.spin-hub {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #FFF4A3, #FFD700 55%, #B87700);
  border: 3px solid #FFFFFF;
  color: #8A5600;
  z-index: 2;
}
.spin-result { min-height: 24px; font-size: 15px; color: #CFE0FF; margin-bottom: 8px; }
.spin-result.win { color: #4ADE80; font-size: 18px; animation: fxPop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
.spin-lock {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 120, 120, 0.45);
  color: #FFC4C4;
  font-size: 13px;
  font-weight: 700;
}
.spin-lock[hidden] { display: none; }

.refer-rule {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0 4px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(0, 159, 227, 0.12);
  border: 1px solid rgba(69, 192, 248, 0.45);
  font-size: 12.5px;
  line-height: 1.5;
  color: #CFE0FF;
  text-align: left;
}
.refer-rule[hidden] { display: none; }
.refer-rule b { color: #FFFFFF; }
.rr-icon { font-size: 18px; line-height: 1.2; }
.ref-friend-reward.pending { color: #FFD54F; font-size: 12px; }

/* ============================================================ *
 * ROLL DICE (7 Up 7 Down)
 * ============================================================ */
.home-dice-btn {
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 2px solid rgba(255, 215, 0, 0.55);
  background: linear-gradient(135deg, #065F46 0%, #047857 50%, #0E7490 100%);
  color: #FFFFFF;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(4, 120, 87, 0.4);
  transition: transform 0.15s;
  z-index: 1;
}
.home-dice-btn[hidden] { display: none; }
.home-dice-btn:active { transform: scale(0.98); }
.hdb-dice { flex: none; display: flex; gap: 2px; font-size: 30px; line-height: 1; color: #FFFFFF; }
.hdb-dice span { display: inline-block; animation: hdbWobble 2.6s ease-in-out infinite; }
.hdb-dice span + span { animation-delay: 0.3s; }
@keyframes hdbWobble { 0%, 70%, 100% { rotate: 0deg; } 80% { rotate: -18deg; } 90% { rotate: 14deg; } }
.hdb-play { flex: none; padding: 5px 12px; border-radius: 12px; background: #FFD700; color: #4A2800; font-size: 12px; font-weight: 900; }

.screen.dicegame { align-items: center; padding: 60px 16px 84px; }
.dg-inner { width: 100%; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.screen.dicegame.active .dg-inner > * { animation: fxRise 0.45s cubic-bezier(0.2, 0.8, 0.3, 1) both; }

.dg-table {
  position: relative;
  border-radius: 22px;
  padding: 22px 16px 16px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 35%, #0F7A4A 0%, #065233 60%, #033822 100%);
  border: 4px solid #8B5A2B;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.55), 0 0 0 2px #C59B27, 0 10px 26px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.3s;
}
.dg-table.win { box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.55), 0 0 0 2px #FFD700, 0 0 30px rgba(74, 222, 128, 0.7); }
.dg-table.lose { box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.55), 0 0 0 2px #C59B27, 0 0 20px rgba(255, 80, 80, 0.35); }
.dg-dice { display: flex; justify-content: center; gap: 34px; margin-bottom: 14px; }
.dg-table.rolling .dg-dice { animation: dgShake 0.25s ease-in-out 3; }
@keyframes dgShake { 25% { translate: -4px 2px; } 75% { translate: 4px -2px; } }

/* the shadow sits on the scene: a filter on the cube itself would flatten its 3D faces */
.dice-scene.dg-scene { width: 76px; height: 76px; perspective: 600px; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.45)); }
.dice-cube.dg-die { width: 76px; height: 76px; border-radius: 16px; }
.dg-die .cube-core { border-radius: 16px; }
.dg-die .cube-face { width: 76px; height: 76px; border-radius: 16px; padding: 9px; }
.dg-die .cube-face.face-1 { transform: rotateY(0deg) translateZ(38px); }
.dg-die .cube-face.face-6 { transform: rotateY(180deg) translateZ(38px); }
.dg-die .cube-face.face-2 { transform: rotateY(90deg) translateZ(38px); }
.dg-die .cube-face.face-5 { transform: rotateY(-90deg) translateZ(38px); }
.dg-die .cube-face.face-3 { transform: rotateX(90deg) translateZ(38px); }
.dg-die .cube-face.face-4 { transform: rotateX(-90deg) translateZ(38px); }
.dg-die .cube-face .pip { width: 14px; height: 14px; }
.dg-die .cube-face.face-1 .pip { width: 20px; height: 20px; }

.dg-sum {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 900;
  color: #FFFFFF;
  background: rgba(0, 0, 0, 0.35);
  border: 3px solid rgba(255, 255, 255, 0.35);
}
.dg-sum.low { background: #E52521; border-color: #FF8A8A; }
.dg-sum.seven { background: linear-gradient(145deg, #FFDF40, #E6A100); border-color: #FFFFFF; color: #4A2800; }
.dg-sum.high { background: #009FE3; border-color: #7DD3FC; }
.dg-result { min-height: 22px; font-size: 14px; font-weight: 700; color: #E2F5EA; }
.dg-result b { color: #FFD700; }

.dg-history {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}
.dg-history::-webkit-scrollbar { display: none; }
.dgh {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  color: #FFFFFF;
  border: 2px solid transparent;
}
.dgh.low { background: #B91C1C; }
.dgh.seven { background: #CA8A04; }
.dgh.high { background: #0369A1; }
.dgh.won { border-color: #4ADE80; box-shadow: 0 0 8px rgba(74, 222, 128, 0.6); }
.dgh.fresh { animation: fxPop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
.dgh-empty { font-size: 12px; color: var(--text-muted); padding: 6px 0; }

.dg-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dg-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 4px;
  border-radius: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
  opacity: 0.78;
}
.dg-opt.low { background: linear-gradient(160deg, #EF4444, #991B1B); }
.dg-opt.seven { background: linear-gradient(160deg, #F59E0B, #A16207); }
.dg-opt.high { background: linear-gradient(160deg, #0EA5E9, #075985); }
.dg-opt:active { transform: scale(0.95); }
.dg-opt.selected { opacity: 1; border-color: #FFD700; box-shadow: 0 0 0 2px #FFFFFF inset, 0 0 18px rgba(255, 215, 0, 0.55); transform: translateY(-2px); }
.dgo-name { font-size: 11px; font-weight: 800; letter-spacing: 1px; opacity: 0.9; }
.dgo-range { font-size: 22px; font-weight: 900; line-height: 1.1; }
.dgo-mult { font-size: 13px; font-weight: 900; padding: 1px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); color: #FFE680; }

.dg-step {
  width: 48px;
  flex: none;
  border-radius: 12px;
  border: 2px solid #2868BA;
  background: linear-gradient(160deg, #104388, #072552);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}
.dg-step:active { transform: scale(0.92); }
.dg-chips { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dg-chips button.selected { background: linear-gradient(145deg, #FFDF40, #E6A100); color: #4A2800; border-color: #FFFFFF; }
.dg-roll { display: flex; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(180deg, #2ED85C 0%, #159B30 100%); color: #FFFFFF; box-shadow: 0 5px 0 #074E14, 0 8px 18px rgba(0, 0, 0, 0.4); font-size: 18px; letter-spacing: 0.5px; }

/* ============================================================ *
 * PLAY WITH FRIENDS (private rooms)
 * ============================================================ */
.friends-btn {
  margin-top: 12px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 18px;
  border: 2.5px solid #7DD3FC;
  background: linear-gradient(180deg, #38BDF8 0%, #0284C7 65%, #075985 100%);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 5px 0 #0C4A6E, 0 8px 18px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s, box-shadow 0.12s;
}
.friends-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #0C4A6E, 0 4px 10px rgba(0, 0, 0, 0.4); }

.auth-invite-hint {
  width: 100%;
  max-width: 380px;
  margin: 0 auto 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.16);
  border: 1.5px solid #7DD3FC;
  color: #E0F2FE;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.auth-invite-hint[hidden] { display: none; }

.screen.friends { align-items: center; padding: 60px 16px 84px; }
.fr-inner { width: 100%; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.screen.friends.active .fr-inner > * { animation: fxRise 0.45s cubic-bezier(0.2, 0.8, 0.3, 1) both; }

.fr-tabs { display: flex; gap: 8px; }
.fr-tabs[hidden] { display: none; }
.fr-tab {
  flex: 1;
  padding: 10px 4px;
  border-radius: 12px;
  border: 2px solid #2868BA;
  background: #0A3774;
  color: #CFE0FF;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.fr-tab.active { background: linear-gradient(145deg, #FFDF40, #E6A100); color: #4A2800; border-color: #FFFFFF; }
.fr-pane { display: none; flex-direction: column; gap: 12px; }
.fr-pane.active { display: flex; animation: fxRise 0.3s ease-out both; }

.fr-code-row { display: flex; gap: 8px; }
.fr-code-row input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid #2868BA;
  background: #062046;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 6px;
  text-align: center;
  text-transform: uppercase;
  outline: none;
}
.fr-code-row input:focus { border-color: var(--gold); }
.fr-code-row input::placeholder { color: #6E97D4; font-size: 15px; letter-spacing: 2px; }
.fr-code-row .big-btn { width: auto; margin: 0; padding: 12px 20px; }

.fr-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.3);
  border: 1.5px solid rgba(255, 215, 0, 0.35);
}
.fr-preview[hidden] { display: none; }
.fr-preview .big-btn { margin: 0; }
.frp-host { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #E2E8F0; }
.frp-host b { color: #FFFFFF; font-size: 16px; }
.frp-sub { font-size: 12px; color: var(--text-muted); }
.frp-avatar, .frs-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
  color: #4A2800;
  background: linear-gradient(145deg, #FFDF40, #E6A100);
  border: 2px solid #FFFFFF;
}
.fr-coin-warn {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 120, 120, 0.5);
  color: #FFD1D1;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.fr-coin-warn b { color: #FFFFFF; }

.fr-room-card {
  text-align: center;
  padding: 16px 14px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(56, 189, 248, 0.18), rgba(7, 37, 82, 0.9));
  border: 2px solid #7DD3FC;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.25);
}
.fr-label { font-size: 11px; font-weight: 800; letter-spacing: 2px; color: #BAE6FD; }
.fr-code {
  margin: 4px 0 6px;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 8px;
  color: #FFD700;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.fr-room-meta { display: flex; justify-content: center; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13px; color: #E0F2FE; margin-bottom: 12px; }
.fr-share { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fr-share .share-btn { justify-content: center; padding: 10px 4px; font-size: 13px; }

.fr-slots { display: flex; flex-direction: column; gap: 8px; }
.fr-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
}
.fr-slot.filled { border-color: rgba(74, 222, 128, 0.5); animation: fxPop 0.4s ease-out; }
.fr-slot.empty .frs-avatar { background: rgba(255, 255, 255, 0.08); color: #6E97D4; border: 2px dashed rgba(255, 255, 255, 0.25); animation: frWait 1.6s ease-in-out infinite; }
@keyframes frWait { 50% { opacity: 0.45; } }
.frs-name { flex: 1; font-weight: 700; color: #FFFFFF; font-size: 14px; }
.fr-slot.empty .frs-name { color: var(--text-muted); font-weight: 600; }
.frs-tag { font-size: 10px; font-weight: 900; padding: 2px 8px; border-radius: 8px; background: #FFD700; color: #4A2800; }
.frs-tag.ok { background: #22C55E; color: #FFFFFF; }
.fr-status { text-align: center; font-size: 13px; font-weight: 700; color: #BAE6FD; }
#btnLeaveRoom { margin: 0; }

/* ============================================================ *
 * FLOATING BUTTONS (Spin & Support) + HELP & SUPPORT
 * ============================================================ */
.fab-stack {
  position: absolute;
  right: 12px;
  bottom: 78px;
  z-index: 40;
  display: none;
  flex-direction: column;
  gap: 12px;
}
body[data-screen="home"] .fab-stack,
body[data-screen="account"] .fab-stack,
body[data-screen="wallet"] .fab-stack,
body[data-screen="refer"] .fab-stack { display: flex; }
.fab {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 3px solid #FFD700;
  cursor: pointer;
  font-size: 26px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s;
  animation: fabIn 0.4s cubic-bezier(0.2, 1.4, 0.5, 1) both;
}
.fab[hidden] { display: none; }
.fab:active { transform: scale(0.9); }
@keyframes fabIn { from { scale: 0.3; opacity: 0; } }
.fab-spin { background: radial-gradient(circle at 35% 30%, #C084FC, #7E22CE); }
.fab-spin.ready { animation: fabIn 0.4s both, fabGlow 1.8s ease-in-out 0.4s infinite; }
@keyframes fabGlow { 50% { box-shadow: 0 0 0 6px rgba(255, 215, 0, 0.35), 0 6px 18px rgba(0, 0, 0, 0.5); } }
.fab-wheel {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  background: conic-gradient(#E52521 0 60deg, #00A651 0 120deg, #FFD200 0 180deg, #009FE3 0 240deg, #A855F7 0 300deg, #FF7A00 0 360deg);
  animation: avatarSpin 6s linear infinite;
}
.fab-spin.ready .fab-wheel { animation-duration: 1.6s; }
.fab-support { background: radial-gradient(circle at 35% 30%, #67E8F9, #0E7490); }
.fab-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 11px;
  background: #E52521;
  border: 2px solid #FFFFFF;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 900;
  line-height: 16px;
  text-align: center;
}
.fab-badge[hidden] { display: none; }
.fab-spin .fab-badge { background: #FFD700; color: #4A2800; }

/* history rows with a report button */
.tx-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.tx-report {
  padding: 3px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 138, 138, 0.6);
  background: rgba(229, 37, 33, 0.14);
  color: #FFB4B4;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.hist-head { font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--gold); margin: 6px 2px 2px; text-transform: uppercase; }

/* support screen */
.screen.support { align-items: center; padding: 60px 16px 84px; }
.sp-inner { width: 100%; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.sp-view { display: none; flex-direction: column; gap: 10px; }
.sp-view.active { display: flex; animation: fxRise 0.3s ease-out both; }
.sp-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sp-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1.5px solid rgba(103, 232, 249, 0.4);
  background: linear-gradient(160deg, rgba(14, 116, 144, 0.5), rgba(7, 37, 82, 0.9));
  color: #FFFFFF;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.sp-cat span { font-size: 20px; }
.sp-cat:active { transform: scale(0.96); }
.sp-head { margin: 4px 2px 0; font-size: 14px; color: var(--gold); }
.sp-tickets { display: flex; flex-direction: column; gap: 8px; }
.sp-ticket {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: #FFFFFF;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.sp-ticket.unread { border-color: #4ADE80; box-shadow: 0 0 12px rgba(74, 222, 128, 0.3); }
.sp-ticket.closed { opacity: 0.6; }
.spt-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.spt-cat { color: #BAE6FD; font-weight: 700; }
.spt-status { padding: 2px 8px; border-radius: 8px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.spt-status.open { background: rgba(255, 215, 0, 0.18); color: #FFD54F; }
.spt-status.answered { background: rgba(74, 222, 128, 0.18); color: #4ADE80; }
.spt-status.closed { background: rgba(255, 255, 255, 0.1); color: #A3C0E8; }
.spt-subject { font-size: 14px; font-weight: 700; }
.spt-subject.big { font-size: 17px; margin-top: 4px; }
.spt-meta { font-size: 11px; color: var(--text-muted); }
.spt-meta b { color: #4ADE80; }

.sp-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-cats button {
  padding: 8px 12px;
  border-radius: 20px;
  border: 1.5px solid #2868BA;
  background: #0A3774;
  color: #CFE0FF;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.sp-cats button.selected { background: linear-gradient(145deg, #FFDF40, #E6A100); color: #4A2800; border-color: #FFFFFF; }
#spRequestWrap { display: flex; flex-direction: column; gap: 6px; }
#spRequestWrap[hidden] { display: none; }
#spNew select, #spNew input, #spNew textarea, .sp-reply textarea {
  width: 100%;
  background: #062046;
  border: 2px solid #2868BA;
  border-radius: 12px;
  color: #FFFFFF;
  padding: 11px 12px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  resize: vertical;
}
#spNew select:focus, #spNew input:focus, #spNew textarea:focus, .sp-reply textarea:focus { border-color: var(--gold); }
#spNew .big-btn, .sp-thread-actions .big-btn { margin: 0; }

.sp-thread-head { padding: 12px 14px; border-radius: 16px; background: rgba(0, 0, 0, 0.3); border: 1.5px solid rgba(103, 232, 249, 0.35); }
.sp-linked { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 215, 0, 0.1); font-size: 12px; color: #FFE9A3; }
.sp-msgs { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.sp-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.sp-msg.user { align-self: flex-end; background: linear-gradient(145deg, #1D6FD1, #0B4C9E); border-bottom-right-radius: 4px; }
.sp-msg.admin { align-self: flex-start; background: rgba(14, 116, 144, 0.45); border: 1px solid rgba(103, 232, 249, 0.4); border-bottom-left-radius: 4px; }
.spm-who { font-size: 10px; color: rgba(255, 255, 255, 0.7); margin-bottom: 3px; font-weight: 700; }
.spm-text { white-space: pre-wrap; word-break: break-word; color: #FFFFFF; }
.sp-reply { display: flex; gap: 8px; align-items: stretch; }
.sp-reply[hidden] { display: none; }
.sp-reply .big-btn { width: auto; margin: 0; padding: 0 18px; }
.sp-thread-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.big-btn.ghost.danger { color: #FFB4B4; border-color: rgba(255, 138, 138, 0.6); }
.big-btn[hidden] { display: none; }

/* Android app download */
.home-app-banner {
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 2px solid rgba(255, 215, 0, 0.5);
  background: linear-gradient(135deg, #1E3A8A 0%, #1D4ED8 55%, #0EA5E9 100%);
  color: #FFFFFF;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.4);
  z-index: 1;
}
.home-app-banner[hidden], .app-dl-link[hidden], .acc-option-item[hidden] { display: none; }
.home-app-banner:active { transform: scale(0.98); }
.hab-icon { flex: none; width: 46px; height: 46px; border-radius: 12px; overflow: hidden; border: 2px solid #FFD700; background: #08234B; }
.hab-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-dl-link {
  margin: 14px auto 0;
  display: block;
  padding: 10px 18px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 215, 0, 0.6);
  background: rgba(0, 0, 0, 0.3);
  color: #FFD700;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.app-dl-card { width: min(92vw, 360px); text-align: center; }
.app-dl-icon { width: 96px; height: 96px; object-fit: contain; border-radius: 18px; margin: 0 auto 6px; display: block; }
.app-dl-card h2 { color: var(--gold); font-size: 22px; margin: 0 0 6px; }
.app-dl-sub { color: #CFE0FF; font-size: 13px; margin: 0 0 14px; line-height: 1.5; }
.big-btn.app-dl-btn { display: block; text-decoration: none; background: linear-gradient(180deg, #2ED85C 0%, #159B30 100%); color: #FFFFFF; box-shadow: 0 5px 0 #074E14, 0 8px 18px rgba(0, 0, 0, 0.4); }
.app-dl-steps { text-align: left; margin: 8px 0 0; padding-left: 20px; color: #CFE0FF; font-size: 12.5px; line-height: 1.6; }
.app-dl-steps b { color: #FFFFFF; }

/* mobile OTP login */
.auth-tabs .auth-tab { min-width: 0; }
.otp-step { display: flex; flex-direction: column; gap: 12px; }
.otp-step[hidden] { display: none; }
.phone-wrap { display: flex; align-items: stretch; border: 2px solid #2868BA; border-radius: 12px; background: #062046; overflow: hidden; }
.phone-wrap:focus-within { border-color: var(--gold); }
.phone-cc { display: grid; place-items: center; padding: 0 12px; font-weight: 800; color: var(--gold); background: rgba(255, 215, 0, 0.1); border-right: 1px solid #2868BA; }
.auth-form .phone-wrap input { flex: 1; min-width: 0; border: 0; border-radius: 0; background: transparent; letter-spacing: 1px; }
.auth-form input.otp-code { text-align: center; font-size: 24px; font-weight: 900; letter-spacing: 10px; }
.auth-form input.otp-code::placeholder { letter-spacing: 1px; font-size: 15px; font-weight: 600; }
.otp-sent { margin: 0; font-size: 13px; color: #CFE0FF; text-align: center; }
.otp-sent b { color: #FFFFFF; }
.otp-link { background: none; border: 0; padding: 0; color: var(--gold); font-family: inherit; font-size: 13px; font-weight: 800; cursor: pointer; text-decoration: underline; }
.otp-link:disabled { color: #6E97D4; text-decoration: none; cursor: default; }
.otp-resend, #btnShowPwLogin, #btnShowOtpLogin { align-self: center; }

/* withdrawal: UPI or bank */
.payout-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.payout-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 2px solid #2868BA;
  background: #0A3774;
  color: #CFE0FF;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.payout-opt span { font-size: 20px; }
.payout-opt.selected { background: linear-gradient(145deg, #FFDF40, #E6A100); color: #4A2800; border-color: #FFFFFF; box-shadow: 0 0 14px rgba(255, 215, 0, 0.35); }
.payout-fields { display: flex; flex-direction: column; gap: 6px; }
.payout-fields[hidden] { display: none; }
.payout-saved { margin: 4px 0 0; font-size: 12px; color: #86EFAC; }
.payout-saved[hidden] { display: none; }

/* keep home content clear of the floating Spin / Support buttons */
.screen.home { padding-bottom: 210px; }
.screen.home > * { flex-shrink: 0; } /* scroll instead of squashing cards on short screens */

/* ============================================================ *
 * RECHARGE: UPI QR + payment screenshot
 * ============================================================ */
.upi-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(34, 197, 94, 0.16), rgba(7, 37, 82, 0.9));
  border: 2px solid rgba(74, 222, 128, 0.55);
  animation: fxRise 0.3s ease-out both;
}
.upi-qr-card[hidden] { display: none; }
.uq-title { font-size: 15px; font-weight: 800; color: #FFFFFF; }
.uq-title b { color: #4ADE80; font-size: 18px; }
.uq-qr {
  width: min(62vw, 220px);
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.uq-qr svg { width: 100%; height: 100%; display: block; }
.uq-upi { font-size: 13px; color: #CFE0FF; word-break: break-all; text-align: center; }
.uq-upi b { color: #FFFFFF; }
.big-btn.uq-pay {
  display: block;
  text-align: center;
  text-decoration: none;
  margin: 2px 0 0;
  background: linear-gradient(180deg, #2ED85C 0%, #159B30 100%);
  color: #FFFFFF;
  box-shadow: 0 5px 0 #074E14, 0 8px 18px rgba(0, 0, 0, 0.4);
}
.uq-note { margin: 0; font-size: 11.5px; line-height: 1.5; color: #BCD6F7; text-align: center; }
.uq-hint { margin-top: 8px; padding: 10px; border-radius: 12px; border: 1px dashed rgba(255, 255, 255, 0.25); font-size: 12.5px; color: #BCD6F7; text-align: center; }
.uq-hint[hidden] { display: none; }

.proof-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border-radius: 14px;
  border: 2px dashed #2868BA;
  background: #062046;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s;
}
.proof-drop:hover { border-color: var(--gold); }
.proof-drop.has-file { border-style: solid; border-color: #4ADE80; }
.proof-hint { font-size: 13px; color: #CFE0FF; line-height: 1.5; word-break: break-all; }
.proof-hint small { color: #6E97D4; }
#proofPreview { max-width: 100%; max-height: 220px; border-radius: 10px; object-fit: contain; background: #000; }
#proofPreview[hidden] { display: none; }
