.page-bet {
  --sim-panel: rgba(9, 16, 29, 0.82);
  --sim-panel-strong: rgba(12, 21, 37, 0.96);
  --sim-line: rgba(148, 172, 207, 0.14);
  --sim-muted: #8492a8;
  --sim-text: #edf6ff;
}

html {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body.page-bet {
  display: block;
  width: 100%;
  height: auto !important;
  min-height: 100vh;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.page-bet .simulator-shell {
  width: min(1480px, calc(100% - 36px));
  margin: 0 auto;
  padding: 0 0 56px;
}

.page-bet .simulator-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 22px;
  padding: 0 4px;
}

.page-bet .simulator-kicker,
.page-bet .section-eyebrow {
  color: #55d9ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.page-bet .simulator-header h1 {
  margin: 8px 0 7px;
  color: var(--sim-text);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 650;
  letter-spacing: -0.04em;
}

.page-bet .simulator-header p {
  max-width: 680px;
  margin: 0;
  color: var(--sim-muted);
  font-size: 14px;
  line-height: 1.7;
}

.page-bet .market-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 12px 15px;
  border: 1px solid var(--sim-line);
  border-radius: 14px;
  background: rgba(9, 17, 30, 0.72);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.03);
}

.page-bet .status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2add9b;
  box-shadow: 0 0 14px rgba(42, 221, 155, 0.75);
}

.page-bet .market-status strong,
.page-bet .market-status small {
  display: block;
}

.page-bet .market-status strong {
  color: var(--sim-text);
  font-size: 12px;
}

.page-bet .market-status small {
  margin-top: 3px;
  color: var(--sim-muted);
  font-size: 10px;
}

.page-bet .simulator-shell > .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 10px;
  align-items: start;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding-top: 0;
  overflow: visible;
}

.page-bet .chart-container,
.page-bet .ranking-board,
.page-bet .predict-container {
  border: 1px solid var(--sim-line);
  border-radius: 18px;
  background: var(--sim-panel);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
}

.page-bet .chart-container {
  grid-column: 1;
  width: 100%;
  min-width: 0;
  max-width: none;
  max-height: none !important;
  padding: 12px;
  overflow: visible;
  border-color: var(--ct-border);
  border-radius: var(--ct-radius-lg);
  background: var(--ct-panel);
  box-shadow: var(--ct-shadow);
}

.page-bet .ranking-board {
  display: flex;
  flex-direction: column;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  max-width: none;
  max-height: none;
  align-self: start;
  padding: 12px;
  overflow: hidden;
}

.page-bet .ranking-title {
  margin: 2px 2px 12px;
  color: var(--sim-text);
  font-size: 15px;
  font-weight: 620;
  line-height: 20px;
  letter-spacing: -0.01em;
  transform: translateY(-2px);
}

.page-bet .ranking-title::before {
  display: none;
  content: none;
}

.page-bet .predict-container {
  grid-column: 1 / -1;
  padding: 20px;
}

.page-bet .section-heading,
.page-bet .trade-panel-heading,
.page-bet .predict-container-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 15px;
}

.page-bet .chart-heading {
  min-height: 18px;
  margin-bottom: 8px;
}

.page-bet .section-heading h2,
.page-bet .section-heading h3,
.page-bet .trade-panel-heading h3,
.page-bet .predict-container-title-bar h3 {
  margin: 5px 0 0;
  color: var(--sim-text);
  font-size: 16px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.page-bet .section-badge {
  padding: 5px 8px;
  border: 1px solid var(--sim-line);
  border-radius: 7px;
  color: var(--sim-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: rgba(255, 255, 255, 0.025);
}

.page-bet .live-badge {
  color: #55e8b0;
}

.page-bet .live-badge i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.page-bet .symbol-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 4px 10px;
  transform: translateY(-4px);
}

.page-bet .symbol-toolbar label {
  display: inline-flex;
  height: 28px;
  margin: 0;
  align-items: center;
  color: var(--sim-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.page-bet #simulator-symbol {
  display: block;
  width: 150px;
  height: 28px;
  min-height: 28px;
  margin: 0;
  padding: 0 28px 0 10px;
  border: 1px solid var(--ct-border);
  border-radius: 7px;
  outline: none;
  color: var(--sim-text);
  background: #0b1423;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-bet #simulator-symbol:focus {
  border-color: rgba(77, 215, 255, 0.52);
  box-shadow: 0 0 0 3px rgba(77, 215, 255, 0.08);
}

.page-bet .symbol-hint {
  color: var(--sim-muted);
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
}

.page-bet #tradingview-chart {
  width: 100%;
  height: 544px;
  min-height: 544px;
  margin-top: -8px;
  overflow: hidden;
  border: 1px solid var(--ct-border);
  border-radius: 14px;
  background: #050914;
}

.page-bet #tradingview-chart > div,
.page-bet #tradingview-chart iframe {
  width: 100% !important;
  max-width: 100% !important;
}

