/* ========================================================
   BC GAME CRASH PREDICTOR & ANALYSIS ENGINE STYLES
   Designed with ultra-premium dark casino aesthetic
======================================================== */

:root {
  --bg-primary: #0d100f;
  --bg-card: #141716;
  --bg-elevated: #1a1e1d;
  --bg-input: #090b0a;
  
  --accent-green: #00e701;
  --accent-green-glow: rgba(0, 231, 1, 0.32);
  --accent-green-subtle: rgba(0, 231, 1, 0.09);
  
  --accent-orange: #f28b14;
  --accent-orange-glow: rgba(242, 139, 20, 0.35);
  --accent-orange-subtle: rgba(242, 139, 20, 0.09);
  
  --accent-gold: #f5b041;
  --accent-cyan: #00d4ff;
  --accent-red: #ea3943;

  --text-main: #f7f9f8;
  --text-muted: #99a1a8;
  --text-dark: #565d63;
  
  --border-light: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(0, 231, 1, 0.3);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 999px;
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html, body {
  background-color: var(--bg-primary);
  background-image: radial-gradient(1200px 500px at 50% -10%, rgba(0, 231, 1, 0.05), transparent 60%);
  background-repeat: no-repeat;
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
}

/* Main Container */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding-bottom: 24px;
}

/* ========================================================
   HEADER
======================================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(20, 23, 22, 0.92);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-light);
}

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

.menu-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
}
.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text-muted);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ========================================================
   SIDEBAR DRAWER
======================================================== */
.sidebar-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-drawer {
  position: fixed;
  top: 0; left: 0;
  width: 288px;
  height: 100vh;
  background: linear-gradient(180deg, #161919, #0d100f);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border-right: 1px solid var(--border-light);
  box-shadow: 6px 0 30px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
}
.sidebar-drawer.active {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-light);
}
.sidebar-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  letter-spacing: 0.3px;
}
.sidebar-close-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.sidebar-close-btn:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: transparent;
}

/* Profile Section */
.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 18px;
}
.profile-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d70b, #00a806);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 14px var(--accent-green-glow);
}
.avatar-letter {
  font-size: 1.3rem;
  font-weight: 800;
  color: #000;
}
.avatar-online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 2px solid #1a1c20;
  box-shadow: 0 0 6px var(--accent-green);
}
.profile-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.profile-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}
.profile-tag {
  font-size: 0.7rem;
  color: var(--accent-gold);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.sidebar-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 16px;
}

/* Menu Items */
.sidebar-menu-list {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  gap: 2px;
}
.sidebar-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 12px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}
.sidebar-menu-item:hover {
  background: var(--bg-elevated);
}
.sidebar-menu-item:active {
  background: rgba(0, 231, 1, 0.1);
}
.sidebar-item-icon {
  font-size: 1.2rem;
  width: 28px;
  text-align: center;
}
.sidebar-item-text {
  flex: 1;
  text-align: left;
}
.sidebar-item-arrow {
  color: var(--text-dark);
  font-size: 1.3rem;
  font-weight: 300;
}

/* Logout Button */
.sidebar-bottom {
  margin-top: auto;
  padding: 16px;
}
.sidebar-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #ea3943, #c0392b);
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(234, 57, 67, 0.3);
}
.sidebar-logout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(234, 57, 67, 0.45);
}
.sidebar-logout-btn:active {
  transform: translateY(0);
}
.logout-icon {
  font-size: 1.15rem;
}


.app-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-halloween-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 231, 1, 0.35));
}

.modal-halloween-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.mobile-promo-banner {
  margin-top: 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s;
}

.promo-banner-img {
  width: 100%;
  height: auto;
  display: block;
}

.mini-pumpkin {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 13px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.logo-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
}

.logo-accent, .brand-green {
  color: var(--accent-green);
}

.tag-pro {
  font-size: 0.58rem;
  font-weight: 800;
  background: linear-gradient(90deg, #ff8c00, #ff5100);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.network-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--accent-green);
  background: var(--accent-green-subtle);
  padding: 4px 9px;
  border-radius: var(--radius-full);
}

.pulse-indicator, .pulse-ring {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 1.6s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 9px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  font-family: var(--font-mono);
}

.live-count-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
}

/* ========================================================
   RECENT HISTORY PILLS BAR
======================================================== */
.recent-bar-container {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: #141518;
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
}

.recent-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: 1px;
  margin-right: 12px;
  white-space: nowrap;
}

.recent-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 2px;
  flex: 1;
}

.recent-pills::-webkit-scrollbar {
  display: none;
}

.hist-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
  animation: slideInChip 0.3s ease-out;
  border: 1px solid transparent;
}

