/* ============================================================
   blastbet.css — BlastBet-specific styles.
   Depends on theme.css being loaded first (uses its variables
   and classes: --bg/--panel/--panel-2/--border/--text/etc.,
   .btn, .btn-primary, .btn-secondary, .btn-block, .badge,
   .panel, .container, .mono, .muted, and the default input style).
   ============================================================ */

svg.lucide {
  display: block;
}

/* Navbar (shared) */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.brand span {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  flex: 1 1 260px;
  max-width: 360px;
}

.search-box input {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 13px;
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
}

.wallet-chip span {
  font-size: 13px;
  font-weight: 600;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
}

.btn-icon-gap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Homepage — hero */
.hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 36px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-copy {
  max-width: 480px;
}

.hero h1 {
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.hero p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 20px;
  line-height: 1.6;
}

.hero-rocket {
  opacity: 0.35;
  filter: drop-shadow(0 0 40px rgba(255, 214, 10, 0.4));
}

.page-sections {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 20px;
  padding-bottom: 20px;
}

/* Category tabs */
.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.category-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.category-tab.active {
  border-color: var(--amber);
  background: rgba(255, 214, 10, 0.12);
  color: var(--amber);
}

/* Games grid */
.games-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.games-section-header .title {
  font-size: 15px;
  font-weight: 700;
}

.games-section-header .count {
  color: var(--text-muted);
  font-size: 13px;
}

.empty-state {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.game-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease;
  background: var(--panel);
  display: block;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.game-tag-pos {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.game-icon-wrap {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--accent);
}

.game-icon-wrap svg {
  transition: transform 200ms ease;
  filter: drop-shadow(0 0 22px var(--accent));
  opacity: 0.9;
}

.game-card:hover .game-icon-wrap svg {
  transform: scale(1.12);
}

.game-info {
  padding: 12px 14px 14px;
  background: rgba(0, 0, 0, 0.55);
}

.game-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.game-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-players {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.game-minbet {
  color: var(--text-muted);
  font-size: 12px;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(1px);
}

.game-card:hover .game-overlay {
  display: flex;
}

.game-play-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-pill);
  padding: 9px 22px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.game-card.is-disabled {
  cursor: default;
}

.game-card.is-disabled:hover {
  transform: none;
  border-color: var(--border);
}

.game-card.is-disabled .game-icon-wrap svg {
  opacity: 0.4;
}

.game-card.is-disabled:hover .game-icon-wrap svg {
  transform: none;
}

.game-card.is-disabled .game-play-btn {
  background: var(--panel-2);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Responsible-play strip + footer */
.responsible-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.7;
}

.site-footer .brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.site-footer .brand-row span {
  color: var(--text);
  font-weight: 700;
}

/* Crash game page */
.crash-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

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

.crash-header .title-group span {
  font-size: 16px;
  font-weight: 700;
}

.crash-header .right-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
}

.history-bar .empty {
  color: var(--text-muted);
  font-size: 13px;
  padding: 4px 2px;
}

.badge-neutral { background: rgba(255,255,255,0.08); color: var(--text); }

.flight-stage {
  position: relative;
  height: 300px;
  overflow: hidden;
}

#flightCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.stage-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  gap: 8px;
}

.multiplier-display {
  font-size: 56px;
  font-weight: 700;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
  display: none;
  color: var(--amber);
}

.multiplier-display.crashed {
  color: var(--red);
}

.crashed-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.5px;
  display: none;
}

.waiting-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 60%;
}

.waiting-block .status-label {
  font-size: 15px;
  color: var(--text-muted);
}

.progress-track {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--panel-2);
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--amber);
  transition: width 80ms linear;
}

.panels-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.bet-panels {
  display: flex;
  gap: 14px;
  flex: 2 1 520px;
  flex-wrap: wrap;
}

.bet-panel {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 260px;
}

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

.bet-panel-header .label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.bet-status-badge {
  display: none;
}

.input-group {
  display: flex;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
}

.input-group:focus-within {
  border-color: var(--border-light);
}