.page-bet .chart-loading {
  display: grid;
  min-height: 544px;
  place-items: center;
  color: var(--sim-muted);
  font-size: 12px;
}

.page-bet .guess-container {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--sim-line);
  border-radius: 14px;
  background: rgba(4, 10, 19, 0.58);
}

.page-bet .trade-panel-heading > span {
  color: var(--sim-muted);
  font-size: 11px;
}

.page-bet .controls {
  display: grid;
  grid-template-columns: auto minmax(340px, 1fr) auto 100px auto;
  align-items: center;
  gap: 12px;
}

.page-bet .controls > label {
  color: var(--sim-muted);
  font-size: 11px;
  font-weight: 600;
}

.page-bet .radio-inputs {
  display: flex;
  width: 100%;
  gap: 3px;
  padding: 4px;
  overflow: visible;
}

.page-bet .radio-inputs .radio {
  min-width: 64px;
  flex: 1 1 0;
}

.page-bet .radio .name {
  display: grid;
  min-height: 32px;
  padding: 0 8px;
  place-items: center;
  border-radius: 8px;
  white-space: nowrap;
}

.page-bet #usdt-count {
  width: 100%;
  height: 38px;
  border-radius: 9px;
}

.page-bet .buysell-button-container {
  display: flex;
  gap: 8px;
}

.page-bet .buysell-button-container button {
  min-width: 92px;
  min-height: 38px;
  border-radius: 9px;
  font-weight: 650;
}

/* Event controls: align with the production simulator */
.page-bet .controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  padding: 4px 2px;
  font-size: 12px;
}

.page-bet .controls > label {
  flex: 0 0 auto;
  margin-right: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.page-bet .radio-inputs {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 45%;
  margin: 0 28px 0 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid #2c2f3f;
  border-radius: 8px;
  background: #2c2f3f;
}

.page-bet .radio-inputs .radio {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin: 0;
  padding: 0;
  flex: 1 1 20%;
  overflow: hidden;
  color: #fff;
  background: #2c2f3f;
  cursor: pointer;
}

.page-bet .radio .name {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 0;
  color: #fff;
  background: transparent;
  font-size: 12px;
  white-space: nowrap;
}

.page-bet .radio:hover .name {
  background: #3e4559;
}

.page-bet .radio input:checked + .name {
  color: #000;
  background: #f0b90b;
}

.page-bet #usdt-count {
  width: 90px;
  height: 32px;
  margin: 0 24px 0 0;
  padding: 4px;
  border: 1px solid #ccc;
  border-radius: 5px;
  color: #fff;
  background: #333;
  font-size: 12px;
}

.page-bet #usdt-count:focus {
  outline: none;
  border-color: #f0b90b;
}

.page-bet .buysell-button-container {
  display: flex;
  width: auto;
  margin-left: auto;
  justify-content: flex-end;
  gap: 1px;
}

.page-bet .buysell-button-container button {
  width: 100px;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.page-bet #up {
  color: #fff;
  border: 0;
  background: #2ecc71;
}

.page-bet #down {
  color: #fff;
  border: 0;
  background: #e74c3c;
}

.page-bet #up:hover {
  background: #27ae60;
}

.page-bet #down:hover {
  background: #c0392b;
}

.page-bet .buysell-button-container button .arrow {
  display: inline-block;
  font-weight: 700;
}

.page-bet .buysell-button-container .up-button .arrow {
  transform: rotate(45deg);
}

.page-bet .buysell-button-container .down-button .arrow {
  transform: rotate(-45deg);
}

.page-bet #summary {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 18px 0 0;
  padding: 10px 14px;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  font-size: 11px;
  white-space: nowrap;
}

