/* ===========================================
   Auth Modal - Professional & Beautiful
   Uses same colors as original Login page
   =========================================== */

/* Modal Overlay */
.auth-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: authFadeIn 0.2s ease-out;
}

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

/* Modal Container */
.auth-modal {
  background: var(--bg-elevated);
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px var(--black-50);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: authSlideUp 0.3s ease-out;
}

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

/* Modal Header */
.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--white-10);
}

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

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

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

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

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

/* Error/Success Message */
.auth-modal-error {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  text-align: center;
}

/* Error styling */
.auth-modal-error:not(:has(✅)) {
  background: var(--accent-red-muted);
  border: 1px solid var(--accent-red-muted);
  color: var(--accent-red);
}

/* Success styling */
.auth-modal-error:has(✅) {
  background: var(--accent-green-muted);
  border: 1px solid var(--accent-green-muted);
  color: var(--accent-green);
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Input Group */
.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin: 0;
}

/* Input Wrapper */
.auth-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  transition: all 0.2s;
}

.auth-input-wrapper:focus-within {
  border-color: var(--link-blue-hover);
  background: var(--bg-quaternary);
}

.auth-input-icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  fill: var(--text-tertiary);
  flex-shrink: 0;
  transition: fill 0.2s;
}

.auth-input-wrapper:focus-within .auth-input-icon {
  fill: var(--link-blue-hover);
}

.auth-input {
  flex: 1 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  font-size: 16px; /* Prevents zoom on iOS */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

/* Date input specific styles */
.auth-input-date {
  color-scheme: dark;
  cursor: pointer;
}

.auth-input-date::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

/* Forgot Password Link */
.auth-forgot-password {
  text-align: right;
  margin-top: -8px;
  margin-bottom: 8px;
}

.auth-forgot-password a,
.auth-forgot-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.auth-forgot-password a:hover,
.auth-forgot-btn:hover {
  color: var(--link-blue-hover);
  text-decoration: underline;
}

/* Forgot Password Subtitle */
.auth-forgot-subtitle {
  color: var(--text-tertiary);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 20px;
  text-align: center;
}

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

.auth-forgot-success-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  color: var(--accent-green);
}

.auth-forgot-success-icon svg {
  width: 100%;
  height: 100%;
}

.auth-forgot-success-text {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 280px;
}

/* Submit Button */
.auth-submit-btn {
  background: var(--btn-auth-bg);
  border: none;
  border-radius: 8px;
  color: var(--link-blue-hover);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  padding: 14px;
  margin-top: 8px;
  transition: all 0.2s;
  position: relative;
}

.auth-submit-btn:hover:not(:disabled) {
  background: var(--btn-auth-bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-blue-muted);
}

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

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Loading Spinner */
.auth-loading-spinner {
  display: inline-block;
  animation: authPulse 1s infinite;
}

@keyframes authPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Modal Footer */
.auth-modal-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--white-10);
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary);
}

.auth-switch-btn {
  background: none;
  border: none;
  color: var(--link-blue-hover);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 0;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-switch-btn:hover {
  color: var(--link-blue);
  text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .auth-modal-overlay {
    padding: 0;
    align-items: flex-start; /* Changed from flex-end to fix positioning */
    padding-top: 20px;
  }

  .auth-modal {
    max-width: 100%;
    max-height: 85vh; /* Reduced from 95vh to ensure it fits on screen */
    border-radius: 16px;
    margin: 0 8px;
    animation: authSlideDown 0.3s ease-out;
  }

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

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

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

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

  .auth-input-wrapper {
    padding: 14px;
  }

  .auth-submit-btn {
    padding: 16px;
    font-size: 17px;
  }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 768px) {
  .auth-modal {
    max-width: 460px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .auth-modal-overlay,
  .auth-modal,
  .auth-input-wrapper,
  .auth-submit-btn,
  .auth-modal-close {
    animation: none;
    transition: none;
  }
}

/* Theme Switcher — matches LanguageSwitcher style */

.theme-switcher {
  position: relative;
  display: inline-block;
}

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

.theme-current-btn:hover {
  color: var(--accent-blue-hover);
}

/* Dropdown */
.theme-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-tertiary);
  border: 1px solid var(--white-12);
  border-radius: 8px;
  box-shadow: 0 4px 20px var(--black-50);
  min-width: 120px;
  overflow: hidden;
  z-index: 1000;
  animation: themeDropdownFadeIn 0.15s ease-out;
}

@keyframes themeDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--white-90);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  font-family: 'Proxima Nova', sans-serif;
  text-align: left;
}

.theme-option:hover {
  background: var(--white-10);
}

.theme-option.active {
  color: var(--accent-blue);
}

.theme-option:not(:last-child) {
  border-bottom: 1px solid var(--white-8);
}

.theme-name {
  font-size: 13px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .theme-current-btn {
    padding: 3px 4px;
  }
}

/* BalanceDropdown — popup menu + starry night shimmer */

.balance-dropdown {
  position: relative;
  display: inline-flex;
}

/* Trigger button — matches old .balance link style */
.balance-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 3px 8px;
  color: var(--text-primary);
  font-family: 'Proxima Nova', sans-serif;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  font-feature-settings: "tnum";
  font-variant: tabular-nums;
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
  min-width: 60px;
  height: 22px;
}

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

.balance-dropdown-trigger.balance-update {
  animation: balanceFlash 0.8s ease-out;
}

/* Dropdown menu */
.balance-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--white-12);
  border-radius: 8px;
  box-shadow: 0 4px 20px var(--black-50);
  min-width: 210px;
  overflow: hidden;
  z-index: 1000;
  animation: balanceDropdownFadeIn 0.15s ease-out;
}

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

