.code-input-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 8px 0;
}

.code-input-box {
  width: 44px;
  height: 52px;
  border-radius: 10px;
  border: 1.5px solid var(--separator-light);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', monospace;
  text-align: center;
  caret-color: var(--accent-blue);
  padding: 0;
  -webkit-appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.code-input-box:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.2);
}

@media (max-width: 380px) {
  .code-input-box {
    width: 38px;
    height: 46px;
    font-size: 20px;
  }

  .code-input-row {
    gap: 6px;
  }
}

/* ===========================================
   Deposit Modal - Professional Crypto Design
   =========================================== */

/* Modal Overlay */
.deposit-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  animation: depositFadeIn 0.2s ease-out;
}

@keyframes depositFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal Container */
.deposit-modal {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-body) 100%);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 24px 80px var(--black-60);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: depositSlideUp 0.3s ease-out;
  border: 1px solid var(--white-8);
}

@keyframes depositSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal Header */
.deposit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(90deg, var(--accent-green-muted) 0%, transparent 100%);
  border-bottom: 1px solid var(--white-5);
}

.deposit-modal-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.deposit-modal-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-hover) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--accent-green-muted);
}

.deposit-modal-icon svg {
  width: 22px;
  height: 22px;
  color: var(--text-primary);
}

.deposit-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.deposit-modal-close {
  background: transparent;
  border: none;
  color: var(--text-quaternary);
  cursor: pointer;
  padding: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.15s;
}

.deposit-modal-close svg {
  width: 20px;
  height: 20px;
}

.deposit-modal-close:hover {
  background: var(--white-8);
  color: var(--accent-red);
}

/* Modal Body */
.deposit-modal-body {
  padding: 24px;
  overflow-y: auto;
}

/* Loading State */
.deposit-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
}

.deposit-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--accent-green-muted);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: depositSpin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes depositSpin {
  to { transform: rotate(360deg); }
}

.deposit-loading p {
  margin: 0;
  font-size: 15px;
}

/* Error State */
.deposit-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--accent-red);
  text-align: center;
}

.deposit-error svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.8;
}

.deposit-error p {
  margin: 0;
  font-size: 15px;
}

/* Network Badge */
.deposit-network-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-green-muted);
  border: 1px solid var(--accent-green-muted);
  color: var(--accent-green);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.deposit-network-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: depositPulse 2s infinite;
}

@keyframes depositPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

/* QR Code Container */
.deposit-qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.deposit-qr-wrapper {
  background: #fff;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 8px 32px var(--black-40);
}

.deposit-qr-hint {
  margin: 12px 0 0 0;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Address Container */
.deposit-address-container {
  margin-bottom: 24px;
}

.deposit-address-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.deposit-address-box {
  background: var(--bg-body);
  border: 1px solid var(--white-10);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deposit-address-text {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.5;
  padding: 12px;
  background: var(--white-3);
  border-radius: 8px;
  text-align: center;
}

.deposit-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-hover) 100%);
  border: none;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 24px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px var(--accent-green-muted);
}

.deposit-copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-green-muted);
}

.deposit-copy-btn:active {
  transform: translateY(0);
}

.deposit-copy-btn.copied {
  background: linear-gradient(135deg, var(--accent-green-hover) 0%, #15803d 100%);
}

.deposit-copy-btn svg {
  width: 18px;
  height: 18px;
}

/* Important Notes */
.deposit-notes {
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.2);
  /* warning colors are intentionally hardcoded */
  border-radius: 12px;
  padding: 16px;
}

.deposit-notes-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-warning);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.deposit-info-icon {
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent-warning);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  flex-shrink: 0;
}

.deposit-notes-list {
  margin: 0;
  padding: 0 0 0 28px;
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 1.7;
}

.deposit-notes-list li {
  margin-bottom: 4px;
}

.deposit-notes-list li:last-child {
  margin-bottom: 0;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .deposit-modal-overlay {
    padding: 0;
    align-items: flex-start;
    padding-top: 20px;
  }

  .deposit-modal {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 16px;
    margin: 0 8px;
    animation: depositSlideDown 0.3s ease-out;
  }

  @keyframes depositSlideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .deposit-modal-header {
    padding: 16px 20px;
  }

  .deposit-modal-icon {
    width: 36px;
    height: 36px;
  }

  .deposit-modal-icon svg {
    width: 18px;
    height: 18px;
  }

  .deposit-modal-title {
    font-size: 18px;
  }

  .deposit-modal-body {
    padding: 20px;
  }

  .deposit-qr-wrapper {
    padding: 12px;
  }

  .deposit-address-text {
    font-size: 12px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .deposit-modal-overlay,
  .deposit-modal,
  .deposit-copy-btn,
  .deposit-modal-close,
  .deposit-spinner,
  .deposit-network-dot {
    animation: none;
    transition: none;
  }
}

/* ===========================================
   Withdraw Modal - Additional Styles
   =========================================== */

/* Withdraw Icon - Orange/Red gradient */
.withdraw-icon {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3) !important;
}

/* Balance Display */
.withdraw-balance-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--white-3);
  border: 1px solid var(--white-8);
  border-radius: 12px;
  margin-bottom: 20px;
}

.withdraw-balance-label {
  font-size: 13px;
  color: var(--text-tertiary);
}

.withdraw-balance-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-green);
}

/* Input Groups */
.withdraw-input-group {
  margin-bottom: 20px;
  max-width: 100%;
  overflow: hidden;
}

.withdraw-input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.withdraw-amount-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-body);
  border: 1px solid var(--white-10);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.withdraw-amount-wrapper:focus-within {
  border-color: var(--accent-green);
}

.withdraw-currency {
  padding: 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.withdraw-input {
  flex: 1 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 16px 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 0;
}

.withdraw-input::placeholder {
  color: var(--text-quaternary);
}

.withdraw-input::-webkit-outer-spin-button,
.withdraw-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.withdraw-input[type=number] {
  -moz-appearance: textfield;
}

.withdraw-max-btn {
  background: var(--accent-green-muted);
  border: none;
  color: var(--accent-green);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  margin-right: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.withdraw-max-btn:hover {
  background: var(--accent-green-muted);
}

.withdraw-input-hint {
  display: block;
  font-size: 12px;
  color: var(--text-quaternary);
  margin-top: 8px;
}

.withdraw-address-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--bg-body);
  border: 1px solid var(--white-10);
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  font-family: 'SF Mono', 'Fira Code', monospace;
  overflow: hidden;
  text-overflow: ellipsis;
}

