/* ==========================================================================
   1. CSS CUSTOM PROPERTIES & RESET (PREMIUM FINTECH THEME)
   ========================================================================== */
:root {
  --color-bg-root: #040609;
  --color-bg-header: #0a0d14;
  --color-bg-panel: rgba(12, 16, 24, 0.7);
  --color-bg-input: #0f141e;
  --color-bg-game: #020305;
  --color-bg-nav: #0a0d14;

  --color-text-primary: #ffffff;
  --color-text-secondary: #8b9bb4;

  --color-accent-red: #ff2a4d;
  --color-accent-green: #00e773;
  --color-accent-gold: #ffd700;
  --color-accent-blue: #0077ff;
  --color-accent-ai: #b026ff;

  --color-tier-low: #00b4ff;
  --color-tier-mid: #b026ff;
  --color-tier-high: #ff2a4d;

  --color-border-main: rgba(255, 255, 255, 0.1);
  --color-border-light: rgba(255, 255, 255, 0.05);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-glow-blue: 0 4px 15px rgba(0, 119, 255, 0.3);

  --gradient-avatar: linear-gradient(135deg, #0077ff 0%, #00e773 100%);
  --font-family-sans: 'Inter', sans-serif;
  --font-family-mono: 'JetBrains Mono', monospace;

  --z-index-hud: 10;
  --z-index-header: 100;
  --z-index-nav: 200;
  --z-index-toast: 1000;
  --z-index-splash: 9999;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: var(--font-family-sans);
  background-color: var(--color-bg-root);
  color: var(--color-text-primary);
  overflow-x: hidden;
  padding-bottom: 90px;
  padding-top: 70px;
}
button,
input {
  outline: none;
  border: none;
  background: none;
  color: inherit;
  font-family: inherit;
}
button {
  cursor: pointer;
  transition: 0.1s;
}
button:active {
  transform: scale(0.97);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
::-webkit-scrollbar {
  display: none;
}

/* ==========================================================================
   2. SPLASH SCREEN
   ========================================================================== */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-root);
  z-index: var(--z-index-splash);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}
.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 20px;
  text-align: center;
}
.splash-text {
  font-family: var(--font-family-sans);
  font-size: 14px;
  font-weight: 800;
  color: var(--color-text-secondary);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.splash-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: pulse-img 2s infinite ease-in-out;
}
.splash-loader {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border-main);
  border-top-color: var(--color-accent-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-top: 10px;
}
.splash-hidden {
  opacity: 0;
  visibility: hidden;
}
@keyframes pulse-img {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   3. PREMIUM HEADER
   ========================================================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  padding: 0 20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-index-header);
  background: rgba(15, 20, 28, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  font-family: var(--font-family-sans);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.5px;
}
.brand .accent-text {
  color: var(--color-accent-red);
}

.desktop-nav {
  display: none;
  gap: 24px;
}
.desktop-nav-item {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-family-sans);
  color: var(--color-text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}
.desktop-nav-item:hover,
.desktop-nav-item.active {
  color: #fff;
}

/* User Balance Pill */
.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  padding: 5px 16px 5px 5px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  transition: background 0.2s;
}
.user-profile-widget:hover {
  background: rgba(0, 0, 0, 0.5);
}
.user-avatar-wrap {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gradient-avatar);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 119, 255, 0.3);
}
.user-balance-disp {
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font-family-mono);
  color: var(--color-accent-green);
}

/* ==========================================================================
   4. HOLOGRAPHIC GAME CANVAS
   ========================================================================== */
.app-main {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.history-ribbon {
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 8px;
  overflow-x: auto;
  white-space: nowrap;
  border: 1px solid var(--color-border-main);
}
.history-items {
  display: flex;
  gap: 8px;
}
.history-pill {
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-family-mono);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
}
.tier-low {
  color: var(--color-tier-low);
}
.tier-mid {
  color: var(--color-tier-mid);
}
.tier-high {
  color: var(--color-tier-high);
}

.game-screen {
  position: relative;
  height: 350px;
  background-color: var(--color-bg-game);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-main);
  overflow: hidden;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center center;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.9);
}
#engineCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-index-hud);
}