/* Menu items */
.balance-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--white-90);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  font-family: 'Proxima Nova', sans-serif;
  text-align: left;
}

.balance-dropdown-item:hover {
  background: var(--white-10);
}

.balance-dropdown-item:not(:last-child) {
  border-bottom: 1px solid var(--white-8);
}

/* Toggle switch */
.balance-dropdown-toggle {
  margin-left: auto;
  width: 34px;
  height: 18px;
  border-radius: 9px;
  background: var(--white-12);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.balance-dropdown-toggle.active {
  background: var(--accent-blue);
}

.balance-dropdown-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.balance-dropdown-toggle.active .balance-dropdown-toggle-knob {
  transform: translateX(16px);
}

/* ===== Starry Night Shimmer (Header — small) ===== */
.balance-hidden-shimmer {
  display: inline-block;
  min-width: 60px;
  height: 13px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  background: transparent;
}

/* Star dots — mixed sizes, scattered */
.balance-hidden-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle 1.2px at 6% 72%, var(--white-45) 0.6px, transparent 1.2px),
    radial-gradient(circle 0.6px at 14% 28%, var(--white-45) 0.3px, transparent 0.6px),
    radial-gradient(circle 1px at 23% 55%, var(--white-45) 0.5px, transparent 1px),
    radial-gradient(circle 0.5px at 31% 15%, var(--white-45) 0.25px, transparent 0.5px),
    radial-gradient(circle 1.3px at 19% 82%, var(--white-45) 0.65px, transparent 1.3px),
    radial-gradient(circle 0.7px at 37% 68%, var(--white-45) 0.35px, transparent 0.7px),
    radial-gradient(circle 1px at 44% 32%, var(--white-45) 0.5px, transparent 1px),
    radial-gradient(circle 0.5px at 52% 78%, var(--white-45) 0.25px, transparent 0.5px),
    radial-gradient(circle 1.1px at 58% 18%, var(--white-45) 0.55px, transparent 1.1px),
    radial-gradient(circle 0.6px at 66% 52%, var(--white-45) 0.3px, transparent 0.6px),
    radial-gradient(circle 1.2px at 73% 85%, var(--white-45) 0.6px, transparent 1.2px),
    radial-gradient(circle 0.8px at 79% 38%, var(--white-45) 0.4px, transparent 0.8px),
    radial-gradient(circle 0.5px at 86% 62%, var(--white-45) 0.25px, transparent 0.5px),
    radial-gradient(circle 1px at 93% 22%, var(--white-45) 0.5px, transparent 1px),
    radial-gradient(circle 0.7px at 48% 45%, var(--white-45) 0.35px, transparent 0.7px);
  animation: shimmerTwinkle 3s ease-in-out infinite alternate;
}

@keyframes shimmerTwinkle {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

/* Mobile */
@media (max-width: 480px) {
  .balance-dropdown-trigger {
    padding: 5px 8px;
    font-size: 12px;
    min-width: 50px;
  }

  .balance-dropdown-menu {
    min-width: 200px;
  }
}

.top-leagues {
  display: flex;
  overflow-x: auto;
  padding: 10px 2px 9px;
  gap: 10px;
}



.top-league-name {
    font-family: 'Proxima Nova Cond', sans-serif;}

.league-card {
  background: var(--gradient-top-league);
  border-radius: 4px;
  padding: 6px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
  text-align: center;
  color: var(--text-secondary);
  font-weight: bold;
  line-height: 14px;
  flex-shrink: 0;
  text-decoration: none;
}

.league-card:hover {
  color: var(--text-primary);
}

.league-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 5px;
}

.top-leagues-banners {
  overflow-x: auto;
  margin-top: 16px;
}

.banners-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  width: 100vw;
}

.banner-svg {
  flex: 0 0 100vw;
  scroll-snap-align: start;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  margin: 0 5px;
}

.banner-svg img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.banner-dots {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  gap: 6px;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-quaternary);
  transition: background-color 0.3s;
}

.banner-dot.active {
  background-color: var(--text-primary);
}

.banner-slider-container {
  overflow: hidden;
}

.banner-slider {
  display: flex;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  width: 100%;
  justify-content: center;
}

.banner-slide {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 800px;
  padding: 0 10px;
  box-sizing: border-box;
}

.banner-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}


@media (min-width: 1024px) {
  .top-leagues {
    padding: 0 2px 0;
    margin-bottom: 9px;
  }
}
.sportstab-tabs {
  display: flex;
  overflow-x: auto;
  gap: 5px;
  padding: 5px;
  background-color: #29292c;
}

.sportstab-tab {
  align-items: center;
  background-color: rgba(44, 44, 46, 0);
  border: 0;
  border-radius: 4px;
  color: rgb(255, 255, 255);
  display: flex;
  cursor: pointer;
  font-family: "Proxima Nova", sans-serif;
  font-size: 12px;
  font-weight: 500;
  gap: 6px;
  line-height: 15px;
  flex-direction: column;
  padding: 5px 5px 5px;
  white-space: nowrap;
}

