.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-body);
  padding: 0 16px;
  height: 37px;
  color: var(--text-primary);
  font-family: 'Proxima Nova', sans-serif;
  z-index: 2224;
  border-bottom: 1px solid var(--border-dark);
}


.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Proxima Nova', sans-serif;
  text-decoration: none;
  padding-bottom: 4px;
}

.logo span {
  color: var(--accent-blue);
  font-weight: 500;
  font-size: 15px;
  font-family: 'Proxima Nova', sans-serif;
}

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

.header-nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.header-nav-link.hide-mobile {
  display: none;
}

.header-nav-link svg {
  display: none;
}

@media (min-width: 1024px) {
  .header-nav-link {
    display: flex;
    align-items: center;
    gap: 3px;
  }

  .header-nav-link.hide-mobile {
    display: flex;
  }

  .header-nav-link svg {
    display: inline-block;
  }
}

/* Promotions — desktop nav link (hidden on mobile) */
.header-promo-desktop {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: 'Proxima Nova', sans-serif;
}

@media (min-width: 1024px) {
  .header-promo-desktop {
    display: flex;
    align-items: center;
    gap: 3px;
  }

  .header-promo-desktop:hover {
    color: var(--accent-blue-hover);
  }

  .header-promo-desktop svg {
    display: inline-block;
  }
}

/* Promotions — mobile icon in right section (hidden on desktop) */
.header-promo-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.header-promo-mobile:hover {
  color: var(--accent-blue-hover);
}

@media (min-width: 1024px) {
  .header-promo-mobile {
    display: none;
  }
}

.search-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.search-icon {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.search-icon-link:hover .search-icon {
  color: var(--text-primary);
}

@media (min-width: 1200px) {
  .search-icon-link:hover .search-icon {
    color: var(--text-primary);
  }
  .search-icon-link:hover {
    background: var(--white-8);
  }
}

.logout {
  background-color: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.logout:hover {
  color:   var(--accent-blue-hover);
}

.header-right-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

@media (max-width: 768px) {
  .header-right-section {
    gap: 6px;
  }

  .balance {
    padding: 2px 6px;
    font-size: 13px;
  }

  .login, .register {
    font-size: 12px;
    padding: 1px 6px;
  }

  .register {
    padding: 1px 8px;
  }
}

.auth {
  display: flex;
  gap: 15px;
  color: var(--text-primary);
  align-items: center;
}

.login {
  font-family: 'Proxima Nova', sans-serif;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  border-radius: 2px;
  padding: 1px 8px;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
}

.login:hover {
  opacity: 0.8;
}

.register {
  font-family: 'Proxima Nova', sans-serif;
  color: var(--text-on-accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-hover) 100%);
  border: none;
  border-radius: 4px;
  padding: 3px 14px;
  cursor: pointer;
  box-shadow: 0 2px 6px var(--accent-green-muted);
}

.register:hover {
  filter: brightness(1.1);
}

.balance:hover {
  color:   var(--accent-blue-hover);
}

.balance {
  color: var(--text-primary);
  display: flex;
  font-family: 'Proxima Nova', sans-serif;
  font-size: 13px;
  font-weight: 600;
  font-feature-settings: "tnum";
  font-variant: tabular-nums;
  background: transparent;
  padding: 3px 8px;
  text-decoration: none;
}

.balance-update {
  animation: flashBalance 0.8s ease-in-out;
}

@keyframes flashBalance {
  0% {
    color: var(--text-primary);
  }
  50% {
    color: var(--text-tertiary);
  }
  100% {
    color: inherit;
  }
}

/* Header navigation links - desktop only */
.header-nav-links {
  display: none;
}

@media (min-width: 1024px) {
  .header-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
  }

  .header-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 5px;
    font-family: 'Proxima Nova', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .header-nav-link:hover {
    color:   var(--accent-blue-hover);
  }

  .header-live-link {
    position: relative;
  }

  .header-live-icon {
    width: 14px;
    height: 14px;
    color: var(--accent-red);
    background-color: currentColor;
    -webkit-mask: url(/static/media/live.305452975aaea3c5f238.svg) no-repeat center;
            mask: url(/static/media/live.305452975aaea3c5f238.svg) no-repeat center;
    mask-size: contain;
    -webkit-mask: url(/static/media/live.305452975aaea3c5f238.svg) no-repeat center;
    -webkit-mask-size: contain;
  }

  .header-live-text {
    position: relative;
    display: inline-block;
  }

  .header-live-badge {
    position: absolute;
    top: -1px;
    right: -14px;
    background-color: var(--accent-red);
    border-radius: 12px;
    font-size: 8px;
    font-weight: bold;
    color: #fff;
    min-width: 12px;
    min-height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
    box-sizing: border-box;
  }

  .header-live-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--accent-red);
    border-radius: 10px;
    margin-left: -2px;
  }

  .header-mybets-link {
    position: relative;
  }

  .header-mybets-icon {
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2714%27 height=%2714%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23ffffff%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z%27/%3E%3Cpolyline points=%2714 2 14 8 20 8%27/%3E%3Cline x1=%2716%27 y1=%2713%27 x2=%278%27 y2=%2713%27/%3E%3Cline x1=%2716%27 y1=%2717%27 x2=%278%27 y2=%2717%27/%3E%3Cpolyline points=%2710 9 9 9 8 9%27/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
  }
  .header-mybets-icon:hover {
    color: var(--accent-blue-hover);
  }
}