.hud-flight,
.hud-waiting {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
.hud-flight {
  top: 35%;
  z-index: calc(var(--z-index-hud) + 5);
  display: none;
}
.hud-flight.active {
  display: block;
}
.text-multiplier {
  font-size: 72px;
  font-weight: 900;
  font-family: var(--font-family-mono);
  line-height: 1;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
  letter-spacing: -2px;
  color: #fff;
}
.text-multiplier.crashed-state {
  color: var(--color-accent-red) !important;
  text-shadow: 0 0 15px rgba(255, 42, 77, 0.3);
}
.text-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--color-text-secondary);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 8px;
}

.hud-waiting {
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(4, 6, 9, 0.8);
  backdrop-filter: blur(4px);
  z-index: calc(var(--z-index-hud) + 2);
}
.hud-waiting.hidden {
  display: none;
}
.title-waiting {
  font-family: var(--font-family-sans);
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 16px;
  color: var(--color-text-primary);
}
.bar-track {
  width: 80%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0%;
  background: var(--color-accent-red);
  transition: width 0.1s linear;
}

/* ==========================================================================
   5. GLASSMORPHISM CONTROLS
   ========================================================================== */
.controls-wrapper {
  display: flex;
  gap: 8px;
}
.panel-bet {
  flex: 1;
  background: linear-gradient(
    135deg,
    rgba(15, 20, 30, 0.8),
    rgba(8, 10, 15, 0.9)
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-main);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.panel-bet.ai-active {
  border-color: var(--color-accent-ai);
  box-shadow: inset 0 0 20px rgba(176, 38, 255, 0.1);
}
.panel-bet.ai-active .controls-disabled {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(1);
}

.tabs-bet {
  display: flex;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-pill);
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.btn-tab {
  flex: 1;
  padding: 6px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-align: center;
}
.btn-tab.active {
  background: var(--color-bg-panel);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}
.btn-tab.active.ai-tab {
  color: var(--color-accent-ai);
}

.stepper-ui {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-md);
  padding: 4px;
  border: 1px solid var(--color-border-main);
}
.btn-step {
  width: 34px;
  height: 34px;
  font-size: 20px;
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
}
.input-bet-amount {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 900;
  color: var(--color-text-primary);
  font-family: var(--font-family-mono);
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
}

.grid-quick {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.btn-quick {
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-family-mono);
  font-weight: 800;
  color: var(--color-text-secondary);
  padding: 6px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}
.btn-quick:active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.auto-cashout-ui {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.auto-cashout-ui label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.auto-cashout-input {
  width: 60px;
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  font-family: var(--font-family-mono);
  font-weight: 800;
  font-size: 14px;
  text-align: right;
  outline: none;
}

/* Premium Action Buttons */
.btn-massive {
  width: 100%;
  min-height: 65px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  transition: all 0.1s ease;
  border: none;
}
.btn-massive.status-bet {
  background: linear-gradient(135deg, #0cce67, #33e25c);
  box-shadow: var(--shadow-glow-blue);
}
.btn-massive.status-cancel {
  background: linear-gradient(135deg, #ff416c, #ff2a4d);
  box-shadow: 0 4px 15px rgba(255, 42, 77, 0.3);
}
.btn-massive.status-cashout {
  background: linear-gradient(135deg, #ffdf00, #d4af37);
  color: #000;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}
.btn-massive.status-ai {
  background: linear-gradient(135deg, #c471ed, #b026ff);
  box-shadow: 0 4px 15px rgba(176, 38, 255, 0.3);
}
.btn-massive-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
  z-index: 2;
  font-family: var(--font-family-sans);
}
.btn-massive-sub {
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-family-mono);
  opacity: 0.9;
  z-index: 2;
}
.btn-massive:active {
  transform: translateY(2px);
  box-shadow: none;
}

/* ==========================================================================
   6. DATA TABLES (PREMIUM REDESIGN)
   ========================================================================== */
.panel-table {
  background: rgba(12, 16, 24, 0.5);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-main);
  overflow: hidden;
  margin-bottom: 20px;
  scroll-margin-top: 70px;
  margin-top: 12px;
}

.table-tabs {
  display: flex;
  background: rgba(8, 10, 15, 0.8);
}
.table-tab {
  flex: 1;
  padding: 14px 0;
  font-family: var(--font-family-sans);
  font-size: 12px;
  font-weight: 800;
  color: var(--color-text-secondary);
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
  background: transparent;
}
.table-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.02);
}
.table-tab.active {
  color: #fff;
  border-bottom: 2px solid var(--color-accent-red);
  background: rgba(255, 42, 77, 0.05);
}

.table-stats {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--color-border-main);
}
.stat-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-box.text-right {
  text-align: right;
}
.stat-label {
  font-family: var(--font-family-sans);
  font-size: 10px;
  color: var(--color-text-secondary);
  font-weight: 600;
  text-transform: uppercase;
}
.stat-value {
  font-family: var(--font-family-mono);
  font-size: 13px;
  color: #fff;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}
.table-core {
  width: 100%;
  min-width: 400px;
  border-collapse: collapse;
  text-align: right;
}
.table-core th {
  color: var(--color-text-secondary);
  font-size: 11px;
  font-family: var(--font-family-sans);
  font-weight: 700;
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-light);
}
.table-core td {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  font-family: var(--font-family-mono);
}
.table-core th:first-child,
.table-core td:first-child {
  text-align: left;
}
.tr-cashed td {
  color: var(--color-accent-green);
}
.tr-lost td {
  color: var(--color-text-secondary) !important;
  opacity: 0.5;
}
.tr-user {
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--color-accent-blue);
}