.sportstab-tab.active {
  background-color: transparent;
  color: #3478f6;
}
@media (min-width: 1024px) {
.sportstab-tab:hover {
  color: #fff;
}
.sportstab-tab.active:hover {
  background-color: transparent;
  color: #3478f6;
}
}
.sportstab-icon {
  font-size: 14px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sportstab-icon svg {
  width: 100%;
  height: 100%;
}

.sportstab-starting-block {
  background-color: #000;
  padding: 10px 20px 5px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sportstab-starting-block img {
  width: 18px;
  height: 18px;
}

.sportstab-starting-block span {
  color: white;
  font-weight: bold;
  font-size: 15px;
  font-family: "Proxima Nova", sans-serif;
}

.sportstab-title {
  color: #fff;
  font-family: Proxima Nova, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.sportstab-header {
  background-color: black;
  padding: 12px 5px 5px 12px;
  display: none;
  gap: 12px;
}

.wrap-sportstab-header {
  display: flex;
  border-bottom: 1px solid #363636;
  border-top: 1px solid #363636;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 999;
}

/* Mobile only - offset from header */
@media (max-width: 1023px) {
  .wrap-sportstab-header {
    top: 36px;
  }
}

.sportstab-tabs { scroll-behavior: smooth; }
/* StarIcon - Phosphor star for favorites */

.star-icon {
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.star-icon:hover:not(.star-icon--disabled) {
  transform: scale(1.15);
}

.star-icon:active:not(.star-icon--disabled) {
  transform: scale(0.95);
}

/* Disabled state */
.star-icon--disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.star-icon--disabled:hover {
  transform: none;
}

/* AccountPage.css - Professional Clean Design */

.ap-page {
  background-color: var(--bg-primary);
}

/* Header with Back Button */
.ap-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--separator);
  z-index: 90;
  height: 44px;
  box-sizing: border-box;
}

.ap-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) {
  .ap-back-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
  }
}

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

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

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

.ap-container {
  padding: 12px;
  font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Profile Card */
.ap-profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.ap-avatar {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: linear-gradient(167deg, rgb(42, 133, 241), rgb(10, 41, 71));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ap-avatar svg {
  color: #fff;
  stroke-width: 3px;
}

.ap-user-info {
  flex: 1 1;
  min-width: 0;
}

.ap-username {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.ap-email {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-userid {
  font-size: 11px;
  color: var(--text-quaternary);
}

/* Balance Card */
.ap-balance-card {
  background: var(--gradient-balance-card);
  border: 1px solid var(--balance-card-border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 25px;
}

.ap-balance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ap-balance-label {
  font-size: 13px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ap-wallet-icon {
  color: var(--accent-blue);
}

/* Eye toggle button (replaces wallet icon) */
.ap-hide-balance-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--accent-blue);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.ap-hide-balance-btn:hover {
  background: var(--white-8);
  color: var(--accent-blue-hover);
}

.ap-balance-amount {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -1px;
  line-height: 1;
  min-height: 36px;
  display: flex;
  align-items: center;
}

/* Starry Night Shimmer (AccountPage — large) */
.ap-balance-hidden-shimmer {
  display: inline-block;
  width: 140px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: transparent;
  vertical-align: middle;
}

/* Star dots — mixed sizes, scattered */
.ap-balance-hidden-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle 2px at 4% 68%, var(--white-45) 1px, transparent 2px),
    radial-gradient(circle 0.8px at 11% 22%, var(--white-45) 0.4px, transparent 0.8px),
    radial-gradient(circle 1.5px at 18% 82%, var(--white-45) 0.75px, transparent 1.5px),
    radial-gradient(circle 0.6px at 24% 45%, var(--white-45) 0.3px, transparent 0.6px),
    radial-gradient(circle 1.8px at 9% 52%, var(--white-45) 0.9px, transparent 1.8px),
    radial-gradient(circle 1px at 32% 15%, var(--white-45) 0.5px, transparent 1px),
    radial-gradient(circle 0.7px at 38% 73%, var(--white-45) 0.35px, transparent 0.7px),
    radial-gradient(circle 1.6px at 43% 35%, var(--white-45) 0.8px, transparent 1.6px),
    radial-gradient(circle 0.5px at 50% 88%, var(--white-45) 0.25px, transparent 0.5px),
    radial-gradient(circle 1.2px at 56% 18%, var(--white-45) 0.6px, transparent 1.2px),
    radial-gradient(circle 0.8px at 62% 58%, var(--white-45) 0.4px, transparent 0.8px),
    radial-gradient(circle 1.9px at 68% 78%, var(--white-45) 0.95px, transparent 1.9px),
    radial-gradient(circle 0.6px at 74% 30%, var(--white-45) 0.3px, transparent 0.6px),
    radial-gradient(circle 1.3px at 80% 62%, var(--white-45) 0.65px, transparent 1.3px),
    radial-gradient(circle 0.9px at 87% 12%, var(--white-45) 0.45px, transparent 0.9px),
    radial-gradient(circle 1.7px at 93% 48%, var(--white-45) 0.85px, transparent 1.7px),
    radial-gradient(circle 0.5px at 28% 55%, var(--white-45) 0.25px, transparent 0.5px),
    radial-gradient(circle 1.1px at 46% 8%, var(--white-45) 0.55px, transparent 1.1px),
    radial-gradient(circle 0.7px at 72% 92%, var(--white-45) 0.35px, transparent 0.7px),
    radial-gradient(circle 1.4px at 96% 25%, var(--white-45) 0.7px, transparent 1.4px);
  animation: apShimmerTwinkle 3s ease-in-out infinite alternate;
}

@keyframes apShimmerTwinkle {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.ap-balance-actions {
  display: flex;
  gap: 10px;
}

.ap-btn {
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  font-family: 'Proxima Nova', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ap-btn-primary {
  background: var(--accent-blue);
  color: var(--text-primary);
  border: none;
}

.ap-btn-primary:hover {
  background: var(--accent-blue-hover);
}

.ap-btn-primary:active {
  transform: scale(0.98);
}

.ap-btn-secondary {
  background: transparent;
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue);
}

.ap-btn-secondary:hover {
  background: var(--accent-blue-muted);
}

.ap-btn-secondary:active {
  transform: scale(0.98);
}

.ap-btn-danger {
  background: var(--accent-red);
  color: var(--text-primary);
  border: none;
}

.ap-btn-danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Bonus Card */
.ap-bonus-card {
  background: linear-gradient(135deg, #1a2a1a 0%, #0d260d 100%);
  border: 1px solid #2a4a2a;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 25px;
}

.ap-bonus-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6fcf6f;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.ap-bonus-amount {
  margin-left: auto;
  font-size: 16px;
  font-weight: 700;
  color: #8ff08f;
}

.ap-bonus-progress-bar {
  width: 100%;
  height: 8px;
  background: #1a2a1a;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid #2a4a2a;
}

.ap-bonus-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #8bc34a);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.ap-bonus-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.ap-bonus-remaining {
  font-size: 12px;
  color: #6fcf6f;
  margin-bottom: 12px;
}

.ap-bonus-cancel-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--text-quaternary);
  color: var(--text-tertiary);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.ap-bonus-cancel-btn:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.ap-bonus-confirm {
  margin-top: 8px;
}

.ap-bonus-warn {
  color: var(--accent-red);
  font-size: 12px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.ap-bonus-confirm-btns {
  display: flex;
  gap: 8px;
}

.ap-bonus-confirm-btns .ap-btn {
  flex: initial;
  padding: 8px 16px;
  font-size: 13px;
}

.ap-bonus-deduction-details {
  margin-bottom: 10px;
}

.ap-bonus-deduction-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 3px 0;
}

.ap-bonus-deduction-row span:last-child {
  color: var(--accent-red);
  font-weight: 600;
}

.ap-bonus-deduction-total {
  border-top: 1px solid var(--separator-light);
  padding-top: 6px;
  margin-top: 4px;
  font-weight: 600;
  color: var(--text-primary);
}

.ap-bonus-deduction-total span:last-child {
  color: var(--accent-red);
  font-size: 14px;
}

/* Menu */
.ap-menu {
  border-radius: 12px;
  overflow: hidden;
}

.ap-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--gradient-fixture);
  border: none;
  border-bottom: 1px solid var(--bg-body);
  cursor: pointer;
  position: relative;
  isolation: isolate;
}

.ap-menu-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hover-bg);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  z-index: -1;
}