/* Deposit button - green style (desktop only) */
.header-deposit-btn {
  display: none;
}

@media (min-width: 1024px) {
  .header-deposit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-hover) 100%);
    color: var(--text-on-accent);
    border: none;
    font-family: 'Proxima Nova', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 4px;
    cursor: pointer;
  }

  .header-deposit-btn:hover {
    filter: brightness(1.1);
  }
}

/* Account icon - desktop only */
.header-account-btn {
  display: none;
}

@media (min-width: 1024px) {
  .header-account-btn {
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
  }

  .header-account-btn:hover {
    color:   var(--accent-blue-hover);
  }

  .header-account-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* MyBets icon - desktop only */
.header-mybets-btn {
  display: none;
}

@media (min-width: 1024px) {
  .header-mybets-btn {
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
  }

  .header-mybets-btn:hover {
    color: var(--accent-blue-hover);
  }

  .header-mybets-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* Inbox icon - desktop only */
.header-inbox-btn {
  display: none;
}

@media (min-width: 1024px) {
  .header-inbox-btn {
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
  }

  .header-inbox-btn:hover {
    color:   var(--accent-blue-hover);
  }

  .header-inbox-btn svg {
    width: 18px;
    height: 18px;
  }

  .header-inbox-badge {
    position: absolute;
    font-size: 8px;
    font-weight: 700;
    color: var(--text-on-accent);
    background-color: var(--accent-red);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px var(--black-30);
    top: -3px;
    right: -1px;
    min-width: 12px;
    height: 12px;
    font-size: 8px;
  }
}

/* Gamble Game Styles */

.gamble-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
  overscroll-behavior: none;
  touch-action: none;
}

.gamble-modal {
  background: linear-gradient(180deg, #2d2d30 0%, #1a1a1d 100%);
  border-radius: 16px;
  width: 100%;
  max-width: 380px;
  max-height: calc(100vh - 32px);
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  touch-action: auto;
  overscroll-behavior: contain;
}

/* Header */
.gamble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.gamble-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #FFD700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #3D3D42;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s;
}

.close-btn:hover {
  background: #FF453A;
}

/* Amount Display */
.gamble-amount {
  text-align: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.amount-label {
  display: block;
  font-size: 11px;
  color: #8E8E93;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.amount-value {
  font-size: 32px;
  font-weight: 800;
  color: #FFD700;
  transition: all 0.3s;
}

.amount-value.won {
  color: #22A849;
  animation: amountPulse 0.5s ease-out;
}

.amount-value.lost {
  color: #FF453A;
}

@keyframes amountPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Doubles Counter */
.gamble-doubles-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.double-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3D3D42;
  border: 2px solid #555;
  transition: all 0.3s ease;
}

.double-dot.active {
  background: #FFD700;
  border-color: #FFD700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.double-dot.active.red {
  background: #dc3545;
  border-color: #dc3545;
  box-shadow: 0 0 8px rgba(220, 53, 69, 0.6);
}

.double-dot.active.black {
  background: #111;
  border-color: #555;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

.doubles-text {
  font-size: 12px;
  color: #8E8E93;
  margin-left: 8px;
  font-weight: 600;
}

/* Card Area */
.gamble-card-area {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 220px;
  min-height: 220px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.gamble-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 100%;
}

.gamble-card-inner .gamble-card {
  margin-top: auto;
}

.gamble-card-status {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  margin-bottom: auto;
}

.card-placeholder,
.card-flip-container,
.card-reveal {
  display: contents;
}

.placeholder-text {
  font-size: 14px;
  color: #8E8E93;
}

/* Card Styles */
.gamble-card {
  width: 120px;
  height: 168px;
  border-radius: 10px;
  background: #fff;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.gamble-card.face-down {
  background: linear-gradient(135deg, #1a4a8a 0%, #0d2d5a 100%);
}

.card-back {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: rgba(255, 255, 255, 0.3);
}

.gamble-card.red {
  color: #dc3545;
}

.gamble-card.black {
  color: #000;
}

.gamble-card .card-corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.gamble-card .card-corner.top-left {
  top: 8px;
  left: 8px;
}

.gamble-card .card-corner.bottom-right {
  bottom: 8px;
  right: 8px;
  transform: rotate(180deg);
}

.gamble-card .card-value {
  font-size: 24px;
  font-weight: 700;
}

.gamble-card .card-suit {
  font-size: 18px;
  display: inline;
}

.gamble-card .card-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.gamble-card .card-suit-big {
  font-size: 52px;
  display: inline;
}

/* Card Reveal Animation */
.card-reveal .gamble-card {
  animation: cardReveal 0.5s ease-out;
}

.card-reveal.win .gamble-card {
  box-shadow: 0 0 30px rgba(34, 168, 73, 0.6);
}

.card-reveal.lose .gamble-card {
  box-shadow: 0 0 30px rgba(255, 69, 58, 0.6);
}

@keyframes cardReveal {
  0% { transform: rotateY(180deg); }
  100% { transform: rotateY(0deg); }
}

.result-text {
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
}

.result-text.win {
  color: #22A849;
  text-shadow: 0 0 10px rgba(34, 168, 73, 0.5);
}

.result-text.lose {
  color: #FF453A;
  text-shadow: 0 0 10px rgba(255, 69, 58, 0.5);
}

/* Card Flip Animation */
.card-flip-container .gamble-card,
.card-flip-container > .gamble-card {
  animation: cardFlip 1.5s ease-in-out infinite;
}

@keyframes cardFlip {
  0%, 100% { transform: rotateY(0deg); }
  50% { transform: rotateY(180deg); }
}

/* Type Selector */
.gamble-type-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.type-btn {
  flex: 1 1;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid #3D3D42;
  background: #29292c;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.type-btn:hover:not(:disabled) {
  border-color: #0A84FF;
}

.type-btn.active {
  border-color: #0A84FF;
  background: rgba(10, 132, 255, 0.2);
}

.type-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Choice Buttons */
.gamble-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 10px;
  gap: 10px;
  margin-bottom: 16px;
  min-height: 130px;
  flex-shrink: 0;
}

.choice-btn {
  padding: 12px 10px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.choice-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.choice-btn.red {
  background: linear-gradient(135deg, #dc3545 0%, #a52834 100%);
  color: #fff;
}

.choice-btn.red:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.5);
}

.choice-btn.black {
  background: linear-gradient(135deg, #343a40 0%, #1d2124 100%);
  color: #fff;
}

.choice-btn.black:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(52, 58, 64, 0.5);
}

.choice-btn.suit {
  background: #29292c;
  border-color: #3D3D42;
}

.choice-btn.suit.hearts,
.choice-btn.suit.diamonds {
  color: #dc3545;
}

.choice-btn.suit.clubs,
.choice-btn.suit.spades {
  color: #fff;
}

.choice-btn.suit:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #FFD700;
}

.choice-icon {
  font-size: 24px;
  line-height: 1;
}

.choice-label {
  font-size: 13px;
  font-weight: 700;
}

.choice-multiplier {
  font-size: 11px;
  opacity: 0.8;
}

/* Disabled section (type selector / choices when not in choosing state) */
.disabled-section {
  opacity: 0.35;
  pointer-events: none;
}

/* Actions — always rendered for stable height */
.gamble-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-shrink: 0;
  min-height: 48px;
}

