:root {
  --bg-main: #07090e;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-border: rgba(99, 102, 241, 0.2);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  user-select: none;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.18) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(6, 182, 212, 0.12) 0%, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  padding-bottom: 75px;
  overflow-x: hidden;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 16px;
}

/* Header */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.brand-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.4), inset 0 0 8px rgba(99, 102, 241, 0.5);
  border: 1.5px solid rgba(6, 182, 212, 0.4);
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #fff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.balance-container {
  display: flex;
  align-items: center;
  gap: 6px;
}
.balance-pill {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 6px 12px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}
.balance-pill:hover {
  border-color: rgba(16, 185, 129, 0.6);
  transform: translateY(-1px);
}
.icon-usdt {
  width: 17px;
  height: 17px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.btn-top-deposit {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
  transition: transform 0.1s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-top-deposit:active {
  transform: scale(0.95);
}


/* 3D KUB SECTION */
.cube-section {
  position: relative;
  height: 135px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 700px;
  margin-bottom: 4px;
}
.cube-viewport {
  width: 74px;
  height: 74px;
  transform-style: preserve-3d;
  --cube-tilt-x: -20deg;
  --cube-start-y: 0deg;
  --cube-end-y: 360deg;
  animation: rotateCube 18s infinite linear;
  cursor: grab;
  touch-action: none;
}
.cube-viewport.dragging {
  cursor: grabbing;
}
@keyframes rotateCube {
  from { transform: rotateX(var(--cube-tilt-x)) rotateY(var(--cube-start-y)); }
  to { transform: rotateX(var(--cube-tilt-x)) rotateY(var(--cube-end-y)); }
}
.cube-face {
  position: absolute;
  width: 74px;
  height: 74px;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid var(--accent-indigo);
  box-shadow: inset 0 0 14px rgba(99, 102, 241, 0.35), 0 0 12px rgba(6, 182, 212, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}
.cube-face .face-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}
.cube-face .face-icon svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.6));
}
.cube-face .face-text {
  font-size: 10px;
  color: var(--accent-cyan);
  text-shadow: 0 0 6px var(--accent-cyan);
}
.cube-face.front  { transform: translateZ(37px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(37px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(37px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(37px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(37px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(37px); }

.cube-halo {
  position: absolute;
  width: 90px;
  height: 14px;
  bottom: 16px;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.6) 0%, transparent 70%);
  filter: blur(6px);
}
.cube-status-caption {
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}

/* Room Switcher Tabs */
.rooms-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.room-tab {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.room-tab.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(6, 182, 212, 0.15));
  border-color: var(--accent-indigo);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}
.room-tab .tab-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.tab-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}
.tab-price {
  font-size: 10.5px;
  color: var(--text-muted);
}
.tab-payout {
  font-size: 10.5px;
  font-weight: 700;
  color: #34d399;
}

/* Queue Live Card */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  backdrop-filter: blur(12px);
}
.card-header-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.card-title {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cycle-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Progress Bar */
.progress-container {
  margin-bottom: 12px;
}
.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, var(--accent-indigo), var(--accent-cyan));
  border-radius: 9999px;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* Queue Info Grid */
.queue-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
}
.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.stat-val {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.queue-boost-purchase-hint {
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -4px 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.08);
  color: #a7f3d0;
}
.queue-boost-purchase-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.queue-boost-purchase-title {
  font-size: 11px;
  font-weight: 800;
}
.queue-boost-purchase-note {
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.3;
}
.queue-boost-purchase-count {
  flex: 0 0 auto;
  min-width: 56px;
  padding: 4px 8px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}
.modal-queue-boost-hint { margin: -4px 0 12px; }

/* Action Button */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: #fff;
  border: none;
  padding: 13px 10px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
  transition: transform 0.1s ease, filter 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
#btnBuyText {
  white-space: nowrap;
}
.btn-primary:active {
  transform: scale(0.98);
  filter: brightness(1.15);
}

/* Turbo Loop Switch */
.reinvest-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}
.reinvest-text strong {
  display: block;
  font-size: 12px;
  color: #e9d5ff;
}
.reinvest-text span {
  font-size: 10px;
  color: #c084fc;
}
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--accent-purple);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}
input:checked + .slider:before {
  transform: translateX(20px);
}