.ap-menu-item:last-child {
  border-bottom: none;
}

.ap-menu-item:hover::after {
  opacity: 1;
}

.ap-menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  flex-shrink: 0;
  position: relative;
}

.ap-inbox-dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 8px;
  height: 8px;
  background: var(--accent-red);
  border-radius: 50%;
  border: 2px solid var(--bg-elevated);
}

.ap-inbox-badge {
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--accent-red);
  border-radius: 10px;
  text-align: center;
}

.ap-menu-text {
  flex: 1 1;
  display: flex;
  align-items: center;
  text-align: left;
  font-family: 'Proxima Nova', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.ap-menu-chevron {
  color: var(--text-quaternary);
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 480px) {
  .ap-container {
    padding: 8px;
  }

  .ap-menu-item:hover::after {
    opacity: 0;
  }

  .ap-profile-card {
    padding: 14px;
  }

  .ap-avatar {
    width: 56px;
    height: 56px;
  }

  .ap-avatar svg {
    width: 32px;
    height: 32px;
  }

  .ap-username {
    font-size: 16px;
  }

  .ap-balance-card {
    padding: 16px;
  }

  .ap-balance-amount {
    font-size: 30px;
  }

  .ap-btn {
    padding: 10px 12px;
    font-size: 13px;
  }

  .ap-menu-item {
    padding: 12px 14px;
  }

  .ap-menu-text {
    font-size: 14px;
  }
}

/* SportTabs - Reusable sport tabs component */

.st-tabs {
  display: flex;
  overflow-x: auto;
  gap: 5px;
  padding: 6px 0 0 0;
  background-color: var(--bg-primary);
  /* Hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.st-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 7px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--text-secondary);
  font-family: 'Proxima Nova', sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-user-select: none;
          user-select: none;
}

.st-tab.active {
  color: var(--accent-blue);
}

/* Favorites tab - golden star */
.st-tab-favorites.active {
  color: var(--accent-yellow);
}

/* Hover only on devices that support hover (not touch) */
@media (hover: hover) {
  .st-tab:hover:not(.active) {
    color: var(--accent-blue);
  }

  .st-tab-favorites:hover:not(.active) {
    color: var(--accent-yellow);
  }
}

/* Icon wrapper for badge positioning */
.st-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.st-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.st-icon-svg {
  width: 100%;
  height: 100%;
}

/* Fallback icon - circle with letter */
.st-icon-fallback {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-quaternary);
  color: var(--text-on-accent);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.st-tab.active .st-icon-fallback {
  background: var(--accent-blue);
}

.st-label {
  font-weight: 500;
  pointer-events: none;
}

/* Badge with count */
.st-count {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 15px;
  min-height: 15px;
  padding: 1px;
  background-color: var(--accent-red);
  border-radius: 999px;
  color: var(--text-on-accent);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  z-index: 2;
  pointer-events: none;
}

/* Desktop */
@media (min-width: 1024px) {
  .st-tabs {
    padding: 4px 0 3px;
  }

  .st-tab {
    gap: 1px;
  }

  .st-icon {
    width: 28px;
    height: 28px;
  }
}

/* V8MyBetsPage - My Bets Page Styles */
/* Uses CSS variables to match app theme */

.v8mb-page {
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
  padding-bottom: 80px;
}

/* Header - compact 44px like other pages */
.v8mb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--separator);
  position: sticky;
  top: 0;
  z-index: 101;
  height: 44px;
  box-sizing: border-box;
}