@keyframes slideInChip {
  from { opacity: 0; transform: translateX(-15px) scale(0.85); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.hist-chip.high {
  background: rgba(0, 231, 1, 0.12);
  color: var(--accent-green);
  border-color: rgba(0, 231, 1, 0.25);
}

.hist-chip.low {
  background: rgba(242, 139, 20, 0.12);
  color: var(--accent-orange);
  border-color: rgba(242, 139, 20, 0.25);
}

.hist-chip .chip-id {
  font-size: 0.6rem;
  color: var(--text-dark);
  font-weight: 500;
}

/* ========================================================
   VIEW TABS
======================================================== */
.view-tabs {
  display: flex;
  background: var(--bg-card);
  margin: 12px 16px 8px;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.view-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-tab.active {
  background: var(--bg-elevated);
  color: var(--text-main);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* ========================================================
   MAIN CONTENT & TAB PANES
======================================================== */
.main-content {
  padding: 0 16px;
  flex: 1;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

/* ========================================================
   PAGE 1: GAME INTRO & RULES STYLES
======================================================== */
.app-page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.app-page.active {
  display: block;
}

.intro-heading-bar {
  text-align: center;
  margin: 10px 0 14px;
  padding: 4px 6px 12px;
}

.intro-heading-bar .sub-lead {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--accent-green);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}

.intro-heading-bar h2 {
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
}

/* Top Promo Banner */
.intro-top-banner {
  max-width: 380px;
  margin: 0 auto 10px;
  border: 1px solid rgba(175, 76, 255, 0.35);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}

.intro-banner-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Interactive Clickable Game Card */
.game-select-card {
  background: var(--bg-card);
  border: 1px solid rgba(175, 76, 255, 0.35);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
  max-width: 380px;
  margin: 0 auto 16px;
  position: relative;
}

.game-select-card:hover, .game-select-card:active {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 14px 40px rgba(138, 43, 226, 0.45);
  border-color: #00e701;
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0f0a1c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crash-card-img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.game-select-card:hover .crash-card-img {
  transform: scale(1.04);
}

.card-hover-overlay {
  position: absolute;
  bottom: 12px;
  background: rgba(0, 231, 1, 0.9);
  color: #052b00;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-weight: 900;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(0, 231, 1, 0.5);
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.96); opacity: 0.9; }
  50% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(0.96); opacity: 0.9; }
}

.card-info-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(13, 16, 15, 0.95);
  border-top: 1px solid var(--border-light);
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.game-badge {
  font-size: 0.62rem;
  font-weight: 800;
  background: #a855f7;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.card-live-players {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-green);
  background: rgba(0, 231, 1, 0.1);
  padding: 4px 8px;
  border-radius: var(--radius-full);
}

.green-live-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-green);
}

/* Rules Section */
.rules-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  border: 1px solid var(--border-light);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.rules-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.rules-icon {
  font-size: 1.6rem;
}

.rules-title-box h3 {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

.rules-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.rules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.rule-item {
  display: flex;
  gap: 12px;
  background: var(--bg-elevated);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.rule-num {
  width: 22px;
  height: 22px;
  background: var(--accent-green);
  color: #052600;
  font-weight: 900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.rule-item strong {
  display: block;
  font-size: 0.82rem;
  color: #fff;
  margin-bottom: 2px;
}

.rule-item p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.rule-item p b {
  color: var(--accent-green);
}

/* ========================================================
   COMING SOON 2-GRID GAMES SECTION
======================================================== */
.coming-soon-section {
  margin-top: 18px;
  margin-bottom: 24px;
}

.section-title-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.section-title-strip .fire-icon {
  font-size: 1.15rem;
}

.section-title-strip h3 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
  flex: 1;
  letter-spacing: 0.2px;
}

.badge-soon {
  font-size: 0.65rem;
  font-weight: 800;
  color: #f5b041;
  background: rgba(245, 176, 65, 0.15);
  border: 1px solid rgba(245, 176, 65, 0.35);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.games-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.locked-game-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.locked-game-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 176, 65, 0.5);
}

.locked-img-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  background: #111218;
  overflow: hidden;
}

.locked-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.7) saturate(0.9);
  transition: filter 0.3s, transform 0.3s;
}

.locked-game-card:hover .locked-card-img {
  filter: brightness(0.85);
  transform: scale(1.03);
}

.lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, rgba(14, 16, 22, 0.45) 0%, rgba(10, 11, 15, 0.8) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  backdrop-filter: blur(1.5px);
}

.lock-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.9));
}

.lock-text {
  font-size: 0.65rem;
  font-weight: 900;
  color: #ffc107;
  background: rgba(0, 0, 0, 0.85);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.8px;
  border: 1px solid rgba(255, 193, 7, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.locked-info-strip {
  padding: 8px 10px;
  background: rgba(9, 11, 10, 0.85);
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-light);
}

.locked-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.locked-sub {
  font-size: 0.65rem;
  color: var(--text-dark);
  font-weight: 600;
}

/* Back Navigation in Page 2 */
.back-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 4px 2px;
}

