@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  overflow: hidden;
  background: #101011;
  color: #fff;
  height: 100vh;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.hide { display: none !important; }

.f-12 { font-size: 12px !important; }
.f-14 { font-size: 14px !important; }
.f-16 { font-size: 16px !important; }
.f-40 { font-size: 40px !important; }

.text-success { color: #28a745 !important; }
.text-white { color: #fff !important; }

.topbar {
  background: #131722;
  border-bottom: 1px solid #2a3042;
  padding: 0 16px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 100;
  position: relative;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.back-btn {
  background: rgba(240,185,11,0.1);
  border: 1px solid rgba(240,185,11,0.3);
  color: #f0b90b;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: none;
}
.back-btn:hover { background: rgba(240,185,11,0.2); }
.game-title-bar {
  font-size: 1rem;
  font-weight: 600;
  color: #e8eaed;
}
.topbar .balance-display {
  background: #1a1f2e;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #0ecb81;
  font-weight: 600;
  border: 1px solid #2a3042;
}

.main-container {
  display: flex;
  height: calc(100vh - 48px);
  position: relative;
  width: 100%;
  background: #101011;
}

.left-sidebar {
  min-width: 410px;
  max-width: 410px;
  padding-left: 10px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tabs-navs {
  min-height: 40px;
  max-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tabs-navs .nav-pills {
  border-radius: 10px;
  border: solid 1px #363738;
  position: relative;
  overflow: hidden;
  display: flex;
  height: 20px;
}

.tabs-navs .nav-item button {
  padding: 0;
  height: 20px;
  width: 100px;
  font-size: 12px;
  color: #fff;
  z-index: 2;
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
}

.tabs-navs .active-line {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 20px;
  border-radius: 10px;
  background: rgb(44, 45, 48);
  transition: all ease-in-out 0.5s;
}

.tabs-navs .nav-item:nth-child(1).active ~ .active-line { left: 0%; }
.tabs-navs .nav-item:nth-child(2).active ~ .active-line { left: 50%; }

.contents-blocks {
  display: flex;
  flex-direction: column;
  height: calc(100% - 40px);
  background-image: url(../images/grey-texture-bg.png);
  background-color: #1B1C1D;
  border-radius: 20px 20px 0 0;
  border: 1px solid #2A2B2E;
  border-bottom: 0;
  min-height: 0;
  color: #7b7b7b;
  padding: 10px;
  overflow-y: auto;
}

.contents-blocks::-webkit-scrollbar { width: 4px; }
.contents-blocks::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 2px; }

.bets-count { color: #fff; }

.list-header {
  font-size: 11px;
  color: #7b7b7b;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.list-body {
  max-height: calc(100vh - 300px);
  overflow-y: auto;
}

.list-body::-webkit-scrollbar { width: 4px; }
.list-body::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 2px; }

.column-1 { box-sizing: border-box; width: 28%; text-align: left; }
.column-2 { box-sizing: border-box; width: 25%; text-align: center; }
.column-3, .column-4 { box-sizing: border-box; width: 22%; text-align: center; }

.list-items {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(42, 43, 46, 0.5);
  font-size: 12px;
  transition: background 0.3s;
}

.list-items.active {
  background: rgba(40, 167, 69, 0.1);
  border-radius: 5px;
}

.list-items .column-1.users {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fff;
}

.list-items .column-1.users .avatar,
.list-items .column-1.users .avatar-img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.list-items .column-1.users .username-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70px;
}

.list-items.cashed-out {
  background: rgba(40, 167, 69, 0.08);
  border-radius: 5px;
}

.custom-badge {
  font-size: 12px;
  line-height: 24px;
  height: 22px;
  padding: 0 10px;
  text-align: center;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  width: fit-content;
}

.bg1 { background: #6b07d2; color: #d7c3eb; }
.bg2 { background: #900087; color: #e9c2e7; }
.bg3 { background: #005d91; color: #afd9ed; }

.right-sidebar {
  width: calc(100% - 410px);
  display: flex;
  flex-direction: column;
}

.game-play {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  padding: 0 10px 10px;
  height: calc(100vh - 42px);
  gap: 0;
}

.history-top { flex-shrink: 0; min-height: 32px; z-index: 5; position: relative; display: block; }

.stats {
  display: flex;
  align-items: center;
  position: relative;
}

.payouts-wrapper {
  flex: 1;
  overflow: visible;
  position: relative;
  min-height: 30px;
}

.payouts-block {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 4px 0;
  scrollbar-width: none;
  min-height: 26px;
}

.payouts-block::-webkit-scrollbar { display: none; }

.payouts-block .custom-badge {
  flex-shrink: 0;
  cursor: default;
}

.shadow-overlay {
  position: absolute;
  right: 35px;
  top: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(to right, transparent, #101011);
  pointer-events: none;
  z-index: 1;
}

.button-block {
  flex-shrink: 0;
  position: relative;
}

.histry-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  color: #7b7b7b;
  padding: 5px;
}

.histry-toggle .material-symbols-outlined { font-size: 20px; }

.history-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: #1B1C1D;
  border: 1px solid #2A2B2E;
  border-radius: 10px;
  padding: 10px;
  z-index: 20;
  width: 350px;
  max-height: 300px;
  overflow-y: auto;
}

.button-block.show .history-dropdown { display: block; }

.round-history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 5px;
}

.stage-board {
  flex: 1;
  position: relative;
  border-radius: 20px;
  border: 1px solid #2A2B2E;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  background: #000;
  min-height: 200px;
}

.stage-canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

canvas {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 1;
}

.counter-num {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
}

.counter-num #auto_increment_number {
  font-size: 64px;
  font-weight: 900;
  color: #fff;
  line-height: 80px;
}

.counter-num #auto_increment_number span {
  font-size: 40px;
  color: #F00B3E;
}

.flew_away_section {
  color: #F00B3E;
  font-weight: 700;
}

.rotateimage {
  position: absolute;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.rotateimage.rotatebg {
  animation: rotateBg 20s linear infinite;
  opacity: 0.1;
}

@keyframes rotateBg {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loading-game {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 15;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
}

.loading-game.show { display: flex; }

.loading-game .center-loading {
  text-align: center;
}

.center-loading svg {
  animation: loading-spinner 2s linear infinite;
}

@keyframes loading-spinner {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.line-loader {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  overflow: hidden;
  margin: 10px auto 0;
}

.fill-line {
  width: 0%;
  height: 100%;
  background: #F00B3E;
  animation: fillLine 5s linear forwards;
}

@keyframes fillLine {
  from { width: 0%; }
  to { width: 100%; }
}

.bottom-left-plane {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 16;
}

.plane-static {
  width: 120px;
  height: auto;
}

.crash-game__pin {
  position: absolute;
  z-index: 3;
  width: 10em;
  height: 6em;
  pointer-events: none;
  will-change: transform, bottom, left;
  background-size: contain;
  background-repeat: no-repeat;
}

.bet-controls {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  padding-top: 10px;
  gap: 6px;
}

.bet-controls .controls {
  display: flex;
  justify-content: center;
  width: 100%;
}

.bet-control {
  width: 50%;
  max-width: 400px;
  min-width: 280px;
  border-radius: 20px;
}

.bet-control .controls {
  display: flex;
  position: relative;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
  border: 1px solid #2A2B2E;
  background-image: url(../images/grey-texture-bg.png);
  background-color: #191A1B;
  height: 100%;
  margin: 0 auto;
  padding: 10px;
}

.controls .navigation {
  font-size: 12px;
  margin-bottom: 8px;
}

.navigation-switcher {
  border-radius: 10px;
  border: solid 1px #363738;
  position: relative;
  height: 20px;
  width: 202px;
  display: flex;
}

.navigation-switcher .slider {
  border-radius: 10px;
  width: 50%;
  justify-content: center;
  display: flex;
  color: #fff;
  z-index: 1;
  cursor: pointer;
  font-size: 12px;
  align-items: center;
}

.navigation-switcher .active-line {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 20px;
  border-radius: 10px;
  background: rgb(44, 45, 48);
  transition: all ease-in-out 0.5s;
  z-index: 0;
}

.navigation-switcher .slider:nth-child(2).active ~ .active-line { left: 50%; }

.first-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  gap: 5px;
}

.bet-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.spinner {
  display: flex;
  align-items: center;
  height: 30px;
  border-radius: 15px;
  background: #000;
  padding: 0 5px;
  border: 1px solid #363738;
}

.spinner .input {
  flex: 1;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 5px;
}

.spinner .input input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  outline: none;
}

.spinner .qty-buttons {
  display: flex;
  gap: 2px;
}

.spinner .qty-buttons button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: #2C2D30;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding: 0;
}

.spinner .qty-buttons button:hover { background: #3a3b3e; }

.spinner .qty-buttons button .material-symbols-outlined {
  font-size: 16px;
  font-variation-settings: 'FILL' 0, 'wght' 700, 'GRAD' 0, 'opsz' 48;
}

.bets-opt-list {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.bet-opt {
  background: #2C2D30 !important;
  border: none !important;
  color: #fff !important;
  border-radius: 15px !important;
  padding: 2px 10px !important;
  font-size: 11px !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
}

.bet-opt:hover { background: #3a3b3e !important; }

.bet-opt .currency {
  color: #7b7b7b;
  font-size: 10px;
}

.buttons-block {
  width: 100%;
  padding: 5px 0;
}

.buttons-block button {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.buttons-block .btn-success {
  background: linear-gradient(180deg, #28a745, #1e8a38);
  color: #fff;
}

.buttons-block .btn-success:hover {
  background: linear-gradient(180deg, #2ebd4e, #28a745);
}

.buttons-block .btn-danger {
  background: #f7001f;
  color: #fff;
  border-radius: 5px;
}

.buttons-block .btn-warning {
  background: linear-gradient(180deg, #e69308, #d4860a);
  color: #fff;
}

.buttons-block .btn-warning:hover {
  background: linear-gradient(180deg, #f0a010, #e69308);
}

.buttons-block button .label {
  font-size: 16px;
  font-weight: 700;
  pointer-events: none;
}

.buttons-block button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-tooltip {
  color: #ddd;
  font-size: 14px;
  text-align: center;
}

.second-row {
  width: 100%;
  padding: 5px 0;
}

.cashout-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cash-out-switcher {
  display: flex;
  gap: 15px;
  align-items: center;
}

.cash-out-switcher label {
  font-size: 12px;
  color: #7b7b7b;
  cursor: pointer;
}

.cash-out-switcher input[type="checkbox"] {
  accent-color: #F00B3E;
  cursor: pointer;
}

.cashout-spinner-wrapper {
  margin-top: 5px;
}

.cashout-spinner {
  display: flex;
  align-items: center;
}

.cashout-spinner.disabled { opacity: 0.5; }

.spinner .text-x {
  padding: 0 5px;
  color: #fff;
  opacity: 0.5;
  font-size: 14px;
}

.custom-toaster {
  position: fixed;
  top: 60px;
  right: 20px;
  z-index: 200;
}

.cashout-toaster {
  display: none;
  background: linear-gradient(135deg, #1B1C1D, #2C2D30);
  border: 1px solid #28a745;
  border-radius: 15px;
  padding: 15px 20px;
  min-width: 250px;
  position: relative;
  animation: slideIn 0.3s ease-out;
}

.cashout-toaster.show { display: block; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.cashout-stop {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.stop-number {
  font-size: 18px;
  font-weight: 700;
  color: #28a745;
}

.got-block {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.got-amout {
  text-align: center;
}

.out-amount {
  font-size: 20px;
  font-weight: 700;
  color: #28a745;
}

.star-right, .star-left {
  position: absolute;
  width: 20px;
  height: 20px;
  animation: starSpin 1s linear infinite;
}

.star-right { right: 10px; }
.star-left { left: 10px; }

@keyframes starSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.bold-icon {
  font-variation-settings: 'FILL' 0, 'wght' 700, 'GRAD' 0, 'opsz' 48;
  cursor: pointer;
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 18px;
  color: #7b7b7b;
}

.connecting-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  color: #7b7b7b;
  font-size: 16px;
  border-radius: 20px;
}

.my-bets-section { padding: 0; }

.my-bet-item {
  padding: 6px 0;
  border-bottom: 1px solid rgba(42, 43, 46, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.my-bet-col { text-align: center; }
.my-bet-col:first-child { text-align: left; width: 28%; }
.my-bet-col:nth-child(2) { width: 25%; }
.my-bet-col:nth-child(3) { width: 22%; }
.my-bet-col:nth-child(4) { width: 22%; }

.no-bets-msg {
  text-align: center;
  color: #556677;
  padding: 30px;
  font-size: 14px;
}

.previous-history {
  color: #b8b8b7;
  height: 24px;
  border-radius: 12px;
  border: solid 1px #6f6f6f;
  padding: 0 10px;
  font-size: 12px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.previous-history:hover { border-color: #999; }

@media (max-width: 1399px) {
  .left-sidebar {
    min-width: 320px;
    max-width: 320px;
  }
  .right-sidebar { width: calc(100% - 320px); }
}

@media (max-width: 992px) {
  .main-container { flex-direction: column-reverse; width: 100%; overflow: hidden; }
  .left-sidebar {
    min-width: 100%;
    max-width: 100%;
    padding: 0 5px;
    max-height: 35vh;
  }
  .right-sidebar { width: 100%; }
  .game-play { height: 65vh; padding: 0 5px 5px; }
  .stage-board { min-height: 200px; }
  .counter-num #auto_increment_number { font-size: 48px; line-height: 60px; }
  .center-loading svg { width: 80px; height: 80px; }
  .plane-static { width: 80px; }
  .bet-controls { gap: 4px; padding-top: 5px; }
  .bet-control { min-width: 0; width: 50%; }
  .bet-control .controls { padding: 6px; border-radius: 12px; }
  .buttons-block button { height: 40px; font-size: 14px; }
  .bets-opt-list { gap: 3px; }
  .bet-opt { padding: 2px 8px !important; font-size: 10px !important; }
  .spinner { height: 28px; }
  .second-row { padding: 2px 0; }
  .topbar { padding: 0 10px; height: 42px; }
  .back-btn { padding: 4px 10px; font-size: 0.75rem; }
  .game-title-bar { font-size: 0.85rem; }
  .topbar .balance-display { padding: 4px 10px; font-size: 0.75rem; }
  .contents-blocks { padding: 5px; }
  .history-top { padding: 0; }
  .payouts-block { padding: 4px 0; }
}

@media (max-width: 480px) {
  .game-play { height: 60vh; }
  .left-sidebar { max-height: 40vh; }
  .counter-num #auto_increment_number { font-size: 36px; line-height: 46px; }
  .bet-control .controls { padding: 4px; }
  .navigation-switcher { width: 160px; }
  .buttons-block button { height: 36px; }
}

@media (max-width: 640px) {
  .custom-badge {
    font-size: 11px;
    line-height: 20px;
    height: 18px;
    padding: 0 10px;
  }
}