.v8mb-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) {
  .v8mb-back-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
  }
}

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

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

/* Filters */
.v8mb-filters {
  position: sticky;
  top: 44px;
  z-index: 100;
  padding: 10px 10px 12px 10px;
  background-color: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

/* Quick Filters */
.v8mb-date-filters {
  display: flex;
  gap: 6px;
}

.v8mb-date-filters button {
  flex: 1 1;
  padding: 8px 10px;
  background-color: var(--bg-tertiary);
  border: none;
  border-radius: 6px;
  color: var(--text-tertiary);
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

@media (hover: hover) {
  .v8mb-date-filters button:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
  }
}

.v8mb-date-filters button.v8mb-active {
  background-color: var(--accent-blue);
  color: var(--text-on-accent);
}

/* Advanced Filters */
.v8mb-extra-filters {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.v8mb-filter-group {
  position: relative;
  flex: 1 1;
}

/* Date Input with Calendar Icon */
.v8mb-filter-group.v8mb-date-filter {
  position: relative;
}

.v8mb-filter-group.v8mb-date-filter::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 24 24%27 stroke=%27%23888%27%3E%3Cpath stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z%27/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
}

.v8mb-filter-group input[type="date"] {
  width: 100%;
  height: 100%;
  padding: 8px 10px 8px 30px;
  border: none;
  border-radius: 6px;
  background-color: var(--bg-tertiary);
  color: var(--text-tertiary);
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

@media (hover: hover) {
  .v8mb-filter-group input[type="date"]:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
  }
}

/* Date Range Display (for "Last 7 days") */
.v8mb-date-range-display {
  width: 100%;
  height: 100%;
  padding: 8px 10px 8px 30px;
  border: none;
  border-radius: 6px;
  background-color: var(--accent-blue-muted);
  color: var(--accent-blue);
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* Hide default calendar icon */
.v8mb-filter-group input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  right: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Select with Dropdown Arrow */
.v8mb-filter-group.v8mb-status-filter {
  position: relative;
}

.v8mb-filter-group.v8mb-status-filter::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 24 24%27 stroke=%27%23888%27%3E%3Cpath stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27M19 9l-7 7-7-7%27/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}

.v8mb-filter-group select {
  width: 100%;
  height: 100%;
  padding: 8px 28px 8px 10px;
  border: none;
  border-radius: 6px;
  background-color: var(--bg-tertiary);
  color: var(--text-tertiary);
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

@media (hover: hover) {
  .v8mb-filter-group select:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
  }
}

.v8mb-filter-group input[type="date"]:focus,
.v8mb-filter-group select:focus {
  outline: none;
}

/* Clear Button */
.v8mb-clear-filters {
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background-color: var(--bg-tertiary);
  color: var(--accent-red);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

@media (hover: hover) {
  .v8mb-clear-filters:hover {
    background-color: var(--accent-red);
    color: var(--text-primary);
  }
}

.v8mb-clear-filters svg {
  width: 14px;
  height: 14px;
}

/* Bets List */
.v8mb-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v8mb-loading,
.v8mb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
  gap: 12px;
}

.v8mb-empty svg {
  opacity: 0.4;
}

/* Bet Card */
.v8mb-card {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
}

.v8mb-card-won {
  border-left: 3px solid #1ca31c;
}

.v8mb-card-lost {
  border-left: 3px solid #d83030;
}

.v8mb-card-void,
.v8mb-card-cancelled {
  border-left: 3px solid #666;
  opacity: 0.8;
}

.v8mb-card-pending {
  border-left: 3px solid #c9a542;
}

/* Card Header */
.v8mb-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--separator);
  border-radius: 8px 8px 0 0;
}

.v8mb-card-type {
  display: flex;
  align-items: center;
  gap: 8px;
}

.v8mb-type-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
}

.v8mb-type-single {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.v8mb-type-multiple {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  /* font-size: 10px; */
}

.v8mb-bet-id-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.v8mb-bet-id {
  font-size: 11px;
  color: var(--text-tertiary);
}

.v8mb-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .v8mb-copy-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--accent-blue);
  }
}

.v8mb-copy-btn:active {
  background-color: var(--bg-tertiary);
  transform: scale(0.95);
}

.v8mb-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

/* Status Badges */
.v8mb-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
}

.v8mb-status-pending {
  background: #c9a542;
  color: var(--text-on-accent);
}

.v8mb-status-won {
  background: #1ca31c;
  color: var(--text-on-accent);
}

.v8mb-status-lost {
  background: #d83030;
  color: var(--text-on-accent);
}

.v8mb-status-void,
.v8mb-status-cancelled {
  background: #666;
  color: var(--text-on-accent);
}

/* Bet Leg */
.v8mb-leg {
  padding: 8px 10px 10px 10px;
}

.v8mb-leg-multiple {
  padding-bottom: 10px;
  border-bottom: 3px dotted var(--bg-body);
}

.v8mb-leg-multiple:last-child {
  margin-bottom: 0;
  padding-bottom: 16px;
  border-bottom: none;
}

.v8mb-leg-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
  margin-left: 2px;
}