.withdraw-address-input:focus {
  border-color: var(--accent-green);
}

.withdraw-address-input::placeholder {
  color: var(--text-quaternary);
  font-family: inherit;
}

/* Error Message */
.withdraw-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--accent-red-muted);
  border: 1px solid var(--accent-red-muted);
  border-radius: 10px;
  margin-bottom: 20px;
  color: var(--accent-red);
  font-size: 14px;
}

.withdraw-error svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Submit Button */
.withdraw-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border: none;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  padding: 16px 24px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
  /* withdraw orange — intentionally hardcoded */
  margin-bottom: 20px;
}

.withdraw-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.withdraw-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.withdraw-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.withdraw-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--white-30);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: depositSpin 0.8s linear infinite;
}

/* Success State */
.withdraw-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0;
}

.withdraw-success-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-hover) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px var(--accent-green-muted);
}

.withdraw-success-icon svg {
  width: 32px;
  height: 32px;
  color: var(--text-on-accent);
}

.withdraw-success h3 {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.withdraw-success p {
  margin: 0 0 24px 0;
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.withdraw-done-btn {
  background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-hover) 100%);
  border: none;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 48px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px var(--accent-green-muted);
}

.withdraw-done-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-green-muted);
}

/* Bonus Warning */
.deposit-bonus-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.3);
  /* warning orange — intentionally hardcoded */
  border-radius: 8px;
  color: var(--accent-orange);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 12px;
}

/* Withdraw Bonus Block */
.withdraw-bonus-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  text-align: center;
}

.withdraw-bonus-block svg {
  color: var(--accent-red);
}

.withdraw-bonus-block p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.withdraw-bonus-block .bonus-block-hint {
  color: var(--text-tertiary);
  font-size: 11px;
}

/* Cookie Consent Banner */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding: 0 16px 16px;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-consent--closing {
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

.cookie-consent__container {
  max-width: 480px;
  margin: 0 auto;
  background: linear-gradient(to bottom, var(--bg-elevated), var(--bg-body));
  border: 1px solid var(--white-8);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow:
    0 -4px 20px var(--black-40),
    0 0 40px var(--black-30);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}

.cookie-consent__icon {
  display: flex;
  justify-content: center;
  animation: bounce 1s ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.cookie-consent__content {
  text-align: center;
}

.cookie-consent__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  font-family: 'Proxima Nova', sans-serif;
}

.cookie-consent__text {
  font-size: 13px;
  color: var(--white-70);
  margin: 0;
  line-height: 1.5;
  font-family: 'Proxima Nova', sans-serif;
}

.cookie-consent__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.cookie-consent__btn {
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Proxima Nova', sans-serif;
  border: none;
}

.cookie-consent__btn--accept {
  background: linear-gradient(135deg, var(--bg-quaternary) 0%, var(--separator-light) 100%);
  color: var(--text-on-accent);
  box-shadow: 0 4px 12px var(--black-30);
  border: 1px solid var(--white-10);
}

.cookie-consent__btn--accept:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--separator-light) 0%, var(--keyboard-key) 100%);
  box-shadow: 0 6px 16px var(--black-40);
}

.cookie-consent__btn--accept:active {
  transform: translateY(0);
}

/* Desktop adjustments */
@media (min-width: 768px) {
  .cookie-consent {
    padding: 0 24px 24px;
  }

  .cookie-consent__container {
    flex-direction: row;
    align-items: center;
    max-width: 800px;
    padding: 20px 28px;
  }

  .cookie-consent__icon {
    flex-shrink: 0;
  }

  .cookie-consent__content {
    text-align: left;
    flex: 1 1;
  }

  .cookie-consent__actions {
    flex-shrink: 0;
  }
}

/* Chat Widget */

/* Floating Action Button */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: transform 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.chat-fab:hover {
  transform: scale(1.08);
}

.chat-fab:active {
  transform: scale(0.95);
}

.chat-fab-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.5);
}

.chat-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: var(--accent-red);
  color: #fff;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Chat Window */
.chat-window {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 360px;
  height: 500px;
  background: var(--bg-elevated);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chatSlideUp 0.25s ease-out;
}

@keyframes chatSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header */
.chat-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--accent-blue);
  color: #fff;
  flex-shrink: 0;
}

.chat-window-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
}

.chat-window-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.chat-window-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Body */
.chat-window-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Loading */
.chat-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 40px 0;
}

.chat-loading-dot {
  width: 8px;
  height: 8px;
  background: var(--text-quaternary);
  border-radius: 50%;
  animation: chatDotPulse 1.2s infinite;
}

.chat-loading-dot:nth-child(2) { animation-delay: 0.15s; }
.chat-loading-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes chatDotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* Empty */
.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1;
  color: var(--text-quaternary);
  gap: 8px;
}

.chat-empty p {
  font-size: 13px;
  margin: 0;
}

/* Bubbles */
.chat-bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 14px;
  word-break: break-word;
}

.chat-bubble-user {
  align-self: flex-end;
  background: var(--accent-blue-muted);
  color: var(--text-primary);
  border-bottom-right-radius: 4px;
}

.chat-bubble-admin {
  align-self: flex-start;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-bubble-name {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 2px;
}

.chat-bubble-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.chat-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 3px;
}

.chat-bubble-time {
  font-size: 10px;
  opacity: 0.6;
}


.chat-read-icon {
  opacity: 0.5;
}

.chat-read-icon.read {
  opacity: 1;
  color: #34d399;
}

.chat-bubble-user .chat-read-icon {
  color: var(--text-quaternary);
}

.chat-bubble-user .chat-read-icon.read {
  color: #34d399;
}

/* Sticky date header */
.chat-date-sticky {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding: 6px 0;
  align-self: center;
}

.chat-date-sticky span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgb(30 30 40 / 43%);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  padding: 4px 12px;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Unread messages divider */
.chat-unread-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.chat-unread-divider::before,
.chat-unread-divider::after {
  content: '';
  flex: 1 1;
  height: 1px;
  background: var(--accent-blue);
  opacity: 0.4;
}

.chat-unread-divider span {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-blue);
  white-space: nowrap;
}

/* Typing indicator */
.chat-typing {
  align-self: flex-start;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}