/* ==========================================================================
   7. PREMIUM MOBILE BOTTOM NAV
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 20, 28, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  z-index: var(--z-index-nav);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 65px;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
  color: var(--color-text-secondary);
  font-family: var(--font-family-sans);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
}
.nav-item svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  transition:
    transform 0.2s,
    fill 0.2s;
}
.nav-item.active {
  color: #fff;
}
.nav-item.active svg {
  fill: var(--color-accent-blue);
  transform: translateY(-2px);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--color-accent-blue);
  box-shadow: 0 2px 8px rgba(0, 119, 255, 0.6);
}

/* ==========================================================================
   8. MODERN AUTH BUTTONS & MODALS
   ========================================================================== */
.auth-buttons {
  display: flex;
  gap: 10px;
}
.btn-auth {
  font-family: var(--font-family-sans);
  text-transform: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s;
}
.btn-login {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-login:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
}
.btn-signup {
  background: var(--color-accent-blue);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 119, 255, 0.3);
}
.btn-signup:hover {
  transform: translateY(-1px);
  background: #0088ff;
  box-shadow: 0 6px 16px rgba(0, 119, 255, 0.5);
}

/* Premium Modal Overlays */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 9, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.premium-modal {
  background: rgba(15, 20, 28, 0.98) !important;
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border-main) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
  padding: 32px 24px 24px 24px !important;
  width: 90%;
  max-width: 360px;
  position: relative;
  transform: translateY(20px);
  transition: 0.3s ease;
}
.modal-overlay.active .premium-modal {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 24px;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover {
  color: #fff;
}

.modal-title {
  font-family: var(--font-family-sans);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 4px;
}
.modal-subtitle {
  font-family: var(--font-family-sans);
  color: var(--color-text-secondary);
  font-size: 13px;
  text-align: center;
  margin-bottom: 24px;
}

.form-error {
  display: none;
  background: rgba(255, 42, 77, 0.1);
  color: var(--color-accent-red);
  border: 1px solid rgba(255, 42, 77, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-family: var(--font-family-sans);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}
.form-group {
  margin-bottom: 16px;
}

/* Premium Inputs */
.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--color-bg-input) !important;
  border: 1px solid var(--color-border-main) !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-family-sans) !important;
  color: #fff !important;
  font-size: 14px;
  transition: all 0.3s ease;
}
.form-input::placeholder {
  color: var(--color-text-secondary);
}
.form-input:focus {
  border-color: var(--color-accent-blue) !important;
  background: rgba(0, 119, 255, 0.05) !important;
  box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.1);
}

/* Premium Action Buttons inside Modals */
.premium-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-family-sans);
  border-radius: var(--radius-md) !important;
  color: #fff !important;
  transition: all 0.2s;
  border: none;
  margin-top: 8px;
}
.bg-blue {
  background: var(--color-accent-blue) !important;
  box-shadow: var(--shadow-glow-blue);
}
.bg-blue:hover {
  background: #0088ff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 119, 255, 0.4);
}
.bg-green {
  background: var(--color-accent-green) !important;
  color: #000 !important;
}
.bg-red {
  background: rgba(255, 42, 77, 0.1) !important;
  color: var(--color-accent-red) !important;
  border: 1px solid rgba(255, 42, 77, 0.2);
}
.bg-dark-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer-link {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--color-text-secondary);
}
.modal-footer-link span {
  color: var(--color-accent-blue);
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s;
}
.modal-footer-link span:hover {
  color: #fff;
}