.btn-back-arrow {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.btn-back-arrow:hover {
  background: var(--bg-elevated);
  color: #fff;
  border-color: var(--accent-green);
  transform: translateY(-1px);
}

.btn-back-arrow:active {
  transform: translateY(0) scale(0.97);
}

.btn-back-arrow .back-icon {
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn-back-arrow:hover .back-icon {
  transform: translateX(-3px);
}

.game-tag-active {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--accent-green);
  background: rgba(0, 231, 1, 0.08);
  border: 1px solid rgba(0, 231, 1, 0.3);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 1px;
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* ========================================================
   TOP DEDICATED PREDICTION BAR (SET SEPARATELY ABOVE GRAPH)
======================================================== */
.top-prediction-bar {
  background: linear-gradient(180deg, rgba(0, 231, 1, 0.05) 0%, rgba(0, 0, 0, 0) 40%), var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 231, 1, 0.22);
  padding: 12px 14px;
  margin: 10px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.top-pred-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pred-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-radar {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 1.4s infinite ease-in-out;
}

.pred-heading {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.pred-accuracy-pill {
  font-size: 0.58rem;
  font-weight: 800;
  color: var(--accent-green);
  background: var(--accent-green-subtle);
  border: 1px solid rgba(0, 231, 1, 0.25);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.top-pred-metrics {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
}

.pred-metric-box {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pred-metric-box.main-target {
  background: var(--accent-green-subtle);
  border: 1px solid rgba(0, 231, 1, 0.35);
}

.metric-lbl {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  margin-top: 2px;
}

.main-target .metric-val {
  color: var(--accent-green);
  text-shadow: 0 0 12px var(--accent-green-glow);
}

.text-gold {
  color: var(--accent-gold);
}

.text-cyan {
  color: var(--accent-cyan);
  font-size: 0.95rem;
}

/* ========================================================
   GRAPH CARD (MATCHES BC.GAME CLASSIC CRASH)
======================================================== */
.graph-card {
  background: radial-gradient(circle at 60% 30%, #161b1a 0%, #0d100f 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* Halloween Hanging Decoration */
.halloween-decor {
  position: absolute;
  top: 0;
  right: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  animation: swing 3.5s ease-in-out infinite alternate;
  transform-origin: top center;
}

.halloween-decor .rope {
  width: 2px;
  height: 28px;
  background: rgba(255, 140, 0, 0.5);
}

.halloween-decor .pumpkin-avatar {
  font-size: 34px;
  filter: drop-shadow(0 4px 10px rgba(255, 120, 0, 0.6));
}

@keyframes swing {
  0% { transform: rotate(-6deg); }
  100% { transform: rotate(6deg); }
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  height: 340px;
}

#crash-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Prediction Chip right inside Graph */
.graph-prediction-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 18, 23, 0.88);
  border: 1px solid rgba(0, 231, 1, 0.4);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: #fff;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.graph-prediction-chip b {
  color: var(--accent-green);
  font-size: 1rem;
  font-family: var(--font-mono);
}

.graph-prediction-chip .safe-tag {
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(245, 176, 65, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.glow-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
}

/* Center multiplier overlay */
.multiplier-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.multiplier-number {
  font-family: var(--font-main);
  font-size: 3.8rem;
  font-weight: 900;
  color: var(--accent-green);
  text-shadow: 0 0 25px var(--accent-green-glow);
  letter-spacing: -1px;
  line-height: 1;
  transition: color 0.2s;
}

.multiplier-number.crashed {
  color: var(--accent-red);
  text-shadow: 0 0 25px rgba(234, 57, 67, 0.6);
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

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

.status-indicator {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
}

/* Axis Labels */
.axis-y {
  position: absolute;
  left: 12px;
  top: 15px;
  bottom: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dark);
  font-family: var(--font-mono);
  pointer-events: none;
}

.axis-x {
  position: absolute;
  bottom: 6px;
  left: 36px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-dark);
  font-family: var(--font-mono);
  pointer-events: none;
}

.graph-footer-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(19, 20, 23, 0.75);
  border-top: 1px solid var(--border-light);
  font-size: 0.75rem;
}

.round-id-tag .label, .hash-tag .label {
  color: var(--text-dark);
  margin-right: 6px;
}
.round-id-tag .val {
  color: var(--text-main);
  font-weight: 600;
}
.hash-tag .mono {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

/* ========================================================
   AI PREDICTION CONTROL PANEL & DIRECT NEXT BET DISPLAY
======================================================== */
.prediction-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-top: 14px;
  border: 1px solid var(--border-light);
}

.highlighted-panel {
  background: linear-gradient(180deg, #1d212b 0%, #15171d 100%);
  border: 1px solid rgba(0, 231, 1, 0.25);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.main-pred-display {
  text-align: center;
  padding: 16px 12px;
  background: #101115;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 14px;
}

.pred-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.pred-giant-mult {
  font-family: var(--font-main);
  font-size: 3.4rem;
  font-weight: 900;
  color: var(--accent-green);
  text-shadow: 0 0 20px var(--accent-green-glow);
  line-height: 1.1;
  margin: 6px 0 10px;
}

.pred-details-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pred-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  border: 1px solid var(--border-light);
}

.pred-pill .p-title {
  color: var(--text-muted);
  font-weight: 700;
}

.pred-pill .p-val {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #fff;
}

.pred-pill.safe .p-val {
  color: var(--accent-gold);
}

.pred-pill.chance .p-val {
  color: var(--accent-cyan);
}

.pred-pill.risk .p-val {
  color: var(--accent-green);
}

.giant-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 24px;
}

.btn-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.btn-col .btn-text {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.btn-col .btn-subtext {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.85;
}

.pred-stat-box {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pred-stat-box.primary-glow {
  background: linear-gradient(145deg, #242933, #1c2029);
  border: 1px solid rgba(0, 231, 1, 0.3);
  box-shadow: inset 0 0 16px rgba(0, 231, 1, 0.08);
}

.stat-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 900;
  font-family: var(--font-mono);
  margin: 4px 0 2px;
}

.accent-green {
  color: var(--accent-green);
  text-shadow: 0 0 12px var(--accent-green-glow);
}
.accent-gold {
  color: var(--accent-gold);
}
.accent-cyan {
  color: var(--accent-cyan);
}

.stat-hint, .stat-sub {
  font-size: 0.62rem;
  color: var(--text-dark);
}

/* Algo progress animation */
.algo-progress-wrap {
  margin: 10px 0;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  height: 22px;
}

.algo-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00b000, #00e701, #45ff45);
  border-radius: var(--radius-full);
  transition: width 0.2s linear;
  box-shadow: 0 0 10px var(--accent-green);
}

.algo-status-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Buttons */
.action-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ========================================================
   CLEAN ACTION CONTAINER & BC.GAME STYLE BET BUTTON
======================================================== */
.clean-action-container {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.btn-bc-bet {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #00e701, #00a806);
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  color: #041b00;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 231, 1, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
  overflow: hidden;
}

.btn-bc-bet:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0, 231, 1, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-bc-bet:active {
  transform: scale(0.98) translateY(0);
  box-shadow: 0 4px 12px rgba(0, 231, 1, 0.3);
}

.btn-main-text {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.btn-sub-label {
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.85;
  margin-top: 3px;
  letter-spacing: 0.3px;
}

.btn-predict-action:active {
  transform: scale(0.98);
}

.btn-predict-action .btn-subtext {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.85;
}

.btn-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: buttonSweep 3s infinite;
}

@keyframes buttonSweep {
  0% { left: -100%; }
  30% { left: 100%; }
  100% { left: 100%; }
}

.btn-secondary-action {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary-action:hover {
  background: #2e323e;
}

/* ========================================================
   ANALYSIS & COMBO SCREEN (MATCHES 2ND SCREENSHOT)
======================================================== */
.analysis-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--border-light);
}

.analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.analysis-title h3 {
  font-size: 1.05rem;
  font-weight: 800;
}
.analysis-title .sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.payout-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.payout-filter input {
  width: 44px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: #fff;
  text-align: center;
  padding: 4px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.btn-small {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Range Table */
.range-table-wrapper {
  margin-bottom: 20px;
}

.range-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.range-table th {
  padding: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: #2b2f3a;
  font-weight: 600;
}

.range-table td {
  padding: 12px 10px;
  font-size: 0.85rem;
  border-top: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-weight: 700;
}

.range-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 800;
}
.range-pill.low {
  background: rgba(242, 139, 20, 0.2);
  color: var(--accent-orange);
}
.range-pill.high {
  background: rgba(0, 231, 1, 0.2);
  color: var(--accent-green);
}

/* Ladder Zig-zag Node Chart */
.ladder-container {
  background: #141519;
  border-radius: var(--radius-md);
  padding: 14px 10px;
  border: 1px solid var(--border-light);
  position: relative;
}

.ladder-columns-header {
  display: grid;
  grid-template-columns: 110px 1fr 1fr;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.ladder-body {
  position: relative;
  margin-top: 8px;
}

.ladder-row {
  display: grid;
  grid-template-columns: 110px 1fr 1fr;
  align-items: center;
  min-height: 44px;
  position: relative;
}

.ladder-issue {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: left;
  padding-left: 8px;
}

.ladder-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ladder-badge {
  padding: 4px 16px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.ladder-badge.high {
  background: #00e701;
  color: #052900;
}

.ladder-badge.low {
  background: #f28b14;
  color: #2b1100;
}

/* SVG Line Overlay inside Ladder */
#ladder-svg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ========================================================
   HISTORY LOG TAB
======================================================== */
.log-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--border-light);
}

.log-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.table-responsive {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.history-table th {
  text-align: left;
  padding: 10px;
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.history-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-mono);
}

.badge-pill {
  background: var(--accent-green-subtle);
  color: var(--accent-green);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
}

/* ========================================================
   BOTTOM NAVIGATION BAR (MOBILE APP FEEL)
======================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 900px;
  margin: 0 auto;
  background: rgba(26, 28, 33, 0.96);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-around;
  padding: 8px 12px 10px;
  z-index: 40;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text-dark);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-item .nav-icon {
  font-size: 1.25rem;
}

.nav-item.active {
  color: var(--accent-green);
}

/* ========================================================
   STAGE 2 & STAGE 3: FULLSCREEN SPLASH & POSTER SCREENS
======================================================== */
.fullscreen-splash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #000;
  z-index: 1000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.4s ease;
}

.splash-content {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
}

.splash-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.splash-loader-box {
  position: absolute;
  bottom: 45px;
  left: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.splash-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.splash-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00b000, #00e701, #6aff6a);
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px var(--accent-green);
  transition: width 0.08s linear;
}

.splash-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

#splash-percent-txt {
  color: var(--accent-green);
  font-family: var(--font-mono);
}

/* Stage 2.4 Halloween Poster */
.halloween-poster-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.halloween-poster-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#halloween-poster-screen .poster-floating-action {
  position: fixed; /* Container ke bahar bhi hamesha visible */
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: 78%;
  max-width: 300px;
  z-index: 50;
}

#splash-poster-screen .poster-floating-action {
  position: fixed; /* Container ke bahar bhi hamesha visible */
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: 78%;
  max-width: 300px;
  z-index: 50;
}

#splash-poster-screen .poster-loading-text,
#splash-poster-screen .poster-loading-wrap {
  position: static;
}

#halloween-poster-screen .btn-main-text {
  font-size: 0.95rem;
}