.chat-typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.chat-typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--text-quaternary);
  border-radius: 50%;
  animation: chatTypingBounce 1.2s infinite;
}

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

@keyframes chatTypingBounce {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* Input */
.chat-window-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--separator);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.chat-window-input input {
  flex: 1 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--separator);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
}

.chat-window-input input:focus {
  border-color: var(--accent-blue);
}

.chat-window-input input::placeholder {
  color: var(--text-quaternary);
}

.chat-window-input button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.chat-window-input button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chat-window-input button:hover:not(:disabled) {
  opacity: 0.85;
}

/* Desktop — hide FAB, chat opens from header icon */
@media (min-width: 1024px) {
  .chat-fab {
    display: none;
  }
}

/* Mobile — FAB only, chat opens as page */
@media (max-width: 480px) {
  .chat-fab {
    bottom: 80px;
    right: 16px;
    width: 50px;
    height: 50px;
  }
}

/* src/frontend/src/pages/DepositPage.css */
.deposit-page { max-width: 520px; color: var(--text-primary); margin: 0 auto; text-align: center; }
.address { word-break: break-all; color: var(--text-primary); }
.amount-input { margin: 1rem 0; color: var(--text-primary); }
.dp-error { color: var(--accent-red); }
.tips { text-align: left; margin-top: 1rem; color: var(--text-primary); }
.deposit-page {
  max-width: 500px;
  margin: 0 auto 60px;
  color: var(--text-primary);
  padding: 20px;
  text-align: center;
  font-family: 'Proxima Nova', sans-serif;
  background-color: var(--bg-elevated);
  border-radius: 4px;
}


.deposit-address-box {
  border: 1px solid var(--border-color);
  padding: 12px;
  background-color: var(--bg-elevated);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  flex-direction: column;
  gap: 14px;
  word-break: break-all;
  box-shadow: 3px 3px 7px 0 var(--black-20);
}

.address-value {
  flex: 1 1;
  font-weight: bold;
  text-align: left;
  padding-left: 5px;
  font-size: 14px;
  text-align: center;
  padding-bottom: 10px;
  width: 100%;
  border-bottom: 1px solid var(--border-color);
}

.copy-button {
  background-color: var(--accent-blue);
  color: var(--text-on-accent);
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.copy-button:hover {
  background-color: var(--accent-blue-hover);
}

.deposit-qrcode-box {
  margin: 20px auto;
  padding: 12px;
  background-color: #ffffff;
  border-radius: 12px;
  display: inline-block;
  box-shadow: 3px 3px 7px 0 var(--black-50);
}

.deposit-note {
  font-size: 13px;
  border: 1px solid var(--border-color);
  color: var(--text-tertiary);
  text-align: left;
  background-color: var(--bg-tertiary);
  padding: 5px 15px;
  border-radius: 4px;
  box-shadow: 3px 3px 7px 0 var(--black-20);
}

.deposit-note strong {
  color: var(--text-primary);
}

.dp-error {
  color: var(--accent-red);
  margin: 10px 0;
}

.dp-back-button {
  margin-top: 20px;
  background-color: var(--accent-blue);
  color: var(--text-on-accent);
  border: none;
  padding: 8px 40px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 3px 3px 7px 0 var(--black-20);
}

.dp-back-button:hover {
  background-color: var(--accent-blue-hover);
}

.dp-title {
  background-color: var(--bg-body);
  box-shadow: 0 3px 2px var(--black-30);
  color: var(--text-primary);
  display: flex;
  font-family: Proxima Nova,sans-serif;
  font-size: 26px;
  font-weight: bold;
  justify-content: center;
  left: 0;
  margin: 0;
  padding: 10px 0;
  position: sticky;
  top: 36px;
  width: 100%;
  z-index: 1000;
}

@media (min-width: 1024px) {
  .dp-title {
    position: sticky;
    top: 0;
  }
  .deposit-page {
    margin: 10px auto 60px;
 }
  }

/* InboxPage.css */

.inbox-page {
  background-color: var(--bg-primary);
  min-height: calc(100vh - 96px);
}

/* Sticky header for internal navigation (message view etc.) */
.inbox-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background-color: var(--bg-body);
  border-bottom: 1px solid var(--separator);
  z-index: 90;
  height: 44px;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .inbox-header {
    background-color: var(--bg-tertiary);
    border-radius: 10px 10px 0 0;
  }
}

.inbox-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .inbox-back-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
  }
}

.inbox-back-btn:active {
  background-color: var(--bg-tertiary);
}

.inbox-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.inbox-header-actions {
  display: flex;
  gap: 4px;
}

.inbox-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .inbox-action-btn:hover {
    background-color: var(--bg-tertiary);
  }
  .inbox-action-btn.delete:hover {
    color: var(--accent-red);
  }
}

.inbox-action-btn:active {
  background-color: var(--bg-tertiary);
}

/* Body */
.inbox-body {
  padding-bottom: 70px;
}

/* Loading */
.inbox-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
}

.inbox-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: inboxSpin 0.8s linear infinite;
}

@keyframes inboxSpin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.inbox-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}

.inbox-empty svg {
  margin-bottom: 16px;
  opacity: 0.4;
}

.inbox-empty p {
  font-size: 14px;
  margin-bottom: 0;
}

/* Message list */
.inbox-list {
  padding: 0;
}

.inbox-item {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--separator);
  -webkit-tap-highlight-color: transparent;
}

.inbox-item-main {
  display: flex;
  flex: 1 1;
  min-width: 0;
  padding: 12px 0 12px 16px;
  cursor: pointer;
}

@media (hover: hover) {
  .inbox-item:hover {
    background-color: var(--bg-secondary);
  }
}

.inbox-item:active {
  background-color: var(--bg-secondary);
}

.inbox-item.unread {
  background-color: rgba(0, 122, 255, 0.06);
}

.inbox-item-indicator {
  width: 18px;
  display: flex;
  align-items: flex-start;
  padding-top: 5px;
  flex-shrink: 0;
}

.unread-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-blue);
  border-radius: 50%;
}

.inbox-item-content {
  flex: 1 1;
  min-width: 0;
}