/* Ticket List in TMA */
.ticket-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ticket-num {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.ticket-room {
  font-size: 10px;
  color: var(--text-muted);
}
.ticket-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
}
.badge-waiting { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-paid { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-reinvested { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }

/* Live Room Queue */
.my-queue-summary-box {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.my-queue-badge {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.3px;
}
.my-queue-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.my-ticket-pill {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.queue-list-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 2px;
}
.queue-list-container::-webkit-scrollbar {
  width: 4px;
}
.queue-list-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}
.queue-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}
.queue-item.is-my-ticket {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.22), rgba(99, 102, 241, 0.16)) !important;
  border: 1px solid rgba(56, 189, 248, 0.65) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25) !important;
}
.queue-item.is-head {
  border-left: 3px solid #f59e0b;
}
.queue-item.is-head.is-my-ticket {
  border-left: 3px solid #38bdf8 !important;
}
.queue-pos-badge {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  flex-shrink: 0;
}
.queue-pos-badge.pos-head {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #0b1120;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
}
.badge-you {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #030712;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}
.badge-next-payout {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(7, 9, 14, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
  z-index: 100;
  padding: 0 4px env(safe-area-inset-bottom, 0px);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 6px 12px;
  border-radius: 12px;
}
.nav-item:active {
  transform: scale(0.92);
}
.nav-item.active {
  color: #38bdf8;
}
.nav-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-icon svg {
  width: 24px;
  height: 24px;
  transition: all 0.2s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.nav-item.active .nav-icon {
  transform: translateY(-2px) scale(1.18);
}
.nav-item.active .nav-icon svg {
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.85));
}


/* Toast */
/* Toast */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(245, 158, 11, 0.6);
  color: #fff;
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.75), 0 0 20px rgba(245, 158, 11, 0.25);
  z-index: 99999999 !important;
  display: none;
  white-space: normal;
  word-break: break-word;
  max-width: calc(100vw - 32px);
  width: max-content;
  box-sizing: border-box;
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: none;
  animation: fadeInDown 0.2s ease-out;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Modal Sheet */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 500;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-sheet {
  background: #0b1120;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 580px;
  min-height: 80vh;
  max-height: 94vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 20px calc(45px + env(safe-area-inset-bottom, 20px));
  box-shadow: 0 -12px 50px rgba(0, 0, 0, 0.9);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }
  .modal-sheet {
    border-radius: 24px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.4);
    min-height: auto;
    max-height: 88vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}
.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}
.modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.deposit-methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
  width: 100%;
  box-sizing: border-box;
}
.method-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.method-card.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-indigo);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}
.method-icon {
  width: 34px;
  height: 34px;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.method-icon svg {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}
.title-icon-svg {
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -3px;
  margin-right: 6px;
  flex-shrink: 0;
}
.title-icon-svg svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.4));
}
.btn-icon-svg {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -3px;
  margin-right: 6px;
  flex-shrink: 0;
}
.btn-icon-svg svg {
  width: 100%;
  height: 100%;
}
.method-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.method-sub {
  font-size: 9px;
  color: var(--text-muted);
}

.wallet-box-wrap {
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 14px;
  text-align: center;
}
.wallet-addr-text {
  font-family: monospace;
  font-size: 11px;
  color: var(--accent-cyan);
  word-break: break-all;
  background: rgba(6, 182, 212, 0.08);
  padding: 8px;
  border-radius: 6px;
  margin: 8px 0;
}
.btn-copy-addr {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.tx-input {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12px;
  margin-bottom: 10px;
  outline: none;
}
.tx-input:focus {
  border-color: var(--accent-indigo);
}
.qr-preview {
  width: 130px;
  height: 130px;
  background: #fff;
  padding: 6px;
  border-radius: 8px;
  margin: 0 auto 10px;
  display: block;
}

.deposit-segmented-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}
.dep-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.dep-tab-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(6, 182, 212, 0.25));
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.25);
}

.hero-amount-box {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}
.hero-amount-box:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}
.hero-currency-prefix {
  font-size: 22px;
  font-weight: 800;
  color: #38bdf8;
  margin-right: 6px;
}
.hero-amount-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  outline: none;
  width: 100%;
}
.hero-currency-suffix {
  font-size: 13px;
  font-weight: 800;
  color: #94a3b8;
  margin-left: 6px;
}

.quick-preset-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.preset-pill {
  flex: 1;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 7px 0;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.preset-pill:hover, .preset-pill:active, .preset-pill.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #34d399;
  color: #34d399;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

/* =========================================================
   GAME MODE SEGMENTED SWITCHER & SCRATCH LOTTERY ARENA
   ========================================================= */

.game-mode-nav {
  display: flex;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 14px;
  gap: 6px;
}
.mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s ease;
}
.mode-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(6, 182, 212, 0.25));
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #fff;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.25);
}
.badge-pulse {
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  color: #fff;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 9999px;
  font-weight: 900;
  letter-spacing: 0.5px;
  animation: pulseBadge 1.5s infinite;
}
@keyframes pulseBadge {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.85; }
}

