/* Bynomo Base Styles */
:root {
  --bg: #0b0f17;
  --panel: #121826;
  --muted: #9aa4b2;
  --text: #e8edf2;
  --brand: #21c55d;
  --brand-600: #16a34a;
  --danger: #ef4444;
  --warn: #f59e0b;
  --warn-600: #d97706;
  --card-border: rgba(255,255,255,0.06);
  --shadow: 0 10px 25px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 70% -20%, rgba(33,197,93,0.12), transparent 60%), var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.5;
}
/* Avoid horizontal scroll on small screens */
html, body { overflow-x: hidden; }

.container { width: min(1100px, 92vw); margin: 0 auto; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; font-size: 22px; letter-spacing: 0.3px; }
.nav { display: flex; gap: 10px; align-items: center; }
.nav-link { color: var(--muted); text-decoration: none; padding: 10px 12px; border-radius: 8px; transition: .15s ease; }
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-link.active { color: var(--text); }
.nav-cta { background: rgba(33,197,93,0.15); color: #dffbe9; border: 1px solid rgba(33,197,93,0.35); }
.nav-cta:hover { background: rgba(33,197,93,0.25); }

.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; padding: 28px 0 12px; align-items: center; }
.hero h1 { margin: 0 0 10px; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.1; }
.subtitle { color: var(--muted); margin: 0 0 16px; }
.actions { display: flex; gap: 12px; margin: 18px 0 8px; flex-wrap: wrap; }
.trust { display: flex; gap: 18px; list-style: none; padding: 0; margin: 14px 0 0; color: var(--muted); font-size: 14px; }

.card { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)); padding: 18px; border: 1px solid var(--card-border); border-radius: 14px; box-shadow: var(--shadow); }