.inbox-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.inbox-item-sender {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.inbox-item-sender.admin {
  color: var(--accent-blue);
}

.inbox-item-date {
  font-size: 11px;
  color: var(--text-tertiary);
}

.inbox-item-subject {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-item.unread .inbox-item-subject {
  font-weight: 600;
}

.inbox-item-preview {
  font-size: 13px;
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

/* Delete button in list */
.inbox-item-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  margin-right: 10px;
  background: none;
  border: none;
  color: var(--text-quaternary);
  cursor: pointer;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}

@media (hover: hover) {
  .inbox-item-delete:hover {
    color: var(--accent-red);
    background-color: rgba(255, 59, 48, 0.1);
  }
}

/* Message content */
.message-content {
  padding: 16px;
}

.message-subject {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--separator);
}

.message-sender {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.message-sender.admin {
  color: var(--accent-blue);
}

.message-date {
  font-size: 12px;
  color: var(--text-tertiary);
}

.message-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}

.message-body p {
  margin: 0 0 12px;
}

.message-body img {
  max-width: 100%;
  border-radius: 8px;
}

/* Delete Confirmation Modal */
.inbox-delete-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  animation: inboxFadeIn 0.15s ease-out;
}

@keyframes inboxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.inbox-delete-modal {
  background: var(--bg-elevated);
  border-radius: 16px;
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 20px 60px var(--black-50);
  animation: inboxSlideUp 0.2s ease-out;
}

@keyframes inboxSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.inbox-delete-icon {
  color: var(--accent-red);
  margin-bottom: 12px;
}

.inbox-delete-modal h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.inbox-delete-modal p {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.5;
  margin: 0 0 20px;
}

.inbox-delete-actions {
  display: flex;
  gap: 10px;
}

.inbox-delete-cancel {
  flex: 1 1;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--separator);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

@media (hover: hover) {
  .inbox-delete-cancel:hover {
    background: var(--bg-quaternary);
  }
}

.inbox-delete-confirm {
  flex: 1 1;
  padding: 12px;
  background: var(--accent-red);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}

@media (hover: hover) {
  .inbox-delete-confirm:hover {
    opacity: 0.9;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .inbox-body {
    padding-bottom: 40px;
  }
}

@media (max-width: 1024px) {
  .inbox-header {
    top: 36px;
  }
}

/* ChatPage — mobile full-page chat */
/* Height is set via JS (visualViewport) */

.chat-page {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

/* Blue header — same style as desktop widget */
.chat-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--accent-blue);
  color: #fff;
  flex-shrink: 0;
}

.chat-page-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
}

.chat-page-header-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.chat-page-header-close:active {
  background: rgba(255, 255, 255, 0.35);
}

/* Messages body */
.chat-page-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Sticky date header */
.chat-date-sticky {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding: 6px 0;
  align-self: center;
}

.chat-date-sticky span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgb(30 30 40 / 43%);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  padding: 4px 12px;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Unread messages divider */
.chat-unread-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.chat-unread-divider::before,
.chat-unread-divider::after {
  content: '';
  flex: 1 1;
  height: 1px;
  background: var(--accent-blue);
  opacity: 0.4;
}

.chat-unread-divider span {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-blue);
  white-space: nowrap;
}

/* Typing indicator */
.chat-typing {
  align-self: flex-start;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}

.chat-typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.chat-typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--text-quaternary);
  border-radius: 50%;
  animation: chatTypingBounce 1.2s infinite;
}

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

@keyframes chatTypingBounce {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* Input area */
.chat-page-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--separator);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.chat-page-input input {
  flex: 1 1;
  background: var(--bg-tertiary);
  border: 1px solid var(--separator);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
}

.chat-page-input input:focus {
  border-color: var(--accent-blue);
}

.chat-page-input input::placeholder {
  color: var(--text-quaternary);
}

.chat-page-input button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-page-input button:disabled {
  opacity: 0.4;
}

.horses-page {
  padding: 0;
  max-width: 800px;
  margin: 0 auto;
}