.scratch-arena {
  animation: fadeInScratch 0.25s ease;
}
@keyframes fadeInScratch {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.scratch-tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.scratch-tier-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.scratch-tier-card.active {
  border-color: #38bdf8;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.15));
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
  transform: translateY(-2px);
}
.scratch-tier-icon {
  font-size: 22px;
  margin-bottom: 2px;
}
.scratch-tier-name {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}
.scratch-tier-price {
  font-size: 12px;
  font-weight: 900;
  color: #34d399;
  margin-top: 2px;
}
.scratch-tier-max {
  font-size: 9px;
  color: #94a3b8;
  margin-top: 2px;
}

.scratch-ticket-container {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 210px;
  margin: 0 auto 16px auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: #0f172a;
}
.scratch-card-under {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 1) 0%, rgba(15, 23, 42, 1) 100%);
  z-index: 1;
}
.scratch-prize-label {
  font-size: 12px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.scratch-prize-val {
  font-size: 32px;
  font-weight: 900;
  color: #34d399;
  text-shadow: 0 0 20px rgba(52, 211, 153, 0.5);
  margin-bottom: 4px;
}
.scratch-prize-sub {
  font-size: 11px;
  color: #cbd5e1;
}
.scratch-card-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: crosshair;
  touch-action: none;
}
.scratch-progress-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 12px;
  padding: 0 4px;
}
.scratch-live-wins {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  margin-top: 16px;
}

/* Turbo Burst Widget */
.turbo-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  background: radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.12) 0%, rgba(17, 24, 39, 0.85) 70%) !important;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
  margin-top: 12px;
}
.turbo-fire-icon {
  font-size: 18px;
  animation: flamePulse 1.8s infinite alternate ease-in-out;
  display: inline-block;
}
@keyframes flamePulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px #f59e0b); }
  100% { transform: scale(1.18); filter: drop-shadow(0 0 8px #ef4444); }
}
.turbo-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.turbo-info-desc {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
  margin-top: 4px;
}
.turbo-countdown-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.turbo-countdown-item {
  display: flex;
  flex-direction: column;
}
.turbo-countdown-item .t-sub {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
}
.turbo-countdown-item .t-val {
  font-size: 13px;
  font-weight: 800;
  margin-top: 2px;
}

/* Scratch Queue Boost Mechanics */
.scratch-boost-pill {
  font-size: 8.5px;
  font-weight: 800;
  padding: 2.5px 4px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  margin-top: 5px;
  text-align: center;
  letter-spacing: 0.2px;
  line-height: 1.2;
}
.scratch-boost-pill.next-boost {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(245, 158, 11, 0.35));
  color: #fef08a;
  border: 1px solid rgba(239, 68, 68, 0.7);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
  animation: pulseBoostGlow 1.2s infinite alternate;
}
.scratch-user-boost-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 3px 5px;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.2;
}
.scratch-user-boost-count-value {
  flex: 0 0 auto;
  color: #ecfdf5;
  font-size: 10px;
  font-weight: 900;
}
@keyframes pulseBoostGlow {
  0% { transform: scale(0.96); box-shadow: 0 0 4px rgba(239, 68, 68, 0.3); }
  100% { transform: scale(1.03); box-shadow: 0 0 12px rgba(239, 68, 68, 0.8); }
}

.scratch-boost-bar {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  backdrop-filter: blur(8px);
}
.scratch-boost-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-bottom: 6px;
}
.scratch-boost-bar-title {
  color: #f59e0b;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}
.scratch-boost-bar-badge {
  font-weight: 800;
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.scratch-boost-track {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  height: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}
.scratch-boost-fill {
  background: linear-gradient(90deg, #f59e0b, #10b981);
  height: 100%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}
.scratch-boost-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
  font-size: 10px;
  color: #94a3b8;
}

/* Modal boost celebration */
.boost-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal 0.25s ease;
}
.boost-modal-overlay.active {
  display: flex !important;
}
.boost-modal-card {
  background: linear-gradient(145deg, #0f172a, #1e1b4b);
  border: 2px solid #f59e0b;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.45);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  animation: popInModal 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popInModal {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.boost-modal-icon {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 12px;
  animation: bounceBoostIcon 1s infinite alternate;
}
@keyframes bounceBoostIcon {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}
.boost-modal-title {
  font-size: 19px;
  font-weight: 900;
  color: #fef08a;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.boost-modal-text {
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.5;
  margin-bottom: 18px;
}
.boost-modal-btn {
  background: linear-gradient(135deg, #f59e0b, #06b6d4);
  color: #000;
  font-weight: 900;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
  transition: transform 0.15s ease;
}
.boost-modal-btn:active {
  transform: scale(0.97);
}

/* Badge for Queue Room Card */
.queue-room-boost-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  margin-top: 6px;
}