.v8mb-leg-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.v8mb-live-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 2px;
  background: #d83030;
  color: var(--text-on-accent);
  border-radius: 2px;
}

.v8mb-prematch-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.v8mb-prematch-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--accent-blue);
  color: var(--text-on-accent);
  border-radius: 2px;
}

.v8mb-start-time {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

.v8mb-vs {
  color: #c9a542;
  font-weight: 700;
}

.v8mb-leg-league {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  min-height: 20px;
  padding-left: 5px;
  min-width: 0;
}

.v8mb-leg-league > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.v8mb-sport-icon {
  opacity: 0.7;
}

.v8mb-leg-teams {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0px;
  padding-left: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.v8mb-teams-link {
  color: var(--accent-blue);
  cursor: pointer;
  transition: color 0.15s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.v8mb-teams-link:hover {
  color: var(--link-blue-hover);
  text-decoration: underline;
}

.v8mb-leg-period-market {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 2px 6px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.v8mb-leg-selection {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  /* margin-bottom: 10px; */
  padding: 10px 5px;
  border-top: 1px solid var(--separator-light);
  /* border-bottom: 1px solid #4c4c4f; */
}

.v8mb-selection-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.v8mb-selection-param {
  font-size: 13px;
  color: var(--score-color);
  font-weight: 700;
}

.v8mb-selection-odds {
  font-size: 13px;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  margin-left: auto;
}

/* Scores */
.v8mb-scores {
  display: flex;
  gap: 16px;
  padding: 8px 10px;
  background-color: var(--bg-primary);
  border-radius: 2px;
}

.v8mb-score-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.v8mb-score-label {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 600;
  min-width: 40px;
}

.v8mb-score-value {
  font-size: 12px;
  font-weight: 500;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Basketball timer in my bets */
.v8mb-basketball-timer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--white-90);
}

.v8mb-basketball-timer .basketball-quarter {
  color: var(--white-90);
}

.v8mb-basketball-timer .basketball-time {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.v8mb-basketball-timer.halftime,
.v8mb-basketball-timer.break,
.v8mb-basketball-timer.fulltime {
  color: var(--white-70);
}

/* Hockey timer styles */
.v8mb-hockey-timer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--white-90);
}

.v8mb-hockey-timer .hockey-period {
  color: var(--white-90);
}

.v8mb-hockey-timer .hockey-time {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.v8mb-hockey-timer.pause,
.v8mb-hockey-timer.fulltime,
.v8mb-hockey-timer.shootout {
  color: var(--white-70);
}

.v8mb-hockey-timer.overtime .hockey-period {
  color: #ffa500;
}

/* Live indicator dot - shows game is currently in progress */
.v8mb-live-dot {
  width: 4px;
  height: 4px;
  background: #d83030;
  border-radius: 50%;
  /* Smaller, no animation */
}

/* Card Footer (Money) */
.v8mb-card-footer {
  padding: 10px 12px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--separator);
  display: grid;
  grid-gap: 16px;
  gap: 16px;
  border-radius: 0 0 8px 8px;
}

/* Single footer - 3 columns */
.v8mb-footer-single {
  grid-template-columns: repeat(3, 1fr);
}

/* Multiple footer - 4 columns */
.v8mb-footer-multiple {
  grid-template-columns: repeat(4, 1fr);
}

.v8mb-money-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.v8mb-money-label {
  font-size: 9px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.v8mb-money-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.v8mb-outcome-won {
  color: #1ca31c !important;
}

.v8mb-outcome-lost {
  color: #d83030 !important;
}

.v8mb-outcome-void,
.v8mb-outcome-cancelled {
  color: var(--text-tertiary) !important;
}

/* Multiple legs container */
.v8mb-legs-container {
  border-top: 1px solid var(--separator);
}

/* Responsive */
@media (max-width: 1023px) {
  .v8mb-header {
    top: 36px;
  }
  .v8mb-filters {
    top: 80px;
  }
}

@media (max-width: 768px) {
  .v8mb-filters {
    padding: 8px 8px 10px 8px;
  }

  .v8mb-date-filters {
    gap: 4px;
  }

  .v8mb-date-filters button {
    padding: 5px 6px;
    font-size: 11px;
  }

  .v8mb-extra-filters {
    gap: 4px;
  }

  .v8mb-filter-group input[type="date"] {
    padding: 5px 6px 5px 24px;
    font-size: 11px;
  }

  .v8mb-filter-group select {
    padding: 5px 22px 5px 6px;
    font-size: 11px;
  }

  .v8mb-date-range-display {
    padding: 5px 6px 5px 24px;
    font-size: 11px;
  }

  .v8mb-filter-group.v8mb-date-filter::before {
    left: 6px;
    width: 12px;
    height: 12px;
  }

  .v8mb-filter-group.v8mb-status-filter::after {
    right: 6px;
    width: 8px;
    height: 8px;
  }

  .v8mb-clear-filters {
    padding: 5px 8px;
  }
}

@media (max-width: 480px) {
  .v8mb-card-header {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }

  .v8mb-card-type {
    flex: 1 1;
    min-width: 0;
    display: flex;
    gap: 4px;
  }

  .v8mb-type-badge {
    font-size: 10px;
    padding: 2px 6px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .v8mb-bet-id-wrapper {
    flex: 1 1;
    min-width: 0;
    display: flex;
    gap: 4px;
    align-items: center;
  }

  .v8mb-bet-id {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  .v8mb-copy-btn {
    flex-shrink: 0;
  }

  .v8mb-date {
    font-size: 10px;
  }

  .v8mb-card-meta {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
  }

  .v8mb-scores {
    flex-direction: column;
    gap: 6px;
  }

  /* Compact footer on mobile */
  .v8mb-card-footer {
    gap: 10px;
  }

  .v8mb-money-label {
    font-size: 8px;
  }

  .v8mb-money-value {
    font-size: 12px;
  }
}

@media (min-width: 1025px) {
  .v8mb-page {
    max-width: 800px;
    margin: 0 auto;
  }

  .v8mb-date-filters {
    max-width: 400px;
  }

  .v8mb-filters {
    margin-bottom: 8px;
  }
}

/* Focus states */
.v8mb-date-filters button:focus,
.v8mb-filter-group input:focus,
.v8mb-filter-group select:focus,
.v8mb-clear-filters:focus {
  outline: none;
}

/* Smooth transitions */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Toast animation for copy notification */
@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  10%, 90% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
}

/* PendingBetsWidget - CSS overrides for widget context */

.pbw-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.pbw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--separator);
  min-height: 40px;
}

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

.pbw-view-all {
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.pbw-view-all:hover {
  color: var(--text-primary);
}

.pbw-list {
  flex: 1 1;
  overflow-y: auto;
}

/* Override v8mb-card to remove overflow hidden in widget */
.pbw-container .v8mb-card {
  overflow: visible;
}

/* Override scores layout for widget */
.pbw-container .v8mb-scores {
  flex-direction: column;
  gap: 5px;
}

.pbw-container .v8mb-score-value {
  font-size: 10px;
  font-weight: 500;
}

/* SearchPage.css */

/* Overlay backdrop */
.search-overlay-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  z-index: 999999;
  overflow-y: auto;
  animation: searchOverlayFadeIn 0.2s ease-out;
}

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

.search-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 5px 5px; 
  min-height: calc(100vh - 200px);
}

/* Overlay mode styles */
.search-page-overlay {
  padding-top: 60px;
  min-height: 100vh;
}

.search-header {
  text-align: center;
  margin-bottom: 20px;
}

.search-title {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.search-input-container {
  position: sticky;
  top: 0; /* Below header */
  z-index: 100;
  padding: 12px 14px;
  margin-top: 0; /* Position directly under header */
  margin-bottom: 24px;
  margin-left: -10px;
  margin-right: -10px;
}

/* Removed - keeping sticky in overlay mode */

/* Close button for overlay mode */
.search-close-btn {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--white-70);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  z-index: 10;
}

.search-close-btn:hover {
  color: var(--text-primary);
}

.search-input-icon {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white-45);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 6px 16px 6px 40px;
  font-family: 'Proxima Nova', sans-serif;
  font-size: 16px; /* Prevents zoom on iOS */
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 2px solid var(--white-12);
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input::placeholder {
  color: var(--white-45);
}

.search-input:focus {
  background: var(--white-10);
  border-color: var(--white-20);
}

.search-loading {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Proxima Nova', sans-serif;
  font-size: 14px;
  color: var(--white-60);
}

.search-hint {
  text-align: center;
  font-family: 'Proxima Nova', sans-serif;
  font-size: 14px;
  color: var(--white-50);
  margin-top: 12px;
}

.search-results {
  margin-top: 24px;
}

.search-no-results {
  text-align: center;
  padding: 60px 20px;
  font-family: 'Proxima Nova', sans-serif;
  font-size: 18px;
  color: var(--white-50);
}

.search-section {
  margin-bottom: 32px;
}

.search-section-title {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-badge {
  display: inline-block;
  background: var(--accent-red);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 5px;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-result-card {
  background-color: var(--bg-elevated);
  border-radius: 4px;
  padding: 5px 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px var(--black-30);
}

.search-result-header {
  gap: 0;
  padding-bottom: 4px;
  display: flex;
  align-items: center;
  margin-bottom: 0;
  flex-wrap: wrap;
}

/* When there's no subheader (live events), add border */
.search-result-header:not(:has(+ .search-result-subheader)) {
  border-bottom: 1px solid var(--white-5);
}

/* When there's a subheader (upcoming events), change layout */
.search-result-header:has(+ .search-result-subheader) {
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 4px;
  justify-content: space-between;
}

.search-result-subheader {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--white-5);
  margin-bottom: 0;
}

.search-result-sport {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--accent-green-muted);
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-result-league {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 13px;
  color: var(--white-80);
  flex: 1 1;
}

/* When league is in subheader, take full width */
.search-result-subheader .search-result-league {
  flex: initial;
  display: block;
  width: 100%;
}

.search-result-time {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--white-60);
  white-space: nowrap;
}

.search-result-teams {
  margin-bottom: 0;
}

.search-result-team {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 4px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-result-score {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-green);
  margin-left: 8px;
}

.search-result-odds {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--white-5);
}