/* Stage 3 Poster */
.poster-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}

.poster-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.poster-floating-action {
  position: absolute;
  bottom: 30px;
  left: 20px;
  right: 20px;
  z-index: 10;
}

/* 5s Loading wait before Enter button appears */
.poster-loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 0 12px;
}

.poster-loader {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(0, 231, 1, 0.18);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.poster-loading-text {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  animation: pulse 1.6s infinite;
}

.btn-enter-hub {
  box-shadow: 0 10px 30px rgba(0, 231, 1, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ========================================================
   MODALS (TERMS & CONDITIONS + SHARE APK)
======================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  z-index: 100;
  padding: 16px;
  animation: fadeIn 0.3s ease;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-top: 2px solid rgba(0, 231, 1, 0.35);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  margin: auto; /* Chhoti screen pe scroll karke center */
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 231, 1, 0.06);
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 900;
}
.bc-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
}

.badge-vip {
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--accent-green);
  background: var(--accent-green-subtle);
  border: 1px solid rgba(0, 231, 1, 0.25);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.8px;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.modal-body h3 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-bottom: 4px;
}
.terms-lead {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.terms-scrollbox {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  max-height: 190px;
  overflow-y: auto;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.term-item {
  display: flex;
  gap: 10px;
  font-size: 0.74rem;
  line-height: 1.45;
}
.term-item .term-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  background: var(--accent-green-subtle);
  border: 1px solid rgba(0, 231, 1, 0.2);
  border-radius: 8px;
}
.term-item strong {
  display: block;
  color: var(--text-main);
  font-size: 0.78rem;
  margin-bottom: 2px;
}
.term-item p {
  color: var(--text-muted);
  line-height: 1.45;
}

/* Checkbox */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-main);
  margin-bottom: 18px;
}