.horses-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 0px 0px 16px 0px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.horses-icon {
  width: 32px;
  height: 32px;
  color: #fff;
  color: var(--text-primary, #fff);
}

.horses-header h1 {
  margin: 0;
  font-size: 1.5rem;
  color: #fff;
  color: var(--text-primary, #fff);
  flex: 1 1;
}

.horses-count {
  font-size: 0.875rem;
  color: #888;
  color: var(--text-secondary, #888);
  background: #1a1a1a;
  background: var(--bg-secondary, #1a1a1a);
  padding: 4px 10px;
  border-radius: 12px;
}

.horses-cache-info {
  font-size: 0.75rem;
  color: #666;
  color: var(--text-secondary, #666);
  text-align: center;
  padding: 4px 16px;
  margin-bottom: 8px;
}

.horses-loading,
.horses-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #888;
  color: var(--text-secondary, #888);
}

.horses-error button {
  margin-top: 16px;
  padding: 10px 24px;
  background: #f5a623;
  background: var(--accent-color, #f5a623);
  color: var(--text-on-accent);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.horses-regions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.horses-region {
  background: var(--gradient-fixture);
  border-radius: 12px;
  overflow: hidden;
}

.horses-region-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-elevated); /* Darker background for region header */
  border: none;
  color: #fff;
  color: var(--text-primary, #fff);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

/* Desktop only hover */
@media (hover: hover) and (pointer: fine) {
  .horses-region-header:hover {
    background: var(--bg-elevated);
  }
}

.region-flag {
  font-size: 1.5rem;
}

.region-flag-img {
  width: 28px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 3px var(--black-30);
}

.region-name {
  flex: 1 1;
  text-align: left;
  font-weight: 600;
}

.region-count {
  font-size: 0.8rem;
  color: #888;
  color: var(--text-secondary, #888);
}

.region-arrow {
  font-size: 0.75rem;
  color: #888;
  color: var(--text-secondary, #888);
  transition: transform 0.2s;
}

.horses-region-header.expanded .region-arrow {
  transform: rotate(0deg);
}

.horses-leagues {
  border-top: 1px solid #2a2a2a;
  border-top: 1px solid var(--border-color, #2a2a2a);
}

.horses-league-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 22px;
  color: #fff;
  color: var(--text-primary, #fff);
  text-decoration: none;
  transition: background 0.2s;
  border-bottom: 1px solid var(--bg-tertiary);
}

.horses-league-item:last-child {
  border-bottom: none;
}

/* Desktop only hover */
@media (hover: hover) and (pointer: fine) {
  .horses-league-item:hover {
    background: var(--hover-bg);
  }
}

.league-flag {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 2px var(--black-30);
  flex-shrink: 0;
}

.hp-league-name {
  flex: 1 1;
  font-weight: 600;
  color: var(--text-primary) !important;
  font-family: Proxima Nova, sans-serif;
  line-height: 16px;
  font-size: 14px;
  padding: 0 !important;
}

.league-info {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: #888;
  color: var(--text-secondary, #888);
}

.league-next {
  color: #f5a623;
  color: var(--accent-color, #f5a623);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  width: 50px;
  text-align: right;
}

.league-races {
  width: 55px;
  text-align: right;
}

.league-next.urgent {
  color: var(--accent-red);
  font-weight: 600;
}

.league-next.critical {
  color: #ef4444;
  font-weight: 600;
  animation: pulse-urgent 1s ease-in-out infinite;
}

.league-arrow {
  color: #888;
  color: var(--text-secondary, #888);
}

/* Race Page Styles */
.horses-race-page {
  padding: 0;
  padding-bottom: 140px; /* Space for bottom nav + betslip */
  max-width: 900px;
  margin: 0 auto;
}

/* Sticky header container for race page */
.race-sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  margin: 0 0 16px 0;
  padding: 0;
}

.race-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 5px;
}

.race-horse-icon {
  width: 28px;
  height: 28px;
  color: #fff;
  color: var(--text-primary, #fff);
}

.race-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.race-title-main {
  font-size: 0.75rem;
  color: #888;
  color: var(--text-secondary, #888);
  font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.race-title-track {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  color: var(--text-primary, #fff);
  font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, sans-serif;
}

.region-flag-icon {
  width: 20px;
  height: 15px;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  border-radius: 2px;
  box-shadow: 0 1px 2px var(--black-30);
}

.hp-back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #1a1a1a;
  background: var(--bg-secondary, #1a1a1a);
  border: none;
  border-radius: 8px;
  color: #fff;
  color: var(--text-primary, #fff);
  font-size: 1.2rem;
  cursor: pointer;
}

[data-theme="day"] .hp-back-button .back-arrow-icon {
  filter: brightness(0);
}

.race-page-header h1 {
  margin: 0;
  font-size: 1.25rem;
  color: #fff;
  color: var(--text-primary, #fff);
  font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
}

.race-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0px 0px 10px 0px;
  border-bottom: 1px solid #2a2a2a;
  border-bottom: 1px solid var(--border-color, #2a2a2a);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.race-tabs::-webkit-scrollbar {
  display: none;
}

.race-tab {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  background: #1a1a1a;
  background: var(--bg-secondary, #1a1a1a);
  border: none;
  border-radius: 8px;
  color: #888;
  color: var(--text-secondary, #888);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

/* Desktop only hover */
@media (hover: hover) and (pointer: fine) {
  .race-tab:hover {
    background: var(--bg-tertiary);
  }
}

.race-tab.active {
  background: var(--accent-warning);
  color: var(--text-on-accent);
  font-weight: 600;
}

.race-tab.finished {
  opacity: 0.3;
  background: var(--white-10);
  color: var(--text-tertiary);
}

.race-tab.finished.active {
  opacity: 1;
  background: var(--white-20);
  color: var(--text-secondary);
}

.race-tab.started {
  background: var(--white-10);
  border: 1px solid var(--white-15);
  opacity: 0.55;
  color: var(--text-tertiary);
}

.race-tab.started.active {
  background: var(--white-15);
  opacity: 1;
  color: var(--text-secondary);
}

.race-tab.canceled {
  opacity: 0.5;
  background: var(--white-10);
  border: 1px solid var(--white-15);
  color: var(--text-tertiary);
  text-decoration: line-through;
}

.race-tab.canceled.active {
  opacity: 0.8;
  background: var(--white-15);
}

.race-tab-num {
  font-size: 0.75rem;
  font-weight: 500;
}

.race-tab-time {
  font-weight: 600;
  font-size: 0.9rem;
}

.race-details {
  border-radius: 12px;
  overflow: hidden;
}

.race-info-bar {
  display: flex;
  justify-content: space-between;
  min-height: 22px;
  align-items: center;
  padding: 16px 14px;
  background: var(--bg-elevated);
  border-bottom: 1px solid #2a2a2a;
  border-bottom: 1px solid var(--border-color, #2a2a2a);
}

.race-name-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f59e0b;
  color: var(--accent-color, #f59e0b);
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.03) 100%);
  border-bottom: 1px solid #2a2a2a;
  border-bottom: 1px solid var(--border-color, #2a2a2a);
  font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, sans-serif;
}

.race-info-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.race-number {
  font-weight: 600;
  font-size: 0.75rem;
  color: #fff;
  color: var(--text-primary, #fff);
  font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, sans-serif;
}

.race-datetime {
  font-size: 0.75rem;
  color: #aaa;
  color: var(--text-secondary, #aaa);
  font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, sans-serif;
}

.countdown {
  font-size: 0.75rem;
  color: #4ade80;
  font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  min-width: 100px;
  display: inline-block;
}

.countdown.warning {
  color: #ef4444;
}

.countdown.urgent {
  color: #ef4444;
  animation: pulse-urgent 1s ease-in-out infinite;
}

.countdown.started {
  color: #ef4444;
}

.countdown.canceled {
  color: #9ca3af;
  font-style: italic;
}

@keyframes pulse-urgent {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.race-ew-terms {
  font-size: 0.7rem;
  color: #888;
  color: var(--text-secondary, #888);
  padding: 4px 10px;
  background: #1a1a1a;
  background: var(--bg-secondary, #1a1a1a);
  border-radius: 3px;
  font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, sans-serif;
  white-space: nowrap;
}

.horses-table {
  width: 100%;
}

.horse-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  padding: 5px 10px;
  min-height: 50px;
  border-bottom: 1px solid var(--bg-tertiary);
  grid-gap: 12px;
  gap: 12px;
  background: var(--gradient-fixture);
}

/* Hover only on devices that support it (not touch) */
@media (hover: hover) {
  .horse-row:hover {
    background: var(--hover-bg);
  }
}

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

.horse-position {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #222;
  background: var(--bg-tertiary, #222);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  color: var(--text-secondary, #888);
}

/* Removed yellow highlight for first horse - all positions now same style */

.horse-name {
  flex: 1 1;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  color: var(--text-primary, #fff);
  font-family: Proxima Nova Cond, sans-serif;
}

.horse-country-flag {
  width: 16px;
  height: 12px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 2px;
  object-fit: cover;
}

.horse-odds {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.odds-buttons-row {
  display: flex;
  gap: 8px;
}

.odds-button {
  min-width: 65px;
  padding: 6px 5px;
  background: #222;
  background: var(--bg-tertiary, #222);
  border: 1px solid #2a2a2a;
  border: 1px solid var(--border-color, #2a2a2a);
  border-radius: 6px;
  color: #fff;
  color: var(--text-primary, #fff);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

/* Desktop only hover - keep text white */
@media (hover: hover) and (pointer: fine) {
  .odds-button:hover {
    background: #f5a623;
    background: var(--accent-color, #f5a623);
    border-color: #f5a623;
    border-color: var(--accent-color, #f5a623);
  }

  .odds-button:hover .odds-label {
    color: #888;
    color: var(--text-secondary, #888);
  }
}

.odds-button.active {
  background: #f5a623;
  background: var(--accent-color, #f5a623);
  border-color: #f5a623;
  border-color: var(--accent-color, #f5a623);
}

.odds-button.disabled,
.odds-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--white-20);
}

.odds-button.win-odds {
  background: var(--bg-elevated);
}

.odds-button.place-odds {
  background: var(--bg-primary);
  font-size: 0.8rem;
}

.odds-button .odds-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  color: #888;
  color: var(--text-secondary, #888);
  margin-bottom: 2px;
}

.no-place-odds {
  min-width: 60px;
  padding: 8px 12px;
  font-size: 0.75rem;
  color: #666;
  color: var(--text-secondary, #666);
  text-align: center;
}

/* SP (Starting Price) odds - not yet available */
.odds-button.sp-odds {
  min-width: 43px;
  padding: 5px 10px;
  background: #1a1a1a;
  background: var(--bg-tertiary, #1a1a1a);
  border: 1px dashed #333;
  border: 1px dashed var(--border-color, #333);
  border-radius: 6px;
  color: #666;
  color: var(--text-secondary, #666);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  cursor: not-allowed;
  opacity: 0.7;
}

.odds-button.sp-odds .odds-label {
  color: #555;
  color: var(--text-secondary, #555);
}

/* Flash animation for odds changes */
.odds-button.up {
  animation: flash-up 1.5s ease-out;
}

.odds-button.down {
  animation: flash-down 1.5s ease-out;
}

@keyframes flash-up {
  0% {
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.6);
  }
  100% {
    background: #222;
    background: var(--bg-tertiary, #222);
    box-shadow: none;
  }
}

@keyframes flash-down {
  0% {
    background: #ef4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
  }
  100% {
    background: #222;
    background: var(--bg-tertiary, #222);
    box-shadow: none;
  }
}

@media (max-width: 600px) {
  .horses-race-page {
    padding: 0;
  }

  .race-info-bar {
    padding: 10px 12px;
  }

  .horses-race-page {
    padding: 0;
  }

  .race-details {
    border-radius: 0px;
  }

  .race-sticky-header {
    margin-bottom: 0;
  }
}
/* Mobile adjustments */
@media (max-width: 1023px) {
  .horses-page {
    padding: 0 12px;
  }

  .race-sticky-header {
    top: 37px;
    padding: 10px 0px 0px 0px;
  }

  .horses-race-page {
    padding-bottom: 120px;
  }

  .horses-header h1 {
    font-size: 1.25rem;
  }

  .horses-header {
    top: 36px;
  }

  .horses-league-item {
    padding-left: 16px;
  }

  .league-info {
    flex-direction: row;
    gap: 4px;
    align-items: flex-end;
  }

  .horse-odds {
    gap: 4px;
  }

  .odds-button {
    min-width: 65px;
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .race-tab {
    padding: 6px 12px;
  }
}

/* Scratched horses styling */
.horse-row.scratched {
  opacity: 0.45;
}

.horse-row.scratched .horse-name {
  color: var(--text-tertiary);
}

.scratched-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: middle;
  filter: grayscale(50%);
}

.scratched-label {
  color: #ff4757;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 16px;
  background: rgba(255, 71, 87, 0.1);
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Win Only badge */
.race-ew-terms.win-only {
  background: rgba(255, 165, 0, 0.15);
  color: #ffa500;
  border: 1px solid rgba(255, 165, 0, 0.3);
  font-weight: 600;
}

/* B365 TEST - Expanded horse row */
.horse-row.expanded {
  background: rgba(74, 222, 128, 0.05);
  box-shadow: inset 3px 0 0 #4ade80; /* Use inset shadow instead of border to avoid layout shift */
}

/* Info button for spotlight - gray and subtle */
.horse-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  padding: 0;
  background: var(--white-10);
  border: none;
  border-radius: 50%;
  color: var(--text-quaternary);
  font-size: 0.6rem;
  cursor: pointer;
  transition: all 0.15s ease;
  vertical-align: middle;
  flex-shrink: 0;
}

.horse-info-btn:hover {
  background: var(--white-20);
  color: var(--text-secondary);
}

.horse-row.expanded .horse-info-btn {
  background: var(--text-quaternary);
  color: var(--text-secondary);
}

/* Form display (race history) */
.horse-form {
  display: inline-block;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 0.7rem;
  color: #f5a623;
  background: rgba(245, 166, 35, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  letter-spacing: 1px;
  vertical-align: middle;
}

/* Jockey/Trainer row */
.horse-jt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* Analysis section (spotlight/lastRun) - full width of horse-row */
.horse-analysis {
  grid-column: 1 / -1; /* Span all grid columns */
  margin-top: 8px;
  margin-left: -10px;
  margin-right: -10px;
  margin-bottom: -5px;
  padding: 10px 12px;
  background: var(--black-30);
  border-top: 1px solid var(--white-5);
  font-size: 0.65rem;
  line-height: 1.4;
}

.analysis-section {
  margin-bottom: 4px;
}

.analysis-section:last-child {
  margin-bottom: 0;
}

.analysis-label {
  font-weight: 600;
  color: #4ade80;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: block;
  margin-bottom: 2px;
}

.analysis-text {
  margin: 0;
  color: #999;
  color: var(--text-secondary, #999);
  font-size: 0.62rem;
  line-height: 1.35;
}

/* Track dropdown navigation */
.race-title-track-wrapper {
  position: relative;
}

.race-title-track.clickable {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.race-title-track.clickable:hover {
  opacity: 0.8;
}

.track-dropdown-arrow {
  font-size: 0.6rem;
  transition: transform 0.2s ease;
  opacity: 0.6;
}

.track-dropdown-arrow.open {
  transform: rotate(180deg);
}

.track-dropdown-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
}

.track-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: #1a1a1a;
  background: var(--bg-secondary, #1a1a1a);
  border: 1px solid var(--white-8);
  border-radius: 8px;
  min-width: 300px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 20px var(--black-50);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

@media (max-width: 1023px) {
  .track-dropdown {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 100px;
    min-width: 0;
    min-width: initial;
    width: auto;
    max-height: 60vh;
  }
}

/* Region header in dropdown - NOT sticky to avoid stacking */
.track-dropdown-header {
  padding: 8px 16px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-top: 1px solid rgba(74, 222, 128, 0.3);
  border-bottom: 1px solid rgba(74, 222, 128, 0.15);
  margin-top: 4px;
}

.track-dropdown-header:first-child {
  margin-top: 0;
  border-top: none;
}

.track-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid var(--white-5);
}

.track-dropdown-item:last-child {
  border-bottom: none;
}

/* Hover only on devices that support it (not touch) */
@media (hover: hover) {
  .track-dropdown-item:hover {
    background: #222;
    background: var(--bg-tertiary, #222);
  }
}

.track-dropdown-item.active {
  background: #222;
  background: var(--bg-tertiary, #222);
}

.track-flag-small {
  width: 20px;
  height: 15px;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  border-radius: 2px;
}

.track-dropdown-item .track-name {
  flex: 1 1;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.track-dropdown-item .track-next-race {
  font-size: 0.8rem;
  color: #888;
  color: var(--text-secondary, #888);
  font-weight: 500;
}

/* Race extra info (distance, conditions, prize) */
.race-extra-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  background: var(--white-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}

.race-extra-info span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: #888;
  color: var(--text-secondary, #888);
  background: var(--white-5);
  padding: 4px 10px;
  border-radius: 4px;
}

.race-info-icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: middle;
  opacity: 0.85;
}

.weather-icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: middle;
  opacity: 0.85;
}

.race-distance {
  color: #4ecdc4 !important;
}

.race-condition {
  color: #9d88b3 !important;
}

.race-prize {
  color: #f5a623 !important;
}

.race-weather {
  color: #87ceeb !important;
}

.race-age-restriction {
  color: #7ec8e3 !important;
}

/* Countdown finished state - thin like started */
.countdown.finished {
  color: var(--text-tertiary);
}

/* Horse info with jockey */
.horse-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1;
}

.horse-jockey {
  font-size: 0.7rem;
  color: #666;
  color: var(--text-secondary, #666);
  /* Allow wrapping on mobile instead of truncating */
  white-space: normal;
  word-wrap: break-word;
}

/* Jockey/Trainer with badges */
.horse-jockey-trainer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10px;
  color: #888;
  color: var(--text-secondary, #888);
}

.jt-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.jt-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  background: #333;
  background: var(--bg-tertiary, #333);
  border-radius: 3px;
  font-size: 8px;
  font-weight: 600;
  color: #888;
  color: var(--text-secondary, #888);
}

.jt-name {
  font-size: 10px;
  color: #888;
  color: var(--text-secondary, #888);
}

/* Horse details - age and weight */
.horse-details-row {
  display: flex;
  gap: 6px;
  font-size: 0.7rem;
  color: #888;
  color: var(--text-muted, #888);
  margin-top: 1px;
}

.horse-age {
  color: #aaa;
  color: var(--text-secondary, #aaa);
}

.horse-weight {
  color: #f5a623;
  color: var(--accent-color, #f5a623);
  font-weight: 500;
}

.horse-form-inline {
  color: #888;
  color: var(--text-secondary, #888);
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
}

/* Odds history - under odds buttons */
.odds-history-row {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  width: 138px; /* Match WIN + PLACE buttons width (65 + 8 + 65) */
  min-height: 16px; /* Reserve space even when empty */
}

.odds-change {
  flex: 1 1;
  padding: 1px 2px;
  border-radius: 2px;
  color: #888;
  color: var(--text-muted, #888);
  background: var(--white-8);
  white-space: nowrap;
  text-align: center;
  font-size: 0.6rem;
}

.odds-change.up {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
}

.odds-change.down {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
}

/* Saddle number before horse name */
.horse-saddle-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10px;
  height: 10px;
  padding: 2px 3px;
  margin-right: 6px;
  background: var(--white-10);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  color: #aaa;
  color: var(--text-secondary, #aaa);
  text-align: center;
}

/* Winner badge */
.winner-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  background: linear-gradient(135deg, #ffd700, #f5a623);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Finished race styling */

.horse-row.finished-race .horse-position {
  display: none;
}

/* Finish result display */
.finish-result {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.finish-position {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  width: 60px;
  text-align: center;
  box-sizing: border-box;
}

.finish-position.pos-1 {
  background: linear-gradient(135deg, #ffd700, #f5a623);
  color: #000;
}

.finish-position.pos-2 {
  background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
  color: #000;
}

.finish-position.pos-3 {
  background: linear-gradient(135deg, #cd7f32, #b87333);
  color: #000;
}

.finish-position.pos-4 {
  background: var(--white-10);
  color: #888;
  color: var(--text-secondary, #888);
}

.finish-position.nr {
  background: rgba(255, 100, 100, 0.15);
  color: #ff6b6b;
  font-weight: 600;
}

.finish-position.waiting {
  background: var(--white-10);
  color: #888;
  color: var(--text-secondary, #888);
}

.finish-distance {
  font-size: 0.75rem;
  color: #888;
  color: var(--text-secondary, #888);
}

.finish-odds {
  font-size: 0.8rem;
  color: #888;
  color: var(--text-secondary, #888);
  background: var(--white-8);
  padding: 3px 6px;
  border-radius: 4px;
  width: 60px;
  text-align: center;
  box-sizing: border-box;
}

.no-result {
  color: var(--text-quaternary);
  font-size: 0.9rem;
}

.no-result {
  color: var(--text-quaternary);
  font-size: 1rem;
}

.race-in-progress {
  display: flex;
  align-items: center;
  justify-content: center;
}

.in-progress-label {
  color: #4caf50;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 12px;
  background: rgba(76, 175, 80, 0.2);
  border-radius: 4px;
  border: 1px solid rgba(76, 175, 80, 0.4);
}

/* BookiesAPI country grouping styles */
.bookies-country {
  border-bottom: 1px solid #2a2a2a;
  border-bottom: 1px solid var(--border-color, #2a2a2a);
}

.bookies-country:last-child {
  border-bottom: none;
}

.bookies-country-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--white-3);
}

.bookies-country-name {
  flex: 1 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  color: var(--text-primary, #fff);
}

.bookies-country-count {
  font-size: 0.75rem;
  color: #888;
  color: var(--text-secondary, #888);
}

.bookies-country-tracks {
  padding-left: 8px;
}

.horses-league-item.bookies-track {
  padding-left: 48px;
}

.horses-league-item.bookies-track .hp-league-name {
  font-size: 14px;
}

/* Joker Poker - Only Joker-specific styles */
/* All game UI uses VideoPoker.css (vp-* classes) */

/* Override vp-container max-width/margin when in modal */
.vp-container.joker-poker-game.vp-in-modal {
  max-width: 100%;
  margin: 0;
}

/* Joker card face - purple color */
.vp-card .card-front.joker {
  color: #7b1fa2;
}

/* Joker card winner outline (uses VP gold color) */
.vp-card .card-front.joker.winner {
  outline: 4px solid #FFD700;
  outline-offset: -4px;
}

/* ========== JOKER CARD CONTENT ========== */
.joker-card-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Center: jester icon — large, almost fills card */
.joker-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1;
  width: 100%;
  padding: 2px 4px 0;
}

.joker-center .joker-icon {
  width: 90%;
  height: auto;
  max-height: 85%;
  object-fit: contain;
}

/* Bottom: JOKER text, horizontal, bold, right under the jester */
.joker-text-bottom {
  font-size: 14px;
  font-weight: 800;
  color: #db2627;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: -4px;
  padding-bottom: 8px;
  line-height: 1;
}

/* Deuces Wild - Only Deuces-specific styles */
/* All game UI uses VideoPoker.css (vp-* classes) */

/* Override vp-container max-width/margin when in modal */
.vp-container.deuces-wild-game.vp-in-modal {
  max-width: 100%;
  margin: 0;
}

/* Deuces Wild winner outline (uses VP gold color) */
.vp-card .card-front.winner {
  outline: 4px solid #FFD700;
  outline-offset: -4px;
}

/* Double Bonus Poker - Only DB-specific styles */
/* All game UI uses VideoPoker.css (vp-* classes) */

/* Override vp-container max-width/margin when in modal */
.vp-container.double-bonus-game.vp-in-modal {
  max-width: 100%;
  margin: 0;
}

/* Double Double Bonus Poker - Only DDB-specific styles */
/* All game UI uses VideoPoker.css (vp-* classes) */

/* Override vp-container max-width/margin when in modal */
.vp-container.double-double-bonus-game.vp-in-modal {
  max-width: 100%;
  margin: 0;
}

/* Health Indicator Container */
.health-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.health-indicator.compact {
  gap: 4px;
}

/* Health Dots (main indicators) */
.health-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.health-dots:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

/* Individual Health Dot */
.health-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  color: #fff;
  transition: all 0.3s ease;
  position: relative;
}

/* Status Colors */
.health-ok {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.health-down {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
  animation: health-pulse-red 2s ease-in-out infinite;
}

.health-error {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.health-unknown {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  box-shadow: 0 0 8px rgba(107, 114, 128, 0.4);
}

.health-loading {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  animation: health-loading-pulse 1.5s ease-in-out infinite;
}

/* Pulsing animations */
@keyframes health-pulse-red {
  0%, 100% {
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.8);
  }
}

@keyframes health-loading-pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Critical Badge */
.health-critical-badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  animation: health-pulse-red 2s ease-in-out infinite;
  margin-left: 2px;
}

/* Details Panel */
.health-details {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;  /* Changed from right: 0 - opens to the right on desktop */
  width: 380px;
  max-width: 90vw;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  overflow: hidden;
  animation: health-details-slide-in 0.2s ease;
}

@keyframes health-details-slide-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Details Header */
.health-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #252525;
  border-bottom: 1px solid #333;
}

.health-details-title {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #e5e5ea;
}

.health-details-close {
  background: transparent;
  border: none;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.health-details-close:hover {
  color: #e5e5ea;
}

/* Details Content */
.health-details-content {
  padding: 16px;
  max-height: 60vh;
  overflow-y: auto;
}

/* Health Item */
.health-item {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #2a2a2a;
}

.health-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.health-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.health-item-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.health-item-name {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #e5e5ea;
  flex: 1 1;
}

.health-item-status {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.health-item-status.health-ok {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.health-item-status.health-down {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.health-item-status.health-error {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

/* Health Item Details */
.health-item-details {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
  color: #999;
}

.health-item-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.health-item-row span:first-child {
  color: #666;
}

.health-item-row span:last-child {
  color: #e5e5ea;
  font-weight: 500;
}

.health-item-error {
  margin-top: 8px;
  padding: 8px;
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
  border-radius: 4px;
  font-size: 11px;
  color: #ef4444;
  font-family: 'Monaco', 'Courier New', monospace;
}

/* Warnings Section */
.health-warnings {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #2a2a2a;
}

.health-warnings-title {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #e5e5ea;
  margin-bottom: 8px;
}

.health-warning {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
}

.health-warning-critical {
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
}

.health-warning-warning {
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid #f59e0b;
}

.health-warning-severity {
  font-size: 10px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
}

.health-warning-message {
  color: #e5e5ea;
  line-height: 1.4;
}

/* Details Footer */
.health-details-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #2a2a2a;
  font-family: 'Proxima Nova', sans-serif;
  font-size: 11px;
  color: #666;
}

.health-refresh-btn {
  background: #10b981;
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.health-refresh-btn:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.health-refresh-btn:active {
  transform: translateY(0);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .health-details {
    width: 320px;
    top: calc(100% + 4px);
    left: auto;  /* Reset left */
    right: 0;    /* Align to right on mobile (header is on right side) */
  }

  .health-dot {
    width: 14px;
    height: 14px;
    font-size: 9px;
  }

  .health-details-content {
    padding: 12px;
  }
}