.hero-visual { min-height: 320px; }
.ticker-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ticker { font-size: 13px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.05); color: var(--text); border: 1px solid var(--card-border); }
.ticker.up { border-color: rgba(33,197,93,0.5); color: #bcf7d2; }
.ticker.down { border-color: rgba(239,68,68,0.45); color: #ffd6d6; }

.chart-skeleton { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 160px; margin: 18px 0; }
.chart-skeleton .bar { background: linear-gradient(180deg, rgba(33,197,93,0.5), rgba(33,197,93,0.1)); border-radius: 6px 6px 0 0; box-shadow: inset 0 1px 0 rgba(255,255,255,0.15); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { font-weight: 600; font-size: 16px; }

.features { padding: 24px 0 12px; }
.features h2 { margin: 0 0 14px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature p { color: var(--muted); margin: 6px 0 0; }

.cta { margin: 28px 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; }

.site-footer { display: flex; align-items: center; justify-content: space-between; color: var(--muted); padding: 18px 0 28px; }
.site-footer a { color: var(--muted); text-decoration: none; margin-left: 14px; }
.site-footer a:hover { color: var(--text); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 10px; text-decoration: none; border: 1px solid var(--card-border); color: var(--text); background: rgba(255,255,255,0.02); transition: .15s ease; cursor: pointer; }
.btn:hover { background: rgba(255,255,255,0.06); }
.btn.primary { background: linear-gradient(180deg, #21c55d, #16a34a); border-color: rgba(0,0,0,0.15); color: #052e14; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.02); }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,0.18); color: var(--text); }
.btn.full { width: 100%; }

.auth { display: grid; place-items: center; min-height: calc(100vh - 160px); padding: 24px 0; }
.auth-card { width: min(520px, 92vw); }

.field { margin: 12px 0; }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field input { width: 100%; height: 42px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.02); color: var(--text); outline: none; }
.field input:focus { border-color: rgba(33,197,93,0.5); box-shadow: 0 0 0 3px rgba(33,197,93,0.15); }
.error { color: var(--danger); height: 16px; display: block; margin-top: 4px; font-size: 12px; }

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 6px 0 14px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.link { color: #b6f3cd; text-decoration: none; }
.link:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.center { text-align: center; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
}

/* Trade page layout */
.trade-layout { display: grid; grid-template-columns: 300px 1fr 320px; gap: 12px; padding: 14px 0 24px; }
.panel-title { display:flex; align-items:center; justify-content:space-between; margin:0 0 10px; font-weight:600; }
.market-select { display:flex; gap:8px; }
.market-select select { height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.02); color: var(--text); padding: 0 10px; }

.order-form .tabs { display:flex; gap:8px; margin-bottom:10px; }
.tab { flex:1; text-align:center; padding:8px; border-radius:10px; border:1px solid var(--card-border); cursor:pointer; }
.tab.buy { background: rgba(33,197,93,0.15); border-color: rgba(33,197,93,0.35); }
.tab.sell { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.35); }
.order-form .field small { display:flex; justify-content:space-between; color: var(--muted); margin-top:6px; }
.order-form .row { display:grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.chart { height: 420px; display:grid; grid-template-rows: auto 1fr; gap: 10px; }
.chart-toolbar { display:flex; align-items:center; justify-content:space-between; }
.chart-canvas { border-radius: 12px; background: radial-gradient(400px 200px at 20% 20%, rgba(33,197,93,0.06), transparent), linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)); border:1px solid var(--card-border); position:relative; overflow:hidden; }
.chart-canvas::before { content:''; position:absolute; inset:0; background-image: repeating-linear-gradient(to right, rgba(255,255,255,0.05) 0 1px, transparent 1px 80px), repeating-linear-gradient(to top, rgba(255,255,255,0.05) 0 1px, transparent 1px 60px); }

.orderbook { display:grid; grid-template-rows: auto auto 1fr; gap: 8px; }
.asks .row, .bids .row { display:grid; grid-template-columns: 1fr 1fr 1fr; font-size: 13px; padding: 4px 0; }
.asks .row { color:#ffd6d6; }
.bids .row { color:#bcf7d2; }
.recent-trades { height: 180px; overflow:auto; }
.recent-trades .item { display:flex; justify-content:space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,0.06); }

@media (max-width: 1100px) { .trade-layout { grid-template-columns: 1fr; } }

/* ===== New Trade Experience ===== */
.trade-topbar { background: #0a1321; border-bottom: 1px solid rgba(255,255,255,0.06); }
.topbar-inner { display:flex; align-items:center; justify-content:space-between; height: 56px; }
.brand-mini { font-weight: 700; letter-spacing: .4px; }
.market-pill { display:flex; align-items:center; gap:10px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.04); border: 1px solid var(--card-border); }
.market-pill img { width: 20px; height: 20px; border-radius: 50%; }
.pill { padding: 2px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--card-border); }
.pill.pct.up { background: rgba(33,197,93,0.15); color: #bff6cf; border-color: rgba(33,197,93,0.35); }
.account-info { display:flex; align-items:center; gap: 14px; }
.account-info .balance { background: rgba(255,255,255,0.04); border: 1px solid var(--card-border); padding: 6px 10px; border-radius: 8px; }
.account-info .btn.deposit { background: linear-gradient(180deg, #21c55d, #16a34a); color:#052e14; border: none; padding: 8px 12px; border-radius: 8px; font-weight:600; cursor:pointer; }

.trade-app { display:grid; grid-template-columns: 64px 1fr 340px; gap: 12px; padding: 14px 0 10px; }
.trade-sidebar { padding: 8px; }
.side-nav { display:flex; flex-direction:column; align-items:center; gap: 10px; height: calc(100% - 16px); }
.side-nav a { width: 40px; height: 40px; display:grid; place-items:center; color: var(--muted); text-decoration:none; border-radius: 10px; border:1px solid transparent; }
.side-nav a:hover, .side-nav a.active { background: rgba(255,255,255,0.05); border-color: var(--card-border); color: var(--text); }
.side-nav .spacer { flex: 1; }

.trade-center { display:flex; flex-direction:column; gap: 10px; }
.center-toolbar { display:flex; align-items:center; justify-content:space-between; padding: 10px 12px; }
.center-toolbar .left { display:flex; align-items:center; gap: 12px; }
.market-dd { height: 36px; border-radius: 10px; border: 1px solid rgba(148,163,184,0.25); background: linear-gradient(180deg, rgba(15,23,42,0.92), rgba(2,6,23,0.92)); color: #e5e7eb; padding: 0 10px; box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 6px 18px rgba(2,6,23,0.25); }
.market-dd:focus { outline: 2px solid rgba(59,130,246,0.5); outline-offset: 1px; }
.market-dd optgroup { color: #93c5fd; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.market-dd option { color: #e2e8f0; background-color: #0b1220; }

/* When a size attribute is present (e.g., 4 rows), let it expand and scroll */
.market-dd[size] { height: auto; padding: 6px 10px; min-height: 140px; overflow-y: auto; }

.chart-canvas.pro { 
  position: relative; 
  width: 100%;
  height: 520px;
  max-height: 60vh;
  min-height: 300px;
  border-radius: 12px; 
  border:1px solid var(--card-border); 
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)), 
              radial-gradient(800px 400px at 50% -20%, rgba(33,197,93,0.08), transparent 50%), #0b0f17; 
  overflow:hidden; 
  margin: 0 auto;
  box-sizing: border-box;
}
.chart-canvas.pro::before { content:''; position:absolute; inset:0; background-image: repeating-linear-gradient(to right, rgba(255,255,255,0.04) 0 1px, transparent 1px 80px), repeating-linear-gradient(to top, rgba(255,255,255,0.04) 0 1px, transparent 1px 60px); }
.price-line { position:absolute; left: 0; right: 0; top: 65%; height: 1px; background: rgba(33,197,93,0.55); }
.price-line span { position:absolute; right: 10px; top: -10px; background: #0a1321; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(33,197,93,0.4); color:#bff6cf; font-size: 12px; }
.logbar { font-size: 12px; padding-left: 6px; }

.trade-right { display:flex; flex-direction:column; gap: 10px; }
.panel-block { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)); border: 1px solid var(--card-border); border-radius: 12px; padding: 12px; }
.panel-block .label { color: var(--muted); font-size: 12px; }
.panel-block .value { font-weight: 600; }
.amount-input { display:flex; align-items:center; gap: 8px; }
.amount-input input { width: 100%; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.02); color: var(--text); padding: 0 10px; }
.amount-input button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--card-border); background: rgba(255,255,255,0.04); color: var(--text); cursor:pointer; }
.profitability .prof { color: #bff6cf; font-weight: 700; }
.actions-vertical { display:flex; flex-direction:column; gap: 10px; }
.actions-vertical .btn { height: 46px; font-weight:700; }
.actions-vertical .btn.call { background: linear-gradient(180deg, #21c55d, #16a34a); color:#052e14; border: none; }
.actions-vertical .btn.put { background: linear-gradient(180deg, #ef4444, #dc2626); color:#220606; border: none; }

.statusbar { padding: 6px 0 16px; font-size: 12px; }

@media (max-width: 1100px) {
  .trade-app { grid-template-columns: 1fr; }
  .trade-sidebar { display:none; }
}

/* Mobile layout for trade page */
@media (max-width: 640px) {
  /* Ensure containers don't overflow viewport */
  .container { width: 100%; padding-left: 8px; padding-right: 8px; }
  /* Compact header/nav for mobile */
  .site-header { padding: 10px 0; }
  .brand { font-size: 18px; }
  .nav { gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link { padding: 6px 8px; font-size: 12px; white-space: nowrap; }

  /* Hide footer text on mobile */
  .site-footer { display: none; }
  .topbar-inner { padding-inline: 8px; }
  .market-pill { display:none; }
  .account-info .balance { font-size: 13px; }
  .account-info .btn.deposit { padding: 6px 10px; }

  .trade-app { grid-template-columns: 1fr; padding-bottom: 160px; }
  .trade-app, .trade-center, .center-toolbar { max-width: 100%; overflow-x: hidden; }
  /* Show compact toolbar with pair dropdown */
  .center-toolbar { 
    display: block;
    padding: 8px 10px;
    margin: 6px 0 0; /* remove negative margins to avoid overflow */
  }
  .center-toolbar .left { gap: 8px; flex-wrap: wrap; }
  .market-dd { width: 100%; max-width: none; height: 36px; font-size: 14px; }
  #btnAssets { padding: 6px 10px; font-size: 12px; }
  .pair-badge { display: none; }
  .tf-group { display: none; }
  .statusbar { display: none; }

  /* Responsive chart sizing */
  .trade-center .chart-canvas.pro {
    height: auto;
    aspect-ratio: 16/9;
    min-height: 250px;
    max-height: 70vh;
    margin: 0; /* no negative margins */
    width: 100%; /* no calc overflow */
    border-radius: 10px;
    margin-bottom: 10px;
  }

  /* Turn the right panel into a sticky bottom action bar */
  .trade-right { 
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
    border-radius: 14px 14px 0 0;
    background: #0f172a; /* solid background, non-transparent */
    border: 1px solid var(--card-border);
    border-bottom: none;
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0));
    box-shadow: 0 -10px 25px rgba(0,0,0,0.35);
  }
  .actions-vertical .btn { position: relative; z-index: 10000; pointer-events: auto; }
  .trade-center .chart-canvas.pro {
    position: relative;
    z-index: 1;
    margin: 0;
    width: 100%;
    border-radius: 10px;
  }
  .modal .dialog { width: min(420px, 94vw); }
  .trade-right .panel-block { background: transparent; border: none; padding: 4px 0; margin: 0; }
  .trade-right .panel-block .label { font-size: 11px; opacity: .8; }
  .trade-right .value { font-size: 15px; }
  .trade-right .panel-block:first-child { padding-top: 0; }
  .trade-right .panel-block:last-child { padding-bottom: 0; }
  /* Hide verbose labels to save space; keep essential value texts */
  .trade-right .panel-block .label { display: none; }
  .profitability { display:none; }

  /* Amount row inline */
  .trade-right .amount-input { display: grid; grid-template-columns: 34px 1fr 34px; gap: 8px; }
  .trade-right .amount-input input { height: 38px; font-size: 14px; }
  .trade-right .amount-input button { height: 38px; }

  /* Ensure deposit modal amount input remains full-width on mobile */
  .deposit-modal .amount-input { display: block; }
  .deposit-modal .amount-input input { width: 100%; }

  /* Actions as a horizontal bar */
  .actions-vertical { flex-direction: row; gap: 8px; margin-top: 6px; }
  .actions-vertical .btn { flex: 1; height: 44px; font-size: 15px; font-weight: 700; }
  .actions-vertical .btn.call, .actions-vertical .btn.put { border: none; }
  .checkbox { font-size: 12px; }
  #oneClick { width: 16px; height: 16px; }

  /* Active bets: stack vertically on mobile */
  .active-bets-container { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    padding: 10px 12px 12px; 
    overflow-y: auto; 
    overflow-x: hidden; 
    background: transparent; 
    border: none; 
    max-height: 45vh; /* keep room for chart and footer */
    margin-bottom: 90px; /* keep above sticky action bar */
  }
  .active-bets-container .bet-column { 
    flex: 0 0 auto; 
    width: 100%; 
    max-width: 100%; 
  }
  .bet-popup { width: 100%; }
  .bet-header, .bet-body, .bet-footer { padding-left: 12px; padding-right: 12px; }
  .bet-row { font-size: 13px; }
  .bet-value { word-break: break-word; }
}

/* When JS initializes a live chart, remove decorative overlay grid */
.chart-canvas.pro.no-overlay::before { display: none !important; }

/* Assets Modal */
.modal { position: fixed; inset: 0; display: none; z-index: 11000; }
.modal.show { display: block; }
.modal .backdrop { position:absolute; inset:0; background: rgba(0,0,0,0.6); z-index: 11001; opacity: 0; transition: opacity .18s ease; }
.modal .dialog { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.98); width: 420px; max-height: 80vh; overflow: hidden; border-radius: 14px; z-index: 11002; opacity: 0; transition: opacity .18s ease, transform .18s ease; }
.modal.show .backdrop { opacity: 1; }
.modal.show .dialog { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal .modal-header { display:flex; align-items:center; justify-content:space-between; padding: 12px 14px; border-bottom: 1px solid var(--card-border); }
.modal .modal-header .title { font-weight: 700; }
.modal .modal-header .close { background: transparent; color: var(--muted); border:none; font-size:18px; cursor:pointer; }
.modal .tabs { display:flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--card-border); }
.modal .tab { background: transparent; color: var(--muted); border: 1px solid transparent; padding: 6px 10px; border-radius: 999px; cursor:pointer; }
.modal .tab.active { color: var(--text); border-color: var(--card-border); background: rgba(255,255,255,0.03); }
.modal .search { padding: 10px 12px; }
.modal .search input { width: 100%; height: 36px; border-radius: 10px; border: 1px solid var(--card-border); background: rgba(255,255,255,0.02); color: var(--text); padding: 0 10px; }
.modal .asset-list { max-height: 56vh; overflow-y: auto; }
.asset-item { display:grid; grid-template-columns: 32px 1fr auto auto; gap: 12px; align-items:center; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.06); cursor:pointer; }
.asset-item:hover { background: rgba(255,255,255,0.04); }
.asset-item .logo { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.12); display:grid; place-items:center; font-size: 14px; }
.asset-item .name { font-weight: 600; }
.asset-item .price { color: var(--muted); font-variant-numeric: tabular-nums; }
.asset-item .profit { padding: 4px 8px; border-radius: 8px; background: rgba(33,197,93,0.12); color: #2be37c; font-weight: 700; font-size: 12px; }

/* Timeframe group */
.tf-group { display:flex; gap: 6px; margin-left: 10px; }
.tf-btn { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(148,163,184,0.25); background: rgba(255,255,255,0.03); color: #e5e7eb; cursor: pointer; font-size: 12px; }
.tf-btn:hover { background: rgba(255,255,255,0.06); }
.tf-btn.active { background: linear-gradient(180deg, #2563eb, #1d4ed8); border-color: rgba(37,99,235,0.6); box-shadow: 0 0 0 2px rgba(37,99,235,0.25); }

/* Trade confirmation modal styling */
.confirm-modal .dialog { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)); border: 1px solid var(--card-border); box-shadow: var(--shadow); }
.confirm-modal .modal-body { padding: 12px 14px; display: grid; gap: 10px; }
.confirm-modal .modal-body .row { display:flex; align-items:center; justify-content:space-between; color: var(--muted); }
.confirm-modal .modal-body .row .label { color: var(--muted); }
.confirm-modal .modal-body strong { color: var(--text); font-variant-numeric: tabular-nums; }
.confirm-modal .modal-footer { padding: 12px 14px; }
.confirm-modal #confirmTradeBtn { width: 100%; height: 42px; border-radius: 10px; border: none; font-weight: 700; color: #03150a; }
.confirm-modal #confirmTradeBtn.call { background: linear-gradient(180deg, var(--brand), var(--brand-600)); color:#052e14; }
.confirm-modal #confirmTradeBtn.put { background: linear-gradient(180deg, var(--warn), var(--warn-600)); color:#1a1104; }

/* Bet Placement Popup */
.bet-popup {
  position: relative;
  background: linear-gradient(180deg, rgba(18,24,38,0.95), rgba(11,15,23,0.98));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  margin: 10px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.bet-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(33,197,93,0.15), rgba(11,15,23,0.2));
  border-bottom: 1px solid rgba(255,255,255,0.05);
  position: relative;
}

.bet-timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 16px;
}

.bet-timer-circle {
  position: relative;
  width: 50px;
  height: 50px;
  margin-bottom: 4px;
}

.bet-timer-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.bet-timer-bg {
  fill: none;
  stroke: rgba(255,255,255,0.1);
  stroke-width: 4;
}

.bet-timer-progress {
  fill: none;
  stroke: #21c55d;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 176;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.bet-timer-value {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.bet-timer-label {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bet-details {
  flex: 1;
}

.bet-pair {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #fff;
}

.bet-direction {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  margin-right: 8px;
}

.bet-direction.call {
  background: rgba(33,197,93,0.2);
  color: #21c55d;
}

.bet-direction.put {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
}

.bet-direction-arrow {
  margin-left: 4px;
  font-size: 16px;
  line-height: 1;
}

.bet-amount {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}

.bet-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 24px;
  line-height: 1;
  padding: 4px;
  margin: -8px -8px -8px 0;
  cursor: pointer;
  transition: color 0.2s;
}

.bet-close:hover {
  color: #fff;
}

.bet-body {
  padding: 16px;
  background: rgba(0,0,0,0.2);
}

.bet-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
}

.bet-row:last-child {
  margin-bottom: 0;
}

.bet-label {
  color: rgba(255,255,255,0.7);
}

.bet-value {
  font-weight: 600;
  color: #fff;
}

.bet-row.profit .bet-value {
  color: #21c55d;
}

.payout-amount {
  opacity: 0.8;
  font-size: 0.9em;
  margin-left: 4px;
}

.bet-progress {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-top: 16px;
  overflow: hidden;
}

.bet-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #21c55d, #16a34a);
  border-radius: 2px;
  transition: width 1s linear;
}