.checkbox-container input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-green);
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #00d70b, #00a806);
  border: none;
  border-radius: 10px;
  padding: 12px;
  color: #041b00;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
}

/* Share APK info */
.apk-icon-box {
  font-size: 40px;
  margin-bottom: 10px;
}
.install-steps {
  text-align: left;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.step-num {
  width: 20px;
  height: 20px;
  background: var(--accent-green);
  color: #062400;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.w-full { width: 100%; }
.mt-3 { margin-top: 12px; }
.text-center { text-align: center; }

/* ========================================================
   BASE FOOTER AWARDS & TRUST BADGES
======================================================== */
.footer-awards-card {
  margin-top: 18px;
  margin-bottom: 20px;
  background: #121316;
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}

.awards-banner-wrap {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #18191e;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.awards-banner-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

.trust-partners-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-items: center;
}

.partner-logo-box {
  background: #181a20;
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.partner-logo-img {
  max-width: 100%;
  max-height: 24px;
  object-fit: contain;
  opacity: 0.85;
}

.footer-legal-text {
  font-size: 0.68rem;
  color: var(--text-dark);
  line-height: 1.5;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 10px;
}

.footer-legal-text span {
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

/* ========================================================
   ULTRA-POLISHED MOBILE RESPONSIVE ENGINE (320px - 480px)
======================================================== */
@media (max-width: 480px) {
  .app-container {
    padding-bottom: 20px;
  }

  .app-header {
    padding: 10px 12px;
  }

  .header-halloween-logo {
    height: 24px;
  }

  .tag-pro {
    font-size: 0.58rem;
    padding: 1px 4px;
  }

  /* Compact header stats on small mobile */
  .stat-badge {
    display: none; /* Hide player count text on narrow screens to keep header clean */
  }

  .network-badge {
    padding: 3px 8px;
    font-size: 0.7rem;
  }

  .main-content {
    padding: 0 10px;
  }

  /* Page 1 Mobile Adaptations */
  .intro-heading-bar h2 {
    font-size: 1.1rem;
  }

  .intro-top-banner {
    max-width: 100%;
    margin-bottom: 8px;
  }

  .intro-banner-img {
    max-height: 175px;
    object-fit: cover;
    object-position: center;
  }

  .game-select-card {
    max-width: 100%;
    margin-bottom: 12px;
  }

  .crash-card-img {
    max-height: 220px;
  }

  .card-info-strip {
    padding: 10px 12px;
  }

  .rules-card {
    padding: 14px 12px;
  }

  .rule-item {
    padding: 8px 10px;
    gap: 10px;
  }

  /* Coming Soon 2-Grid Mobile */
  .games-grid-2col {
    gap: 8px;
  }

  .locked-img-wrap {
    height: 135px;
  }

  .locked-title {
    font-size: 0.76rem;
  }

  .lock-icon {
    font-size: 1.25rem;
  }

  .lock-text {
    font-size: 0.58rem;
    padding: 2px 6px;
  }

  /* Top Prediction Card Mobile */
  .top-prediction-bar {
    padding: 10px;
    margin: 8px 0;
  }

  .pred-heading {
    font-size: 0.72rem;
  }

  .pred-accuracy-pill {
    font-size: 0.6rem;
    padding: 1px 6px;
  }

  .top-pred-metrics {
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 6px;
  }

  .pred-metric-box {
    padding: 6px 4px;
  }

  .metric-lbl {
    font-size: 0.56rem;
  }

  .metric-val {
    font-size: 1.15rem;
  }

  .text-cyan {
    font-size: 0.8rem;
  }

  /* Graph adaptations */
  .graph-card {
    border-radius: var(--radius-md);
  }

  .canvas-wrapper {
    height: 260px; /* Optimal height for mobile */
  }

  .halloween-decor .pumpkin-avatar {
    font-size: 26px;
  }
  .halloween-decor .rope {
    height: 18px;
  }

  /* Prediction Chip inside Graph on Mobile */
  .graph-prediction-chip {
    padding: 4px 10px;
    font-size: 0.72rem;
    gap: 6px;
    max-width: 95%;
    flex-wrap: wrap;
    justify-content: center;
  }

  .graph-prediction-chip b {
    font-size: 0.88rem;
  }

  .graph-prediction-chip .safe-tag {
    font-size: 0.68rem;
    padding: 1px 6px;
  }

  .multiplier-number {
    font-size: 3rem;
  }

  .status-indicator {
    font-size: 0.72rem;
    letter-spacing: 1px;
  }

  .graph-footer-stats {
    padding: 8px 12px;
    font-size: 0.7rem;
  }

  /* Bet Button Mobile */
  .btn-bc-bet {
    padding: 14px 16px;
    border-radius: var(--radius-md);
  }

  .btn-main-text {
    font-size: 0.95rem;
    letter-spacing: 0.6px;
  }

  .btn-sub-label {
    font-size: 0.65rem;
  }

  /* Back Nav Mobile */
  .btn-back-arrow {
    padding: 6px 11px;
    font-size: 0.66rem;
    gap: 5px;
  }

  .game-tag-active {
    font-size: 0.54rem;
    padding: 5px 9px;
    letter-spacing: 0.6px;
  }

  /* Mobile Promo Banner */
  .mobile-promo-banner {
    margin-top: 12px;
    border-radius: var(--radius-md);
  }

  /* Footer Trust Section Mobile */
  .footer-awards-card {
    margin-top: 14px;
    margin-bottom: 16px;
    padding: 12px 10px;
    border-radius: var(--radius-md);
    gap: 10px;
  }

  .trust-partners-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .partner-logo-box {
    padding: 8px 6px;
    min-height: 42px;
  }

  .partner-logo-img {
    max-height: 20px;
  }

  .footer-legal-text {
    font-size: 0.62rem;
    padding-top: 8px;
  }

  /* Bottom Navigation */
  .bottom-nav {
    padding: 6px 10px 8px;
  }

  .nav-item {
    font-size: 0.68rem;
  }
  .nav-item .nav-icon {
    font-size: 1.15rem;
  }

  /* Modal Mobile */
  .modal-card {
    padding: 18px 14px;
    max-width: 95%;
  }

  .modal-halloween-logo {
    height: 28px;
  }

  .modal-body h3 {
    font-size: 1rem;
  }

  .terms-scrollbox {
    max-height: 160px;
    padding: 10px;
  }
}

/* ========================================================
   ALLOW BUTTON (Terms Modal)
======================================================== */
.btn-allow-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #00d70b, #00a806);
  color: #041b00;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 231, 1, 0.28);
  position: relative;
  overflow: hidden;
}
.btn-allow-action::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: allowShimmer 2s infinite;
}
@keyframes allowShimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}
.btn-allow-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px var(--accent-green-glow);
}
.btn-allow-action:active {
  transform: translateY(0);
}
.arrow-icon {
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}
.btn-allow-action:hover .arrow-icon {
  transform: translateX(4px);
}