.search-result-odd {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--white-5);
  padding: 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  box-shadow: 3px 2px 4px var(--black-50);
}

.odd-label {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--white-50);
  text-transform: uppercase;
}

.odd-value {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.search-error {
  text-align: center;
  padding: 40px 20px;
  font-family: 'Proxima Nova', sans-serif;
  font-size: 16px;
  color: var(--accent-red);
  background: var(--accent-red-muted);
  border: 1px solid var(--accent-red-muted);
  border-radius: 12px;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .search-page {
    padding: 0 5px 5px 5px; /* No top padding on mobile */
  }

  .search-input-container {
    top: 0px; /* Adjusted for mobile header */
    margin-top: 0; /* Position directly under header */
    margin-left: -5px;
    margin-right: -5px;
    padding-left: 16px;
    padding-right: 16px;
    background-color: var(--bg-body);
    border-bottom: 1px solid var(--separator);
  }

  .search-input-icon {
    left: 34px; /* Adjusted for mobile padding */
  }

  .search-input {
    font-size: 16px; /* Keep 16px to prevent zoom on iOS */
    padding: 12px 16px 12px 40px;
  }

  .search-result-card {
    padding: 8px 10px;
  }

  .search-result-team {
    font-size: 13px;
  }

  .search-result-score {
    font-size: 14px;
  }

  .search-result-header {
    gap: 0;
  }

  .search-result-time {
    margin-left: 0;
  }
}

/* InboxPage.css */

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

/* Sticky header - stays in document flow */
.inbox-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--separator);
  z-index: 90;
  height: 44px;
  box-sizing: border-box;
}