.page-bet #summary-profit-loss,
.page-bet #summary-profit-loss span {
  margin-top: 0;
  font-size: 20px;
  line-height: 1.2;
}

.page-bet #summary-win-rate {
  margin-top: 0;
  font-size: 11px;
  line-height: 1.2;
}

.page-bet .table-container,
.page-bet .predict-container > table {
  overflow: auto;
  border: 1px solid var(--sim-line);
  border-radius: 12px;
}

.page-bet .guess-container > .table-container {
  width: 100%;
  margin: 0;
  border-radius: 0 0 12px 12px;
}

.page-bet table th {
  height: 38px;
  color: #7889a2;
  font-size: 10px !important;
  font-weight: 650;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.025) !important;
}

.page-bet table td {
  height: 38px;
  color: #c7d2e2;
  font-size: 10px !important;
}

.page-bet #ranking-list th,
.page-bet #prices-list th {
  font-size: 11px !important;
}

.page-bet #ranking-list thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #0d1726 !important;
  box-shadow: inset 0 -1px var(--sim-line);
}

.page-bet #ranking-list td,
.page-bet #prices-list td {
  font-size: 12px !important;
  line-height: 1.45;
}

.page-bet #prices-list td.green {
  color: #2ecc71;
  font-weight: 600;
}

.page-bet #prices-list td.red {
  color: #e74c3c;
  font-weight: 600;
}

.page-bet #prices-list td.profit,
.page-bet #ranking-list td.profit {
  color: #2ecc71;
  font-weight: 700;
}

.page-bet #prices-list td.loss,
.page-bet #ranking-list td.loss {
  color: #e74c3c;
  font-weight: 700;
}

.page-bet #ranking-list {
  min-height: 0;
  margin-top: 0;
  flex: 1 1 auto;
  overflow: auto;
  max-height: none;
  border: 1px solid var(--sim-line);
  border-radius: 12px;
}

.page-bet #ranking-list:empty {
  min-height: 280px;
}

.page-bet .predict-container-title-bar {
  justify-content: space-between;
  margin-bottom: 14px;
}

.page-bet .predict-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
}

.page-bet .predict-toolbar label {
  color: var(--sim-muted);
  font-size: 11px;
}

.page-bet #strategyTypeSelect {
  min-width: 180px;
  height: 34px;
  padding: 0 32px 0 11px;
  border: 1px solid var(--sim-line);
  border-radius: 9px;
  color: #dce9f7;
  background: #0a1322;
}

.page-bet #predict-summary {
  min-height: 44px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--sim-line);
  border-radius: 11px;
  color: #55d9ff;
  background: rgba(255, 255, 255, 0.018);
}

.page-bet .tooltip-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--sim-line);
  border-radius: 50%;
  color: var(--sim-muted);
  font-size: 11px;
}

@media (max-width: 1180px) {
  .page-bet .simulator-shell > .container {
    grid-template-columns: 1fr;
  }

  .page-bet .chart-container,
  .page-bet .ranking-board,
  .page-bet .predict-container {
    grid-column: 1;
    grid-row: auto;
  }

  .page-bet .ranking-board {
    max-height: 440px;
  }

  .page-bet .controls {
    grid-template-columns: auto 1fr;
  }

  .page-bet .buysell-button-container {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 720px) {
  .page-bet .simulator-shell {
    width: min(100% - 24px, 1520px);
    padding-top: 0;
  }

  .page-bet .simulator-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-bet .market-status {
    width: 100%;
  }

  .page-bet .chart-container,
  .page-bet .ranking-board,
  .page-bet .predict-container {
    padding: 13px;
    border-radius: 15px;
  }

  .page-bet #tradingview-chart,
  .page-bet .chart-loading,
  .page-bet .chart-container div[id*="tradingview"],
  .page-bet .chart-container iframe {
    height: 416px !important;
    min-height: 416px !important;
    max-height: 416px !important;
  }

  .page-bet .trade-panel-heading,
  .page-bet .predict-container-title-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-bet .controls {
    display: flex;
    align-items: stretch;
    flex-direction: column;
  }

  .page-bet .radio-inputs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-bet .buysell-button-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-left: 0;
  }

  .page-bet .predict-toolbar {
    width: 100%;
  }

  .page-bet #strategyTypeSelect {
    min-width: 0;
    flex: 1;
  }
}