/* ========================================================
   STAGE 1: FULLSCREEN SPLASH (9:16 FULL FRAME & SPINNER)
======================================================== */
.fullscreen-splash {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* Phone browser address bar fix */
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.splash-frame-916 {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 460px;
  max-height: 100vh;
  max-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000000;
}

.splash-main-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100vh;
  max-height: 100dvh;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 0 16px;
  box-sizing: border-box;
}

.splash-spinner-box {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.splash-spinner {
  width: 52px;
  height: 52px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: #00e701;
  border-right-color: #00e701;
  border-radius: 50%;
  animation: splashCircleSpin 0.85s linear infinite;
  box-shadow: 0 0 20px rgba(0, 231, 1, 0.6);
}

@keyframes splashCircleSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========================================================
   STAGE 3: POSTER WELCOME SCREEN
======================================================== */
.poster-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 460px;
  max-height: 100vh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  animation: posterSlideIn 0.5s ease-out;
}

@keyframes posterSlideIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.poster-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
  box-shadow: none;
}

.poster-floating-action {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 78%;
  max-width: 290px;
  z-index: 10;
}

.btn-enter-hub {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--accent-green), #00c406, #00ff88);
  color: #000;
  font-family: var(--font-main);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 22px var(--accent-green-glow);
  transition: all 0.25s ease;
  animation: enterPulse 2s ease-in-out infinite;
}