.inbox-back-btn,
.inbox-compose-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,
  .inbox-compose-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
  }
}

.inbox-back-btn:active,
.inbox-compose-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;
}

.inbox-action-btn.reply {
  color: var(--accent-blue);
}

@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: spin 0.8s linear infinite;
}

@keyframes spin {
  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: 20px;
}

.inbox-compose-btn-empty {
  background: var(--accent-blue);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .inbox-compose-btn-empty:hover {
    filter: brightness(1.1);
  }
}

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

.inbox-item {
  display: flex;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--separator);
  -webkit-tap-highlight-color: transparent;
}

@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-sender.user {
  color: var(--text-tertiary);
}

.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;
}

/* 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-sender.user {
  color: var(--text-tertiary);
}

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

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

.message-reply-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 24px;
  padding: 12px;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .message-reply-btn:hover {
    filter: brightness(1.1);
  }
}

/* Compose */
.compose-replying-to {
  padding: 10px 16px;
  background-color: var(--bg-tertiary);
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--separator);
}

.compose-error {
  margin: 12px 16px;
  padding: 10px 12px;
  background-color: rgba(255, 59, 48, 0.1);
  border: 1px solid var(--accent-red);
  border-radius: 8px;
  color: var(--accent-red);
  font-size: 13px;
}

.compose-form {
  padding: 16px;
}

.compose-input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--separator);
  border-radius: 8px;
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
}

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

.compose-textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--separator);
  border-radius: 8px;
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
  resize: none;
  min-height: 150px;
  font-family: inherit;
  box-sizing: border-box;
  -webkit-appearance: none;
  line-height: 1.5;
}

.compose-textarea:focus {
  border-color: var(--accent-blue);
}

.compose-send-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent-green);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .compose-send-btn:hover:not(:disabled) {
    filter: brightness(1.1);
  }
}

.compose-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

@media (max-width: 1024px) {
  .inbox-header {
      top: 36px;
  }
  .inbox-item:hover {
    background-color: transparent;
  }
}
.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: 37px;
  }

  .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;
}

/* SettingsPage.css */

.sp-page {
  background-color: var(--bg-primary);
  min-height: 100vh;
  padding-bottom: 80px;
}

/* Header — reuse ap-header pattern */
.sp-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--separator);
  z-index: 90;
  height: 44px;
  box-sizing: border-box;
}

.sp-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) {
  .sp-back-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
  }
}

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

.sp-header-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Proxima Nova', sans-serif;
}

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

/* Container */
.sp-container {
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* Section */
.sp-section {
  margin-bottom: 24px;
}

.sp-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  font-family: 'Proxima Nova', sans-serif;
}

/* Grid */
.sp-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Card base */
.sp-card {
  background: var(--bg-secondary);
  background: var(--gradient-fixture, var(--bg-secondary));
  border-radius: 12px;
  padding: 12px;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.sp-card.active {
  border-color: var(--accent-blue);
}

/* Half-width cards (2 per row) */
.sp-card-half {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: calc(33.333% - 7px);
  max-width: calc(50% - 5px);
}

/* Third-width cards (3 per row) */
.sp-card-third {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: calc(33.333% - 7px);
  min-width: 100px;
}

/* Full-width cards */
.sp-card-full {
  width: 100%;
}

/* Check icon on active cards */
.sp-check {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--accent-blue);
}

/* ====== THEME SECTION ====== */

.sp-theme-preview {
  border-radius: 8px;
  height: 56px;
  padding: 8px 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.sp-shimmer-bar {
  height: 8px;
  border-radius: 4px;
}

.sp-theme-info {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Proxima Nova', sans-serif;
}

.sp-theme-info svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* ====== ODDS FORMAT SECTION ====== */

.sp-odds-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-on-accent);
  background: var(--accent-blue);
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 4px;
  font-family: 'Proxima Nova', sans-serif;
}

.sp-odds-name {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-family: 'Proxima Nova', sans-serif;
}

.sp-odds-sample {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  font-feature-settings: "tnum";
  font-variant: tabular-nums;
  font-family: 'Proxima Nova', sans-serif;
}

/* ====== ODDS ACCEPTANCE SECTION ====== */

.sp-accept-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sp-accept-icon {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.sp-card.active .sp-accept-icon {
  color: var(--accent-blue);
}

.sp-accept-text {
  flex: 1 1;
  min-width: 0;
}

.sp-accept-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Proxima Nova', sans-serif;
}

.sp-accept-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-family: 'Proxima Nova', sans-serif;
}

/* ====== LANGUAGE SECTION ====== */

.sp-lang-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sp-lang-flag {
  width: 24px;
  height: 18px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
}

.sp-lang-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Proxima Nova', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 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;
  }
}