.action-btn {
  flex: 1 1;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn.collect {
  background: linear-gradient(135deg, #22A849 0%, #1a8a3a 100%);
  color: #fff;
}

.action-btn.collect:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(34, 168, 73, 0.5);
}

.action-btn.again {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000;
}

.action-btn.again:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

.action-btn.close {
  background: #3D3D42;
  color: #fff;
}

.action-btn.close:hover {
  background: #4D4D52;
}

/* Info */
.gamble-info {
  padding-top: 12px;
  border-top: 1px solid #3D3D42;
  flex-shrink: 0;
  margin-top: auto;
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #8E8E93;
  margin-bottom: 3px;
}

.info-row.warning {
  color: #FF9500;
  font-weight: 600;
}

/* Mobile fullscreen */
@media (max-width: 576px) {
  .gamble-overlay {
    padding: 10px 0;
    top: 37px;
  }

  .gamble-modal {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    border-radius: 0;
    padding: 14px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
  }

  .gamble-card {
    width: 110px;
    height: 154px;
  }

  .gamble-card .card-suit-big {
    font-size: 44px;
  }

  .gamble-card .card-back {
    font-size: 48px;
  }

  .gamble-card-area {
    height: 200px;
    min-height: 200px;
  }

  .amount-value {
    font-size: 26px;
  }

  .gamble-choices {
    min-height: 115px;
    gap: 8px;
  }

  .choice-btn {
    padding: 10px 8px;
  }

  .choice-icon {
    font-size: 20px;
  }
}

/* PWA standalone mode - extra bottom padding */
@media (display-mode: standalone) {
  .gamble-modal {
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 20px));
  }
}