.input-group .prefix {
  color: var(--text-muted);
  font-size: 13px;
  margin-right: 6px;
  font-weight: 600;
}

.input-group input {
  background: transparent;
  border: none;
  padding: 11px 0;
  font-size: 16px;
  width: 100%;
}

.quick-btns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.quick-btn {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 6px 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.quick-btn:disabled {
  color: var(--text-muted);
  cursor: default;
  opacity: 0.5;
}

.quick-btn.block {
  width: 100%;
}

.auto-cashout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.auto-cashout-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 0;
}

.auto-cashout-row input[type="checkbox"] {
  width: auto;
}

.auto-target-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.auto-target-wrap span {
  font-size: 13px;
  color: var(--text-muted);
}

.input-compact {
  width: 64px;
  padding: 3px 6px;
  font-size: 13px;
}

.btn-cashout {
  background: var(--green);
  color: #04231a;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.btn-cashout .amount {
  font-size: 13px;
}

.side-panel {
  display: flex;
  flex-direction: column;
  min-width: 260px;
  max-height: 420px;
  flex: 1 1 260px;
}

.side-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.side-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 6px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.side-tab.active {
  border-bottom-color: var(--amber);
  color: var(--text);
}

.side-list {
  overflow-y: auto;
  padding: 8px;
}

.side-list .empty {
  color: var(--text-muted);
  font-size: 13px;
  padding: 12px;
  text-align: center;
}

.side-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  gap: 6px;
}

.side-row:last-child {
  border-bottom: none;
}

.side-row .name {
  color: var(--text);
}

.side-row .amount {
  color: var(--text-muted);
  font-size: 12px;
}

.side-row .mult.win {
  color: var(--green);
}

.side-row .mult.loss {
  color: var(--red);
}

.side-row .mult.pending {
  color: var(--text-muted);
}

.footer-note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

/* Connection intro (kept as is) */
.connect-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  overflow: hidden;
  transition: transform 750ms cubic-bezier(0.3, 0.9, 0.4, 1), opacity 600ms ease 100ms;
}

.connect-overlay.launching {
  transform: translateY(-100vh);
  opacity: 0;
}

.intro-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.intro-star {
  position: absolute;
  border-radius: 50%;
  background: var(--text);
  opacity: 0.15;
  animation-name: intro-twinkle;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes intro-twinkle {
  0%, 100% { opacity: 0.12; }
  50% { opacity: 0.9; }
}

.intro-stage {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--amber);
  display: none;
  opacity: 0.6;
}

.connect-overlay.waiting .intro-ping {
  display: block;
  animation: intro-ping 2.4s ease-out infinite;
}

.intro-ping-delay {
  animation-delay: 1.2s;
}

@keyframes intro-ping {
  0% { transform: scale(0.4); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

.intro-rocket-ring {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px 6px rgba(255, 214, 10, 0.35);
  animation: intro-float 3s ease-in-out infinite;
  transition: box-shadow 400ms ease;
}

.connect-overlay.connected .intro-rocket-ring {
  box-shadow: 0 0 60px 10px rgba(34, 197, 94, 0.4);
}

@keyframes intro-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.intro-rocket {
  color: var(--amber);
  animation: intro-rocket-pulse 1.8s ease-in-out infinite;
}

@keyframes intro-rocket-pulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(255, 214, 10, 0.6)); }
  50% { filter: drop-shadow(0 0 16px rgba(255, 214, 10, 0.9)); }
}

.intro-check {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green);
  color: #04231a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 350ms ease, transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.connect-overlay.connected .intro-check {
  opacity: 1;
  transform: scale(1);
}

.intro-text {
  text-align: center;
  position: relative;
  z-index: 2;
}

.intro-status {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  transition: color 300ms ease;
}

.connect-overlay.connected .intro-status {
  color: var(--green);
}

.connect-overlay.waiting .intro-status {
  color: var(--amber);
}

.intro-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.intro-dots {
  display: flex;
  gap: 6px;
  transition: opacity 250ms ease;
}