.bet-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0,0,0,0.3);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.bet-status {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #21c55d;
  margin-right: 8px;
}

.status-dot.blinking {
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

.bet-actions {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-cancel {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.3);
}

.btn-cancel:hover {
  background: rgba(239,68,68,0.2);
}

.btn-increase {
  background: rgba(33,197,93,0.1);
  color: #21c55d;
  border: 1px solid rgba(33,197,93,0.3);
}

.btn-increase:hover {
  background: rgba(33,197,93,0.2);
}

/* Animate popup appearance */
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.bet-popup {
  animation: slideUp 0.3s ease-out forwards;
}

/* Pulsing effect for call/put buttons */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(33,197,93,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(33,197,93,0); }
  100% { box-shadow: 0 0 0 0 rgba(33,197,93,0); }
}

.bet-direction.call {
  animation: pulse 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .bet-header {
    padding: 12px;
  }
  
  .bet-timer-circle {
    width: 44px;
    height: 44px;
  }
  
  .bet-timer-value {
    font-size: 14px;
  }
  
  .bet-pair {
    font-size: 15px;
  }
  
  .bet-amount {
    font-size: 16px;
  }
  
  .bet-body {
    padding: 12px;
  }
  
  .bet-footer {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .bet-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .btn-sm {
    flex: 1;
    text-align: center;
  }
}

/* Deposit modal: solid background and clear text */
.deposit-modal .backdrop { background: rgba(0,0,0,0.8); }
.deposit-modal .dialog { background: #0f172a; border: 1px solid var(--card-border); box-shadow: var(--shadow); }
.deposit-modal .modal-header { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)); }
.deposit-modal .modal-body { padding: 12px 14px; color: var(--text); }
.deposit-modal .modal-body .row { display:flex; align-items:center; justify-content:space-between; color: var(--muted); }
.deposit-modal .modal-body .row .label { color: var(--muted); }
.deposit-modal .modal-footer { padding: 12px 14px; }

/* Unified table styling with column separators */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table thead th { background: rgba(255,255,255,0.02); }
.table th, .table td { 
  border-bottom: 1px solid var(--card-border); 
  border-right: 1px solid var(--card-border); 
}
.table th:last-child, .table td:last-child { border-right: none; }

/* Wallet page responsiveness */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { min-width: 720px; }
.table th, .table td { padding: 8px 10px; font-variant-numeric: tabular-nums; }
.table td { word-break: break-word; }

.wallet-row { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap: wrap; }
.wallet-row .btn { min-width: 180px; }

/* Shrink wallet histories about 50% */
.wallet-history { font-size: 0.5em; }
.wallet-history .label { font-size: 1.2em; }
.wallet-history .table th, .wallet-history .table td { padding: 6px 8px; }

@media (max-width: 768px) {
  .table { min-width: 600px; font-size: 13px; }
}
@media (max-width: 640px) {
  .wallet-row .btn { width: 100%; }
}
@media (max-width: 480px) {
  .table { min-width: 520px; font-size: 12px; }
}