@keyframes enterPulse {
  0%, 100% { box-shadow: 0 4px 18px var(--accent-green-glow); }
  50% { box-shadow: 0 6px 30px rgba(0, 231, 1, 0.65); }
}

.btn-enter-hub .btn-glow {
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: allowShimmer 2.5s infinite;
}

.btn-enter-hub .btn-main-text {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.btn-enter-hub .btn-sub-label {
  display: none;
}

.btn-enter-hub:hover {
  transform: translateY(-2px);
}
.btn-enter-hub:active {
  transform: translateY(0);
}

/* Mobile adjustments for splash */
@media (max-width: 480px) {
  .splash-frame-916 {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
  }
  .splash-main-img {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    object-fit: contain;
    padding: 0 6px;
    box-sizing: border-box;
  }
  .splash-spinner-box {
    bottom: 18%; /* Gesture bar zone se upar */
  }
  .poster-container {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
  }
  .poster-main-img {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
  .halloween-poster-img {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    object-fit: cover; /* Photo poore phone ko bharti hai, black bars nahi */
  }
  .poster-floating-action {
    bottom: 4%;
    width: 76%;
    max-width: 260px;
  }
  .btn-enter-hub {
    padding: 10px 18px;
    border-radius: 25px;
  }
  .btn-enter-hub .btn-main-text {
    font-size: 0.85rem;
  }
}

/* ========================================================
   VIP USER PROFILE MODAL
======================================================== */
/* ========================================================
   MY PROFILE — FULL PAGE LAYOUT (NO BOX CARD)
======================================================== */
#profile-modal.modal-overlay {
  padding: 0;
  align-items: stretch;
  background: rgba(13, 16, 15, 0.98);
  overflow-y: auto;
  z-index: 300; /* Sidebar drawer (210) ke UPAR */
}

#profile-modal .profile-modal-card {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  min-height: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  border-top: none;
  box-shadow: none;
  padding: 0;
}

#profile-modal .modal-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(13, 16, 15, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  margin: 0;
  padding: 14px 20px;
}

#profile-modal .modal-body {
  padding: 20px 20px 32px;
}

#profile-modal .modal-close {
  font-size: 1.15rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
}

#profile-modal .modal-close:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.profile-modal-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 0 20px;
  border-bottom: 1px solid var(--border-light);
}

.profile-modal-avatar {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-green), #00c406);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 24px var(--accent-green-glow);
  outline: 2px solid rgba(0, 231, 1, 0.35);
  outline-offset: 3px;
}

.avatar-big-letter {
  font-size: 1.8rem;
  font-weight: 900;
  color: #000;
}

.avatar-vip-tag {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #f1a80a;
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  border: 2px solid #0d100f;
  z-index: 1;
}

.profile-modal-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-username {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.profile-level-badge {
  font-size: 0.8rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.profile-status-online {
  font-size: 0.75rem;
  color: var(--accent-green);
  font-weight: 500;
}

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

.profile-stat-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

@media (min-width: 640px) {
  .profile-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.profile-stat-box .stat-num {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
}

.profile-stat-box .stat-num.text-green {
  color: var(--accent-green);
}

.profile-stat-box .stat-num.text-gold {
  color: var(--accent-gold);
}

.profile-stat-box .stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-info-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 4px 0 20px;
}

.profile-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  padding: 13px 2px;
  border-bottom: 1px solid var(--border-light);
}

.profile-info-item .info-label {
  color: var(--text-muted);
}

.profile-info-item .info-val {
  color: var(--text-main);
  font-weight: 600;
}

.profile-actions-strip {
  margin-top: 6px;
}

/* ========================================================
   SUPPORT AI CHAT — FULL PAGE LAYOUT
======================================================== */
#support-modal.modal-overlay {
  padding: 0;
  align-items: stretch;
  background: rgba(13, 16, 15, 0.98);
  overflow: hidden;
  z-index: 300; /* Sidebar drawer (210) ke UPAR */
}

#support-modal .support-chat-card {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh; /* Mobile browser URL bar ke liye */
  max-height: none;
  background: transparent;
  border: none;
  border-radius: 0;
  border-top: none;
  box-shadow: none;
  padding: 0;
}

#support-modal .chat-header {
  background: rgba(13, 16, 15, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 20px;
}

#support-modal .modal-close {
  font-size: 1.05rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
}

#support-modal .modal-close:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

#support-modal .chat-messages {
  background: transparent;
  padding: 16px 20px;
}