/* ==========================================================================
   9. USER PROFILE MODAL (NEW)
   ========================================================================== */
.profile-modal-content {
  padding: 32px 20px 20px 20px !important;
}
.profile-header-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}
.profile-avatar-large {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--gradient-avatar);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(0, 119, 255, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
}
.profile-username {
  font-family: var(--font-family-sans);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.profile-balance-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--color-border-main);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}
.balance-label {
  font-size: 12px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.balance-amount {
  font-family: var(--font-family-mono);
  font-size: 24px;
  font-weight: 900;
  color: var(--color-accent-green);
}

.profile-actions {
  display: flex;
  gap: 10px;
}
.profile-actions button {
  flex: 1;
  margin-top: 0;
}

/* ==========================================================================
   10. BOTTOM SHEETS & SWEETALERT
   ========================================================================== */
.premium-sheet {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  z-index: 9001;
  transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  background: rgba(15, 20, 28, 0.98) !important;
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px 20px 0 0 !important;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
}
.premium-sheet.active {
  bottom: 0;
}
.sheet-header {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-family-sans);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}
.sheet-close {
  font-size: 24px;
  color: var(--color-text-secondary);
  line-height: 1;
  cursor: pointer;
}

.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.menu-list li a {
  display: block;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  color: var(--color-text-primary);
  text-decoration: none;
  font-family: var(--font-family-sans);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}
.menu-list li a:active {
  background: rgba(255, 255, 255, 0.05);
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 50vh;
}
.chat-msg {
  font-family: var(--font-family-sans);
  font-size: 13px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: var(--radius-md);
}
.chat-author {
  font-weight: 800;
  color: var(--color-text-secondary);
  margin-right: 6px;
  margin-bottom: 4px;
  display: block;
  font-size: 11px;
  text-transform: uppercase;
}
.chat-input-area {
  display: flex;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.3);
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.chat-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-main);
  background: var(--color-bg-input);
  color: #fff;
  font-family: var(--font-family-sans);
  outline: none;
  font-size: 14px;
}
.chat-send {
  margin-left: 8px;
  padding: 0 20px;
  background: var(--color-accent-blue);
  color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-family: var(--font-family-sans);
}

div.cyber-swal-popup {
  border: 1px solid var(--color-border-main) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
  background: rgba(15, 20, 28, 0.95) !important;
  backdrop-filter: blur(15px) !important;
  -webkit-backdrop-filter: blur(15px) !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-family-sans) !important;
  padding: 10px 15px !important;
  color: #fff !important;
}
.cyber-swal-popup .swal2-timer-progress-bar {
  background: var(--color-accent-blue) !important;
  height: 3px !important;
}
.cyber-swal-popup .swal2-title {
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* ==========================================================================
   11. DESKTOP RESPONSIVE
   ========================================================================== */
@media (min-width: 992px) {
  body {
    padding-bottom: 20px;
    padding-top: 80px;
    display: flex;
    justify-content: center;
  }
  .app-header {
    height: 70px;
    padding: 0 40px;
  }
  .desktop-nav {
    display: flex;
    align-items: center;
    margin-left: 40px;
  }
  .bottom-nav {
    display: none;
  }
  .app-main {
    display: grid;
    grid-template-columns: 1fr 340px;
    grid-template-rows: auto auto 1fr;
    grid-gap: 20px;
    max-width: 1400px;
    width: 100%;
    padding: 20px;
  }
  .history-ribbon {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .game-screen {
    grid-column: 1;
    grid-row: 2;
    height: 500px;
  }
  .controls-wrapper {
    grid-column: 2;
    grid-row: 2;
    flex-direction: column;
    gap: 16px;
  }
  .panel-table {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 0;
    background: rgba(12, 16, 24, 0.3);
  }
  .premium-sheet {
    width: 400px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 16px 16px 0 0 !important;
    border: 1px solid var(--color-border-main) !important;
    border-bottom: none !important;
  }
}