.connect-overlay.connected .intro-dots {
  opacity: 0;
}

.intro-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: intro-dot-bounce 1.2s infinite ease-in-out;
}

.intro-dots span:nth-child(2) { animation-delay: 0.15s; }
.intro-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes intro-dot-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   Responsive (900px, 640px, 480px)
   ========================================================================== */

@media (max-width: 900px) {
  .panels-row {
    flex-direction: column;
  }

  .bet-panels {
    flex: 1 1 auto;
  }

  .side-panel {
    max-height: none;
    min-width: 0;
    flex: 1 1 auto;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 640px) {
  .navbar {
    flex-wrap: wrap;
    padding: 12px 14px;
  }

  .nav-left {
    flex: 1 1 auto;
  }

  .search-box {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }

  .nav-right {
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  .nav-right .btn {
    padding: 9px 14px;
    font-size: 13px;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 28px 20px;
    gap: 14px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero-rocket {
    display: none;
  }

  .btn-icon-gap {
    justify-content: center;
  }

  .category-tabs {
    gap: 6px;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }

  .game-icon-wrap {
    height: 100px;
  }

  .crash-page {
    gap: 10px;
  }

  .crash-header .title-group span {
    font-size: 15px;
  }

  .history-bar {
    padding: 8px;
  }

  /* 🌟 INCREASED SIZE: 300px (Was 220px) */
  .flight-stage {
    height: 300px;
  }

  /* 🌟 INCREASED SIZE: 56px (Was 40px) */
  .multiplier-display {
    font-size: 56px;
  }

  .waiting-block {
    width: 80%;
  }

  .bet-panel {
    padding: 12px;
  }

  .quick-btns {
    grid-template-columns: repeat(3, 1fr);
  }

  .side-tab {
    font-size: 11px;
    padding: 9px 4px;
  }

  .side-tab span,
  .side-tab {
    gap: 4px;
  }

  .intro-stage {
    width: 120px;
    height: 120px;
  }

  .intro-rocket-ring {
    width: 68px;
    height: 68px;
  }

  .intro-status {
    font-size: 16px;
    padding: 0 20px;
  }

  .intro-sub {
    font-size: 12px;
    padding: 0 24px;
  }
}

@media (min-width: 901px) {
  .flight-stage {
    height: 420px;
  }

  .multiplier-display {
    font-size: 64px;
  }
}

@media (max-width: 480px) {
  .crash-page {
    gap: 6px;
  }

  .crash-header {
    padding-bottom: 2px;
  }

  .history-bar {
    padding: 4px 6px;
    gap: 6px;
  }

  .history-bar .badge {
    padding: 2px 7px;
    font-size: 11px;
  }

  /* 🌟 INCREASED SIZE: 350px (Was 200px) */
  .flight-stage {
    height: 350px;
  }

  /* 🌟 INCREASED SIZE: 52px (Was 32px) */
  .multiplier-display {
    font-size: 52px;
  }

  .waiting-block .status-label {
    font-size: 14px;
  }

  .progress-track {
    height: 4px;
  }

  .bet-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .bet-panel {
    padding: 8px;
    gap: 6px;
    min-width: 0;
  }

  .bet-panel-header .label {
    font-size: 11px;
  }

  .input-group {
    padding: 0 8px;
  }

  .input-group input {
    padding: 7px 0;
    font-size: 13px;
  }

  .quick-btns {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }

  .quick-btn {
    padding: 6px 2px;
    font-size: 10px;
  }

  /* All Bets Panel is now VISIBLE! */
  .side-panel {
    display: flex; 
    flex: 1 1 auto;
    max-height: 160px; 
    min-width: 0;
  }

  .side-tabs button {
    font-size: 11px;
  }

  .side-row {
    padding: 6px 4px;
    font-size: 12px;
  }

  .auto-cashout-row {
    display: none;
  }

  .quick-btn.block {
    display: none;
  }

  .footer-note {
    display: none;
  }
}