#support-modal .chat-quick-chips {
  background: rgba(13, 16, 15, 0.92);
  padding: 10px 20px;
}

#support-modal .chat-input-row {
  background: rgba(13, 16, 15, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-light);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
}

/* Old box style (fallback/reference) */
.support-chat-card {
  max-width: 420px;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 80vh;
  max-height: 640px;
  border-top: 2px solid rgba(0, 231, 1, 0.35);
  overflow: hidden;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-light);
}

.chat-ai-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-green-subtle);
  border: 1px solid rgba(0, 231, 1, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.chat-ai-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chat-ai-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
}

.chat-ai-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--accent-green);
  font-weight: 600;
}

.chat-ai-status .live-count-dot {
  width: 6px;
  height: 6px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  background: rgba(0, 0, 0, 0.15);
}

.msg-row {
  display: flex;
  gap: 8px;
  max-width: 88%;
  animation: msgIn 0.25s ease;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  background: var(--accent-green-subtle);
  border: 1px solid rgba(0, 231, 1, 0.25);
}

.msg-row.user .msg-avatar {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-light);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.65rem;
}

.msg-bubble {
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 0.8rem;
  line-height: 1.45;
}

.msg-row.bot .msg-bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-top-left-radius: 4px;
  color: var(--text-main);
}

.msg-bubble b {
  color: var(--accent-green);
}

.msg-bubble code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.msg-row.user .msg-bubble {
  background: linear-gradient(135deg, #00d70b, #00a806);
  color: #041b00;
  font-weight: 600;
  border-top-right-radius: 4px;
}

/* Typing indicator */
.msg-bubble.typing-bubble {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 14px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Quick chips */
.chat-quick-chips {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  overflow-x: auto;
  border-top: 1px solid var(--border-light);
}

.chat-quick-chips::-webkit-scrollbar { display: none; }

.chat-chip {
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 231, 1, 0.25);
  color: var(--accent-green);
  font-family: var(--font-main);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.chat-chip:hover {
  background: var(--accent-green-subtle);
}

/* Input row */
.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.3);
}

#chat-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-main);
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.2s;
}

#chat-input:focus {
  border-color: rgba(0, 231, 1, 0.4);
}

#btn-chat-send {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d70b, #00a806);
  color: #041b00;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

#btn-chat-send:active {
  transform: scale(0.9);
}

/* ========================================================
   STAGE 2.5: USER PROFILE SETUP SCREEN
======================================================== */
#profile-setup-screen {
  overflow-y: auto; /* Chhoti phone pe form scroll ho sake */
}

.profile-setup-container {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 100%;
  max-width: 500px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #0d2010 0%, #000 65%);
  padding: 16px;
}

.profile-setup-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elevated);
  border: 1px solid rgba(0, 231, 1, 0.25);
  border-radius: 20px;
  padding: 26px 22px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 231, 1, 0.15);
}

.profile-setup-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  margin-bottom: 20px;
}

.setup-logo-img {
  width: 120px;
  height: auto;
  object-fit: contain;
  margin-bottom: 2px;
  filter: drop-shadow(0 0 12px rgba(0, 231, 1, 0.35));
}

.setup-avatar-ring {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-green), #00c406);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px var(--accent-green-glow);
  margin-bottom: 4px;
}

.setup-avatar-icon {
  font-size: 1.6rem;
}

.setup-kicker {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  background: rgba(241, 168, 10, 0.12);
  border: 1px solid rgba(241, 168, 10, 0.35);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.profile-setup-head h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 2px 0 0;
}

.profile-setup-head p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

#profile-setup-form,
#api-gate-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.setup-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setup-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.setup-field .req {
  color: #ff4d4d;
}

.setup-field input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  color-scheme: dark;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.setup-field input:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(0, 231, 1, 0.15);
}

.setup-field input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
}

.phone-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 0 14px 0 0;
}

.phone-input-wrap:focus-within {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(0, 231, 1, 0.15);
}

.phone-prefix {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--accent-green);
  padding-left: 14px;
  border-right: 1px solid var(--border-light);
  height: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.phone-input-wrap input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 12px 0 !important;
}

#profile-setup-form .btn-setup-save,
#api-gate-form .btn-setup-save {
  width: auto;
  align-self: center;
  padding: 11px 22px;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 231, 1, 0.35);
}

/* ========================================================
   Stage 2.6: API KEY GATE (unique key per user)
   ======================================================== */
#api-gate-screen {
  overflow-y: auto;
}

#api-gate-screen .profile-setup-card {
  border-color: rgba(241, 168, 10, 0.35);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(241, 168, 10, 0.12);
}

#api-gate-screen .setup-avatar-ring {
  background: linear-gradient(135deg, var(--accent-gold), #d18f00);
  box-shadow: 0 0 24px rgba(241, 168, 10, 0.45);
}

#api-key-input {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
}

#api-key-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(241, 168, 10, 0.15);
}

.api-error-box {
  background: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.45);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ff6b6b;
  text-align: center;
  animation: apiShake 0.35s ease;
}

.api-gate-foot {
  margin-top: 16px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.api-gate-foot b {
  color: var(--accent-green);
}

@keyframes apiShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
