:root {
  --primary: #4c6ef5;
  --primary-rgb: 76, 110, 245;
  --primary-dark: #3b5bdb;
  --accent: #7c3aed;
  --secondary: #f76707;
  --bg-dark: #121212;
  --bg-card: #1e1e1e;
  --text-light: #f8f9fa;
  --text-gray: #adb5bd;
  --border-radius: 8px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --xrp-color: #0a93eb;
  --csc-color: #8e44ad;
  --free-color: #43a047;
  --primary-color: #1a1a2e;
  --xrp-color: #0a93eb;
  --csc-color: #8e44ad;
  --secondary-color: #3498db;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --light-color: #30475e;
  --dark-color: #121212;
  --text-color: #f0f0f0;
  --text-secondary: #b0b0b0;
  --card-bg: #222831;
  --card-hover: #333f50;
  --gray-color: #95a5a6;
  --top-bar-height: 64px;
  --sidebar-width-expanded: 256px;
  --sidebar-width-collapsed: 64px;
  --app-sidebar-offset: 0px;
  /* Scrollbars: document, sidebar, and shared horizontal strips (reuse on feature pages) */
  --scrollbar-track: #121212;
  --scrollbar-thumb: rgba(255, 255, 255, 0.14);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.22);
  /* Inline text links on dark backgrounds (nav/buttons override via higher specificity) */
  --content-link-color: #74c0fc;
  --content-link-hover: #a5d8ff;
  --content-link-visited: #91a7ff;
}

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

/* Document scrollbar: always reserve vertical track so async content (e.g. recent tables) does not shift layout */
html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
  scrollbar-width: auto;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

html::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

html::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

html::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 5px;
}

html::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--dark-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Default prose links: readable on dark bg; .cta-button, .btn, .play-btn, nav, etc. keep their own colors */
body a:link {
  color: var(--content-link-color);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

body a:visited {
  color: var(--content-link-visited);
}

body a:hover {
  color: var(--content-link-hover);
}

body a:active {
  color: var(--content-link-hover);
}

/* Button-styled & nav links: beat body a:link (underlines + color) */
a.cta-button:link,
a.cta-button:visited,
a.cta-button:hover,
a.cta-button:active {
  color: #fff;
  text-decoration: none;
}

a.btn:link,
a.btn:visited,
a.btn:hover {
  color: var(--text-color);
  text-decoration: none;
}

a.play-btn:link,
a.play-btn:visited,
a.play-btn:hover,
a.play-btn:active {
  color: #fff;
  text-decoration: none;
}

/* Related cards carousel (scratch page) — uses .related-card-btn, not .play-btn */
a.related-card-btn:link,
a.related-card-btn:visited,
a.related-card-btn:hover,
a.related-card-btn:active {
  color: #fff;
  text-decoration: none;
}

/* Gifts / gift dashboard (gifts.css) — these are <a> styled as buttons, not Bootstrap .btn */
a.payment-btn:link,
a.payment-btn:visited,
a.payment-btn:hover,
a.payment-btn:active {
  color: #fff;
  text-decoration: none;
}

a.btn-small:link,
a.btn-small:visited,
a.btn-small:hover,
a.btn-small:active {
  color: #fff;
  text-decoration: none;
}

a.redeem-btn:link,
a.redeem-btn:visited,
a.redeem-btn:hover,
a.redeem-btn:active {
  color: #fff;
  text-decoration: none;
}

a.action-button:link,
a.action-button:visited,
a.action-button:hover,
a.action-button:active {
  color: #fff;
  text-decoration: none;
}

.bottom-nav a.bottom-nav-item:link,
.bottom-nav a.bottom-nav-item:visited {
  color: var(--text-secondary);
  text-decoration: none;
}

.bottom-nav a.bottom-nav-item:hover,
.bottom-nav a.bottom-nav-item:focus,
.bottom-nav a.bottom-nav-item:active,
#bottom-nav a.bottom-nav-item.active {
  color: var(--secondary-color);
}

.site-footer .footer-links > a:not(.social-link):link,
.site-footer .footer-links > a:not(.social-link):visited {
  color: var(--text-secondary);
  text-decoration: none;
}

a.social-link:link,
a.social-link:visited {
  color: var(--text-secondary);
  text-decoration: none;
}

a.verify-link:link,
a.verify-link:visited {
  color: var(--text-gray);
  text-decoration: none;
}

a.nft-link:link,
a.nft-link:visited {
  color: #ffd700;
  text-decoration: none;
}

a.notification-item-link:link,
a.notification-item-link:visited,
a.notification-popup-link:link,
a.notification-popup-link:visited {
  color: var(--primary, #4c6ef5);
  text-decoration: none;
}

a.logo:link,
a.logo:visited {
  color: var(--text-color);
  text-decoration: none;
}

a.back-link:link,
a.back-link:visited {
  color: var(--text-color);
  text-decoration: none;
}

a.giftcard-link-mobile:link,
a.giftcard-link-mobile:visited {
  color: #4ecdc4;
  text-decoration: none;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Token selector styles */
.token-selector {
  display: none !important; /* Hide token selector completely */
}

/* Purchase info banner */
.purchase-info-banner {
  margin-top: 1rem;
  background-color: rgba(0, 149, 218, 0.2);
  border: 1px solid rgba(0, 149, 218, 0.5);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.info-text {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Section tabs */
.card-section-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  gap: 0.5rem;
}

.section-tab {
  padding: 0.5rem 1.5rem;
  background-color: var(--bg-card);
  border: none;
  border-radius: var(--border-radius);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: none; /* Remove bottom border */
}

.section-tab:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.section-tab.active {
  background-color: var(--primary);
  color: white;
}

/* Card types */
.free-card {
  display: block;
}

.premium-card {
  display: block;
}

/* Hide cards based on section */
.hide-card {
  display: none;
}

/* Price tag styles */
.price-tag {
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 0.9rem;
}

.xrp-price, .csc-price {
  font-weight: 600;
  margin-bottom: 0.8rem;
  text-align: center;
}

.xrp-price {
  color: var(--xrp-color);
}

.csc-price {
  color: var(--csc-color);
}

/* Footer links */
.footer-links {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-gray);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--primary);
}

/* Info modal styles */
.info-content {
  text-align: left;
  margin: 1.5rem 0;
}

.hash-explanation {
  margin-top: 1.5rem;
}

.hash-explanation h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.hash-explanation ol {
  padding-left: 1.5rem;
}

.hash-explanation li {
  margin-bottom: 0.5rem;
}

/* Scratch cards grid */
.scratch-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  /* Remove any token-specific left borders */
  border-left: none !important;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  background: var(--card-hover);
}

.card-inner {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 220px;
  position: relative;
}

.card-title {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
  color: var(--text-color);
  text-align: center;
}

.card-jackpot {
  text-align: center;
  margin: 0.25rem 0 2rem 0;
  animation: jackpot-pulse 10s ease-in-out infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.jackpot-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  opacity: 0.65;
  letter-spacing: 1px;
  font-weight: 600;
  text-transform: uppercase;
}

.jackpot-value {
  font-size: 1.4rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.1;
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.25),
    0 0 20px rgba(255, 255, 255, 0.15),
    0 0 30px rgba(255, 255, 255, 0.08);
}

@keyframes jackpot-pulse {
  0%, 95%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  97.5% {
    transform: scale(1.015);
    opacity: 0.98;
  }
}

.card-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  overflow: visible;
  text-align: center;
  display: block;
  max-height: 40px; /* Limit height to maintain consistent spacing */
  overflow: hidden;
}

.card-price {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  text-align: center;
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  padding: 0 1.5rem;
}

.entry-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.entry-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0.7;
  font-weight: 500;
  display: inline-block;
  margin: 0;
}

.main-page .card-price .entry-row .xrp-price,
.main-page .card-price .entry-row .csc-price,
.main-page .card-price .entry-row [class*="-price"] {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  display: inline !important;
  margin-bottom: 0 !important;
  text-align: left !important;
  color: var(--text-color) !important;
}

/* Default play button styles - can be overridden by token-specific styles */
.play-btn {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
  width: 100%;
  text-align: center;
  display: inline-block;
  text-decoration: none;
}

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

/* Premium dark button style for main page */
.main-page .play-btn {
  height: 46px;
  width: 100%;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: linear-gradient(180deg, #1b2431 0%, #131b26 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.95);
  
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.18s ease,
              filter 0.18s ease;
}

.main-page .card:hover .play-btn {
  transform: translateY(-2px);
  border-color: rgba(230, 201, 122, 0.25); /* soft champagne */
  filter: brightness(1.06);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.main-page .card:active .play-btn {
  transform: translateY(0px);
  filter: brightness(0.98);
}

.tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
}

.free-tag:not([class*="fa-"]) {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--success-color);
  color: white;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-inner {
  position: relative;
}

.card-title {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.card-prize-badges {
  position: absolute;
  top: -8px;
  right: 0;
  transform: none;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

.nft-badge,
.promo-badge {
  color: #ffd700;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  animation: nftTextGlow 2s ease-in-out infinite;
  white-space: nowrap;
  line-height: 1;
}

@keyframes nftTextGlow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  }
  50% {
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.4);
  }
}

.premium-tag:not([class*="fa-"]) {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--warning-color);
  color: white;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  background-color: var(--dark-color);
  margin: 10% auto;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  color: var(--text-color);
}

.auto-signin-info {
  background-color: rgba(0, 149, 218, 0.1);
  border-left: 3px solid rgba(10, 147, 235, 0.7);
  padding: 10px 15px;
  margin: 15px 0;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.4;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

.close-modal:hover {
  color: var(--secondary);
}

#result-message {
  margin: 2rem 0;
  font-size: 1.25rem;
}

.result-actions {
  margin-top: 1.5rem;
}

#play-again-btn {
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

#play-again-btn:hover {
  background-color: var(--primary-dark);
}

/* Wallet modal styles */
.wallet-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.wallet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 300px;
  padding: 1rem;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.wallet-btn:hover {
  background-color: var(--primary-dark);
}

.wallet-btn.secondary {
  background-color: transparent;
  border: 1px solid var(--text-gray);
  color: var(--text-light);
}

.wallet-btn.secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.wallet-separator {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--text-gray);
  width: 80%;
  font-size: 0.9rem;
}

.wallet-separator::before,
.wallet-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--text-gray);
  margin: 0 10px;
}

.wallet-icon {
  font-size: 1.25rem;
}

/* User Balance Display */
.user-balance {
  display: none;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
}

.balance-amount {
  font-weight: bold;
  color: var(--primary);
}

/* Animation for win */
@keyframes win-glow {
  0% { box-shadow: 0 0 10px var(--primary); }
  50% { box-shadow: 0 0 20px var(--primary), 0 0 30px var(--secondary); }
  100% { box-shadow: 0 0 10px var(--primary); }
}

.win-animation {
  animation: win-glow 2s infinite;
}

/* Generic token styling - consistent for all tokens */
.section-tab[data-section]:not([data-section="all"]) {
  background-color: var(--bg-card);
  color: var(--text-light);
}

.section-tab[data-section]:not([data-section="all"]).active {
  background-color: var(--primary);
  color: white;
  font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .scratch-cards {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .modal-content {
    margin: 25% auto;
    width: 90%;
  }
  
  .token-options {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Verification link */
.verify-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-gray);
  text-decoration: none;
  transition: color 0.3s;
}

.verify-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Verification info styles */
.verification-info {
  text-align: left;
}

.verification-info h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  text-align: center;
}

.hash-info {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: var(--border-radius);
  font-family: monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.hash-info p {
  margin-bottom: 0.5rem;
}

.hash-value {
  color: var(--primary);
  font-size: 0.8rem;
  word-break: break-all;
}

/* Symbols grid display */
.symbols-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
}

.symbol-cell {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 0.5rem;
  border-radius: var(--border-radius);
  font-size: 1.5rem;
  text-align: center;
}

.symbol-cell.winning {
  background-color: rgba(var(--primary), 0.3);
  animation: win-pulse 1.5s infinite;
}

@keyframes win-pulse {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

/* Winning pattern visualization */
.winning-pattern {
  margin: 1rem 0;
  text-align: center;
  font-weight: bold;
}

.winning-pattern-name {
  color: var(--secondary);
}

/* XRPL Hash Card Styles */
.xrpl-hash-card {
  background-color: #1a1a2e;
  /* Removed colored border as requested */
  border-left: none;
}

.xrpl-hash-card .scratch-container {
  height: 100px; /* Lower height for 1x5 layout */
  background-color: #111;
}

.xrpl-hash-card .card-description {
  font-size: 0.85rem;
  margin-bottom: 1rem;
  color: var(--text-gray);
  text-align: center;
}

.hash-info {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: var(--border-radius);
  font-family: monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-wrap: break-word;
  margin-top: 1rem;
}

.hash-info p {
  margin-bottom: 0.5rem;
}

.hash-value {
  color: #2962ff;
  font-size: 0.8rem;
  word-break: break-all;
}

.play-now-btn {
  display: block;
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.75rem;
  background-color: #2962ff;
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.play-now-btn:hover {
  background-color: #0039cb;
}

.play-now-btn:disabled {
  background-color: #555;
  cursor: not-allowed;
}

/* Add specific styles for the win highlighting in XRPL Hash Cards */
.win-result .matching-characters {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.win-result .match-char {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  background-color: rgba(0, 170, 0, 0.2);
  border-radius: 4px;
  font-family: monospace;
  font-weight: bold;
}



/* Enhance hash info for real XRPL data */
.hash-info small {
  color: #aaa;
  font-size: 0.7rem;
}

.hash-info small:has(✓) {
  color: #43a047;
}

/* Waiting overlay for XRPL ledger */
.waiting-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  border-radius: var(--border-radius);
}

.waiting-content {
  text-align: center;
  padding: 20px;
  max-width: 80%;
}

.waiting-content p {
  margin: 10px 0;
  color: white;
  font-size: 0.9rem;
}

.waiting-content.error {
  background-color: rgba(180, 0, 0, 0.2);
  border-radius: 8px;
  padding: 15px;
}

.waiting-content .loading-indicator {
  margin: 0 auto 15px;
}

.dismiss-error {
  margin-top: 10px;
  padding: 5px 10px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Blocking overlay buttons */
.dismiss-error-btn {
  margin-top: 10px;
  padding: 10px 15px;
  background-color: #ffffff;
  color: #333;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.dismiss-error-btn:hover {
  background-color: #f0f0f0;
}

/* Card waiting animation */
@keyframes card-waiting-spin {
  from {
    transform: scale(1.2) rotateY(180deg);
  }
  to {
    transform: scale(1.2) rotateY(540deg); /* Full 360 rotation */
  }
}

.card-loading-animation {
  transition: transform 0.3s ease;
  box-shadow: 0 0 20px rgba(41, 98, 255, 0.6);
  will-change: transform;
  perspective: 1000px;
  backface-visibility: visible;
}

/* Enhanced loading indicator for card animation */
.card-loading-animation .loading-indicator {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

/* Win notification overlay */
.win-notification-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.5s ease;
  border-radius: 12px;
  pointer-events: none;
}

.win-notification-overlay.visible {
  display: flex;
  opacity: 1;
  animation: pulseBackground 2s infinite;
}

.win-notification-content {
  background-color: rgba(46, 204, 113, 0.2);
  border: 2px solid var(--success-color);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  max-width: 80%;
  box-shadow: 0 0 30px rgba(46, 204, 113, 0.5);
  backdrop-filter: blur(5px);
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* Overlay uses pointer-events: none; re-enable hits for modal body so links/inputs/text work */
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
}

.win-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  animation: bounce 1s infinite alternate;
}

.win-title {
  font-size: 2.5rem;
  margin: 0 0 1rem 0;
  color: var(--success-color);
  text-shadow: 0 0 10px rgba(46, 204, 113, 0.7);
  font-weight: 700;
}

.win-prize {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: white;
}

.win-message {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* NFT notification specific styles - Gold theme */
.nft-notification-content {
  background-color: rgba(255, 215, 0, 0.15);
  border: 2px solid #ffd700;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  max-width: 80%;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
  backdrop-filter: blur(5px);
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
}

.nft-title {
  font-size: 2.5rem;
  margin: 0 0 1rem 0;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
  font-weight: 700;
}

.nft-details {
  margin-top: 1rem;
  text-align: center;
}

.nft-link-container {
  margin-bottom: 1rem;
}

.nft-link {
  color: #ffd700;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.3s ease;
  background: rgba(255, 215, 0, 0.1);
  pointer-events: auto;
}

.nft-link:hover {
  background: rgba(255, 215, 0, 0.2);
  transform: translateY(-1px);
}

.nft-link i {
  font-size: 0.8em;
  margin-left: 5px;
  opacity: 0.7;
}

.nft-ok-button {
  background: #ffd700;
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  position: relative;
  pointer-events: auto;
}

.nft-ok-button:hover {
  background: #ffed4e;
  transform: translateY(-2px);
}

/* Promo win modal: primary CTA = Redeem, secondary = OK (NFT overlay unchanged) */
#promo-notification-overlay #promo-redeem-link {
  background: #ffd700;
  color: #000;
  padding: 12px 26px;
  border-radius: 5px;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.35);
}

#promo-notification-overlay #promo-redeem-link:hover {
  background: #ffed4e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.45);
}

#promo-notification-overlay #promo-redeem-link i {
  opacity: 0.9;
  color: #000;
  font-size: 0.95em;
  margin-left: 8px;
  vertical-align: -0.06em;
}

/* Match promo code field: single gold border, no second focus ring */
#promo-notification-overlay #promo-ok-button {
  background: rgba(255, 215, 0, 0.08);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-radius: 8px;
  padding: 9px 20px;
  box-shadow: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  -webkit-appearance: none;
}

#promo-notification-overlay #promo-ok-button:hover {
  background: rgba(255, 215, 0, 0.14);
  color: #ffed4e;
  border-color: rgba(255, 215, 0, 0.4);
  transform: translateY(-1px);
}

#promo-notification-overlay #promo-ok-button:focus,
#promo-notification-overlay #promo-ok-button:focus-visible,
#promo-notification-overlay #promo-ok-button:active {
  outline: none !important;
  box-shadow: none !important;
  border: 1px solid rgba(255, 215, 0, 0.28);
}

#promo-notification-overlay #promo-ok-button:focus-visible {
  border-color: rgba(255, 215, 0, 0.55);
}

#promo-notification-overlay #promo-ok-button::-moz-focus-inner {
  border: 0;
}

@keyframes pulseBackground {
  0% { background-color: rgba(0, 0, 0, 0.8); }
  50% { background-color: rgba(0, 0, 0, 0.6); }
  100% { background-color: rgba(0, 0, 0, 0.8); }
}

@keyframes scaleIn {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

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

/* Media queries for win notification */
@media (max-width: 768px) {
  .win-notification-content {
    padding: 1.2rem;
  }
  
  .win-icon {
    font-size: 2.5rem;
  }
  
  .win-title {
    font-size: 2rem;
  }
  
  .win-prize {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .win-notification-content {
    padding: 1rem;
    max-width: 90%;
  }
  
  .win-icon {
    font-size: 2rem;
  }
  
  .win-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .win-prize {
    font-size: 1.2rem;
  }
  
  .win-message {
    font-size: 0.9rem;
  }
}

/* ========== Top Bar (Desktop: logo + notifications + account) ========== */
header.top-bar {
  background-color: var(--dark-color);
  color: var(--text-color);
  padding: 0.75rem 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--top-bar-height);
  box-sizing: border-box;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-color);
  z-index: 1001;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.top-bar-actions .notification-bell-item,
.top-bar-actions .header-profile-item {
  margin-left: 0 !important;
  border-left: none;
  padding-left: 0;
}

.connected-wallet {
  display: none;
}

/* ========== Left Sidebar (Desktop: collapsible) ========== */
.sidebar-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 256px;
  height: 100vh;
  background: var(--dark-color);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.4);
  z-index: 200;
  transition: width 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-nav.collapsed {
  width: 64px;
}

.sidebar-nav .nav-label {
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-nav.collapsed .nav-label {
  display: none;
}

.sidebar-collapse-btn {
  flex-shrink: 0;
  background: var(--dark-color) !important;
  background-color: var(--dark-color) !important;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-color);
  padding: 0;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--top-bar-height);
  min-height: var(--top-bar-height);
}

.sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  background-color: rgba(255, 255, 255, 0.04) !important;
  filter: none;
}

.sidebar-nav.collapsed .sidebar-collapse-btn i {
  transform: rotate(180deg);
}

.sidebar-nav .main-nav {
  flex: 1;
  overflow-y: auto;
  /* Same width whether the nav list needs a vertical scrollbar (e.g. font/line-height differs on home vs other pages) */
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.sidebar-nav .main-nav::-webkit-scrollbar {
  width: 10px;
}

.sidebar-nav .main-nav::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

.sidebar-nav .main-nav::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 5px;
}

.sidebar-nav .main-nav::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

.sidebar-nav .main-nav ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.sidebar-nav .main-nav ul li {
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Non-interactive section labels (Games, Gift cards, Community) */
.sidebar-nav .main-nav ul li.nav-category {
  margin: 0;
  padding: 0.7rem 1.25rem 0.3rem;
  border-bottom: none;
  pointer-events: none;
}

.sidebar-nav .nav-category-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.34);
}

.sidebar-nav.collapsed .main-nav ul li.nav-category {
  display: none;
}

.sidebar-nav .main-nav ul li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.sidebar-nav .main-nav ul li a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--secondary-color);
}

.sidebar-nav .main-nav ul li a i {
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
}

.sidebar-nav.collapsed .main-nav ul li a {
  justify-content: center;
  padding: 1rem;
}

/* Body margin for sidebar (desktop only) */
@media (min-width: 769px) {
  body {
    margin-left: 256px;
    --app-sidebar-offset: var(--sidebar-width-expanded);
  }
  body.sidebar-collapsed {
    margin-left: 64px;
    --app-sidebar-offset: var(--sidebar-width-collapsed);
  }
}

@media (max-width: 768px) {
  body {
    margin-left: 0;
    --app-sidebar-offset: 0px;
    padding-top: calc(var(--top-bar-height) + env(safe-area-inset-top, 0px));
    padding-bottom: 80px; /* Space for fixed bottom nav */
  }
}

/* Desktop: full-viewport overlays align with main content (right of sidebar) */
@media (min-width: 769px) {
  body .session-end-modal,
  body .payment-modal,
  body .modal,
  body .cf-modal,
  body .hl-modal,
  body .lb-modal,
  body .mn-modal,
  body .hw-calc-modal,
  body .dice-calc-modal,
  body .plinko-calc-modal,
  body .dice-payment-processing-overlay,
  body .plinko-processing-overlay,
  body .hexwheel-processing-overlay,
  body .joey-payment-processing-overlay,
  body .notification-popup-overlay,
  body .xaman-push-overlay,
  body .verification-modal,
  body #email-signup-popup {
    left: var(--app-sidebar-offset);
    right: 0;
    width: auto;
  }
}

/* ========== Bottom Nav (Mobile only) ========== */
.bottom-nav {
  display: none;
}

/* ========== Shared notification dropdown (standalone) ========== */
#notification-dropdown {
  position: fixed;
  width: 320px;
  max-width: calc(100vw - 2rem);
  /* top/left/right set by JS to align with bell button */
}

/* ========== Desktop: hide mobile elements ========== */
.mobile-only {
  display: none !important;
}

.desktop-only {
  display: flex !important;
}

/* ========== Navigation (legacy - sidebar overrides) ========== */
.main-nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

/* User Account in Navigation - Desktop: bell + account as one block */
.notification-bell-item {
  margin-left: 30px !important;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 20px;
}

.user-account-item {
  margin-left: 12px !important;
  border-left: none;
  padding-left: 0;
}

/* Hide account/notification when user not logged in (overrides mobile-only !important) */
.user-account-item.user-account-hidden,
.notification-bell-item.user-account-hidden,
.header-profile-item.user-account-hidden {
  display: none !important;
}

.header-profile-menu-item.header-profile-menu-auth-only.user-account-hidden,
.header-profile-menu-divider.header-profile-menu-auth-only.user-account-hidden {
  display: none !important;
}

.sidebar-nav .main-nav ul li.header-profile-menu-auth-only.user-account-hidden {
  display: none !important;
}

.profile-menu-guest-only.connect-wallet-hidden {
  display: none !important;
}

/* Header + sidebar: connect wallet (shown when logged out; hidden when bell/account visible) */
.header-connect-wallet-item.connect-wallet-hidden {
  display: none !important;
}

.header-connect-wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-card, #1e1e1e);
  color: var(--text-color, #f0f0f0);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.header-connect-wallet-btn:hover {
  background: #2a2a2a;
  border-color: rgba(243, 186, 47, 0.35);
  color: #ffffff;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(243, 186, 47, 0.08);
}

.header-connect-wallet-btn:focus-visible {
  outline: 2px solid rgba(243, 186, 47, 0.45);
  outline-offset: 2px;
}

/* Home hub chrome: align with page gold accent */
body.home-hub .header-connect-wallet-btn:hover {
  border-color: rgba(230, 201, 122, 0.45);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(230, 201, 122, 0.1);
}

.sidebar-nav .main-nav ul li.header-connect-wallet-item {
  list-style: none;
  margin: 0.25rem 0;
  padding: 0 0.5rem;
}

.sidebar-nav .header-connect-wallet-btn {
  width: calc(100% - 0.5rem);
  justify-content: flex-start;
  margin-left: 0.25rem;
  box-sizing: border-box;
}

.user-account-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-address {
  color: var(--text-color);
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-account-info .logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-card, #1e1e1e);
  color: var(--text-color, #f0f0f0);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  width: auto;
}

.user-account-info .logout-btn:hover {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  filter: none;
}

.user-account-info .logout-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

body.home-hub .user-account-info .logout-btn:hover {
  border-color: rgba(230, 201, 122, 0.45);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(230, 201, 122, 0.1);
}

/* Header profile shortcut (logged in): between notifications and address */
.top-bar-actions .header-profile-item {
  margin-left: 0 !important;
  border-left: none;
  padding-left: 0;
  display: flex;
  align-items: center;
}

.header-profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  height: auto;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: transparent !important;
  color: var(--text-color) !important;
  text-decoration: none;
  line-height: 1;
  font-size: 0.9rem;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.header-profile-link:visited {
  color: var(--text-color) !important;
}

.header-profile-link:hover {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: var(--text-color) !important;
  filter: none;
}

.header-profile-link:focus-visible {
  outline: 2px solid rgba(243, 186, 47, 0.45);
  outline-offset: 2px;
}

.header-profile-link i {
  font-size: 1em;
  line-height: 1;
  color: inherit;
}

.header-profile-link i::before {
  color: inherit;
}

body.home-hub .header-profile-link:hover {
  border-color: rgba(230, 201, 122, 0.4) !important;
}

/* Header account menu (avatar opens link dropdown) */
.header-profile-menu {
  position: relative;
}

.header-profile-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-sizing: border-box;
  margin: 0;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text-color);
  line-height: 1;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.header-profile-menu-trigger:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text-color);
}

.header-profile-menu-trigger:focus-visible {
  outline: 2px solid rgba(243, 186, 47, 0.45);
  outline-offset: 2px;
}

body.home-hub .header-profile-menu-trigger:hover {
  border-color: rgba(230, 201, 122, 0.4);
}

.header-profile-menu-trigger .fa-user-circle {
  font-size: 1.05em;
}

.header-profile-menu-caret {
  font-size: 0.55rem;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

.header-profile-menu-trigger[aria-expanded="true"] .header-profile-menu-caret {
  transform: rotate(180deg);
}

.header-profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 1.5rem));
  background: var(--card-bg, #222831);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 1100;
  padding: 6px 0;
  display: none;
}

.header-profile-dropdown.is-open {
  display: block;
}

.header-profile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 10px 14px;
  color: var(--text-color) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.header-profile-menu-item:link,
.header-profile-menu-item:visited {
  color: var(--text-color) !important;
  text-decoration: none !important;
}

.header-profile-menu-item:hover,
.header-profile-menu-item:active {
  text-decoration: none !important;
}

.header-profile-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--secondary-color) !important;
}

.header-profile-menu-item:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

.header-profile-menu-item i {
  width: 1.15rem;
  text-align: center;
  flex-shrink: 0;
  color: currentColor;
}

.header-profile-menu-item:hover i {
  color: currentColor;
}

.header-profile-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 0;
}

.header-profile-menu-item--external i {
  font-size: 1.05em;
}

.header-profile-menu-account {
  margin: 0 !important;
  border-left: none !important;
  padding-left: 0 !important;
}

.header-profile-menu-account .user-account-info {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 10px 14px 8px;
}

.header-profile-menu-account .account-address {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-profile-menu-account .logout-btn {
  width: 100%;
  justify-content: center;
}

.header-profile-menu-guest-footer {
  margin: 0;
  padding: 10px 14px 8px;
}

button.header-profile-menu-connect-btn.header-connect-wallet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.5rem 1rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-card, #1e1e1e);
  color: var(--text-color, #f0f0f0);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease,
    filter 0.2s ease;
}

button.header-profile-menu-connect-btn.header-connect-wallet-btn:hover {
  background: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  filter: none;
}

button.header-profile-menu-connect-btn.header-connect-wallet-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

body.home-hub button.header-profile-menu-connect-btn.header-connect-wallet-btn:hover {
  border-color: rgba(230, 201, 122, 0.45);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(230, 201, 122, 0.1);
}

/* Referrals profile page (site chrome) */
.profile-page-content {
  padding: 1.5rem 0 4rem;
}

.profile-page-content #referrals {
  scroll-margin-top: calc(var(--top-bar-height) + 12px);
}

.ref-code-highlight-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(243, 186, 47, 0.35);
  background: linear-gradient(135deg, rgba(243, 186, 47, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
}

.ref-code-highlight-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  width: 100%;
  flex-basis: 100%;
}

.ref-code-highlight-value {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.04em;
  color: var(--text-color);
  flex: 1 1 auto;
  min-width: 0;
}

.ref-code-edit-btn {
  flex-shrink: 0;
}

.ref-share-block {
  margin-bottom: 1rem;
}

.ref-share-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.ref-share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.ref-share-link {
  flex: 1 1 200px;
  min-width: 0;
  word-break: break-all;
  font-size: 0.85rem;
  color: var(--secondary, #4ecdc4);
  text-decoration: none;
}

.ref-share-link:hover {
  text-decoration: underline;
}

.ref-copy-link-btn {
  flex-shrink: 0;
}

/* Referral program panel — dark recessed fields, neutral gray actions */
.referrals-page .ref-program-panel.referrals-panel {
  background: #131316;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.profile-page.referrals-page .ref-program-panel.referrals-panel > h2 {
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
  color: #ececec;
  font-weight: 700;
}

/* Referrals page — mobile-first width & density (align hero with main content) */
.referrals-page .hero-modern .container {
  width: 100%;
  max-width: 1200px;
  padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

.referrals-page .profile-page-content {
  padding: 0.6rem 0 2.25rem;
}

.referrals-page .profile-page-content > .container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

.referrals-page.profile-page .profile-page-content .referrals-panel {
  padding: 0.85rem 0.65rem;
  margin-bottom: 0.75rem;
  border-radius: 10px;
}

.referrals-page.profile-page .profile-page-content .referrals-panel:not(.ref-program-panel) h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.referrals-page.profile-page .profile-page-content .ref-earnings-surface,
.referrals-page.profile-page .profile-page-content .ref-earnings-surface--muted {
  padding: 0.65rem 0.5rem;
}

.referrals-page.profile-page .profile-page-content .ref-earnings-meta {
  margin-bottom: 0.65rem;
}

.referrals-page.profile-page .profile-page-content .ref-earnings-stat-value {
  font-size: 1.45rem;
}

.referrals-page.profile-page .profile-page-content .ref-earnings-by-user {
  margin-top: 0.45rem;
}

.referrals-page.profile-page .profile-page-content .ref-earnings-table th,
.referrals-page.profile-page .profile-page-content .ref-earnings-table td {
  padding: 0.38rem 0.4rem;
  font-size: 0.76rem;
}

.referrals-page.profile-page .profile-page-content .ref-earnings-user-summary,
.referrals-page.profile-page .profile-page-content .ref-earnings-user-static {
  padding: 0.45rem 0.45rem;
  min-height: 2.5rem;
}

.referrals-page.profile-page .profile-page-content .ref-earnings-user-panel {
  padding-left: 0.45rem;
  padding-right: 0.45rem;
  padding-bottom: 0.45rem;
}

.referrals-page.profile-page .profile-page-content .referrals-table th,
.referrals-page.profile-page .profile-page-content .referrals-table td {
  padding: 0.42rem 0.35rem;
  font-size: 0.78rem;
}

.referrals-page.profile-page .profile-page-content .referrals-table td.ref-since-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (min-width: 576px) {
  .referrals-page .hero-modern .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .referrals-page .profile-page-content > .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .referrals-page.profile-page .profile-page-content .referrals-panel {
    padding: 1rem 0.9rem;
    margin-bottom: 0.9rem;
  }

  .referrals-page.profile-page .profile-page-content .ref-earnings-surface,
  .referrals-page.profile-page .profile-page-content .ref-earnings-surface--muted {
    padding: 0.85rem 0.75rem;
  }

  .referrals-page.profile-page .profile-page-content .ref-earnings-stat-value {
    font-size: 1.55rem;
  }

  .referrals-page.profile-page .profile-page-content .ref-earnings-table th,
  .referrals-page.profile-page .profile-page-content .ref-earnings-table td {
    padding: 0.45rem 0.5rem;
    font-size: 0.8rem;
  }

  .referrals-page.profile-page .profile-page-content .ref-earnings-user-summary,
  .referrals-page.profile-page .profile-page-content .ref-earnings-user-static {
    padding: 0.5rem 0.55rem;
  }

  .referrals-page.profile-page .profile-page-content .ref-earnings-user-panel {
    padding-left: calc(0.55rem + 1.1rem + 0.55rem);
    padding-right: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .referrals-page.profile-page .profile-page-content .referrals-table th,
  .referrals-page.profile-page .profile-page-content .referrals-table td {
    padding: 0.48rem 0.55rem;
    font-size: 0.82rem;
  }
}

@media (min-width: 768px) {
  .referrals-page .hero-modern .container {
    width: 90%;
    padding-left: 15px;
    padding-right: 15px;
  }

  .referrals-page .profile-page-content {
    padding: 1.5rem 0 4rem;
  }

  .referrals-page .profile-page-content > .container {
    width: 90%;
    padding-left: 15px;
    padding-right: 15px;
  }

  .referrals-page.profile-page .profile-page-content .referrals-panel {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: 12px;
  }

  .referrals-page.profile-page .profile-page-content .referrals-panel:not(.ref-program-panel) h2 {
    font-size: 1.1rem;
    margin: 0 0 0.75rem;
  }

  .referrals-page.profile-page .profile-page-content .ref-earnings-surface,
  .referrals-page.profile-page .profile-page-content .ref-earnings-surface--muted {
    padding: 1rem 1.1rem;
  }

  .referrals-page.profile-page .profile-page-content .ref-earnings-meta {
    margin-bottom: 0.85rem;
  }

  .referrals-page.profile-page .profile-page-content .ref-earnings-stat-value {
    font-size: 1.65rem;
  }

  .referrals-page.profile-page .profile-page-content .ref-earnings-by-user {
    margin-top: 0.65rem;
  }

  .referrals-page.profile-page .profile-page-content .ref-earnings-table th,
  .referrals-page.profile-page .profile-page-content .ref-earnings-table td {
    padding: 0.5rem 0.65rem;
    font-size: 0.82rem;
  }

  .referrals-page.profile-page .profile-page-content .ref-earnings-user-summary,
  .referrals-page.profile-page .profile-page-content .ref-earnings-user-static {
    padding: 0.55rem 0.65rem;
    min-height: 2.75rem;
  }

  .referrals-page.profile-page .profile-page-content .ref-earnings-user-panel {
    padding: 0 0.65rem 0.65rem;
    padding-left: calc(0.65rem + 1.1rem + 0.65rem);
  }

  .referrals-page.profile-page .profile-page-content .referrals-table th,
  .referrals-page.profile-page .profile-page-content .referrals-table td {
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* Referrals page: gold secondary actions (replaces flat grey outlines) */
.referrals-page.profile-page .profile-page-content .referrals-btn-outline {
  border-color: rgba(243, 186, 47, 0.42);
  color: #f5edd4;
  background: rgba(243, 186, 47, 0.08);
}

.referrals-page.profile-page .profile-page-content .referrals-btn-outline:hover {
  background: rgba(243, 186, 47, 0.16);
  border-color: rgba(230, 201, 122, 0.52);
  color: #fff;
}

.referrals-page.profile-page .profile-page-content .referrals-btn-outline:focus-visible {
  outline: 2px solid rgba(243, 186, 47, 0.5);
  outline-offset: 2px;
}

/* ========== Referrals: KPI + share hub ========== */

.referrals-page .ref-page-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 0 0 1rem;
}

.referrals-page .ref-page-quick-actions .referrals-btn-primary {
  background: linear-gradient(180deg, #f0d36a 0%, #c9a227 100%);
  color: #14110a;
  box-shadow:
    0 2px 14px rgba(232, 192, 71, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.referrals-page .ref-page-quick-actions .referrals-btn-primary:hover {
  filter: brightness(1.06);
}

.referrals-page .ref-page-quick-actions .referrals-btn-primary:focus-visible {
  outline: 2px solid rgba(232, 192, 71, 0.55);
  outline-offset: 2px;
}

@media (min-width: 576px) {
  .referrals-page .ref-page-quick-actions {
    margin-bottom: 1.25rem;
  }
}

.referrals-page .ref-kpi-panel {
  margin-bottom: 0.75rem;
}

@media (min-width: 576px) {
  .referrals-page .ref-kpi-panel {
    margin-bottom: 0.9rem;
  }
}

@media (min-width: 768px) {
  .referrals-page .ref-kpi-panel {
    margin-bottom: 1.25rem;
  }
}

.referrals-page .ref-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 900px) {
  .referrals-page .ref-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}

.referrals-page .ref-kpi-card {
  border-radius: 20px;
  padding: 1.15rem 1.25rem;
  background: linear-gradient(180deg, #121826, #0d1118);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  min-width: 0;
}

.referrals-page .ref-kpi-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7f8aa3;
  margin-bottom: 0.45rem;
}

.referrals-page .ref-kpi-value {
  display: block;
  font-size: clamp(1.65rem, 4vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.referrals-page .ref-kpi-value--gold {
  color: #e8c047;
  text-shadow: 0 0 40px rgba(232, 192, 71, 0.15);
}

.referrals-page .ref-kpi-sublabel {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: rgba(127, 138, 163, 0.85);
}

.referrals-page .ref-share-hub {
  margin-bottom: 0.75rem;
}

@media (min-width: 576px) {
  .referrals-page .ref-share-hub {
    margin-bottom: 0.9rem;
  }
}

@media (min-width: 768px) {
  .referrals-page .ref-share-hub {
    margin-bottom: 1.25rem;
  }
}

.referrals-page .ref-share-hub-inner {
  background: #0d1118;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.15rem 1rem 1.2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.referrals-page .ref-share-hub-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.referrals-page .ref-share-hub-lead {
  font-size: 0.86rem;
  color: rgba(180, 190, 215, 0.9);
  margin: 0 0 1rem;
  line-height: 1.45;
}

.referrals-page .ref-share-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0;
  min-height: 3rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0c10;
}

.referrals-page .ref-share-url-scroll-wrap {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem 1rem;
  background: transparent;
  display: flex;
  align-items: center;
}

.referrals-page code.ref-share-url-text#ref-url-trough,
.referrals-page .ref-share-url-text {
  display: block;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', 'Courier New', monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.45;
  color: #dce3ef;
  letter-spacing: 0.03em;
  text-shadow: 0 0 18px rgba(160, 190, 255, 0.12);
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Class name avoids token-base [class*="-btn"] (was ref-share-btn-copy → solid token-grey overlay) */
.referrals-page .ref-share-url-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 5.25rem;
  padding: 0 1rem;
  margin: 0;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  flex-shrink: 0;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.referrals-page .ref-share-url-copy:hover {
  background: rgba(232, 192, 71, 0.16);
  border-left-color: rgba(232, 192, 71, 0.35);
  box-shadow: inset 0 0 0 1px rgba(232, 192, 71, 0.12);
  color: #ffffff;
}

.referrals-page .ref-share-url-copy:focus-visible {
  outline: 2px solid rgba(232, 192, 71, 0.55);
  outline-offset: 2px;
  z-index: 1;
}

.referrals-page .ref-share-url-copy .ref-share-url-copy-label {
  color: rgba(232, 236, 245, 0.95);
}

@media (min-width: 521px) {
  .referrals-page .ref-share-url-copy > i {
    display: none;
  }

  .referrals-page .ref-share-url-copy {
    gap: 0;
  }
}

@media (max-width: 520px) {
  .referrals-page .ref-share-url-copy .ref-share-url-copy-label {
    display: none;
  }

  .referrals-page .ref-share-url-copy {
    min-width: 2.75rem;
    width: auto;
    padding: 0 0.75rem;
  }
}

.referrals-page .ref-share-instant-label {
  margin: 1.05rem 0 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7f8aa3;
}

.referrals-page .ref-share-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.referrals-page .ref-share-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e8ecf5;
  font-family: inherit;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}

.referrals-page .ref-share-pill:hover {
  background: rgba(232, 192, 71, 0.14);
  border-color: rgba(232, 192, 71, 0.42);
  box-shadow:
    0 0 22px rgba(232, 192, 71, 0.14),
    0 4px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.referrals-page .ref-share-pill:focus-visible {
  outline: 2px solid rgba(232, 192, 71, 0.5);
  outline-offset: 3px;
}

.referrals-page .ref-share-pill i {
  font-size: 1.05rem;
  pointer-events: none;
}

.referrals-page .ref-share-pill-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.referrals-page .ref-share-no-code {
  margin: 0;
}

.referrals-page .ref-inline-code {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.referrals-page .ref-share-create-shell {
  margin-top: 0.25rem;
}

.referrals-page .ref-share-hint {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  color: rgba(150, 160, 185, 0.9);
}

.referrals-page .ref-customize-code {
  margin-top: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
  position: relative;
}

.referrals-page .ref-customize-summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 0.95rem 2.75rem 0.95rem 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  user-select: none;
  transition: background 0.12s ease;
}

.referrals-page .ref-customize-summary::-webkit-details-marker {
  display: none;
}

.referrals-page .ref-customize-summary::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  margin-top: -0.35rem;
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid rgba(180, 190, 215, 0.6);
  border-bottom: 2px solid rgba(180, 190, 215, 0.6);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.referrals-page .ref-customize-code[open] .ref-customize-summary::after {
  transform: rotate(45deg);
  margin-top: -0.2rem;
}

.referrals-page .ref-customize-summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.referrals-page .ref-customize-summary-main {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e8ecf5;
}

.referrals-page .ref-customize-summary-sub {
  font-size: 0.78rem;
  color: rgba(150, 160, 185, 0.95);
}

.referrals-page .ref-customize-body {
  padding: 0 1.1rem 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.referrals-page .ref-field-label--quiet {
  color: rgba(180, 190, 215, 0.95);
  font-size: 0.82rem;
}

.referrals-page .ref-earnings-panel {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(22, 26, 34, 0.5), rgba(12, 12, 14, 0.7));
}

.referrals-page .ref-referees-panel {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.referrals-page .ref-referees-pagination {
  margin-top: 0.85rem;
}

.referrals-page .ref-referees-pagination[hidden] {
  display: none !important;
}

.referrals-page .ref-referees-pagination-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.referrals-page .ref-referees-page-meta {
  font-size: 0.82rem;
  color: var(--text-secondary, #9ca3af);
  text-align: center;
  flex: 1 1 auto;
}

.referrals-page .ref-referees-page-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

.ref-wallet-chains-panel > h2 {
  margin: 0 0 0.5rem;
}

.referrals-page .ref-wallet-rows {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
}

.referrals-page .ref-wallet-chain-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  padding: 0.5rem 0.6rem;
}

.referrals-page .ref-wallet-chain-label {
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 0.78rem;
  color: rgba(180, 190, 215, 0.95);
  min-width: 4.25rem;
}

.referrals-page .ref-wallet-value {
  flex: 1 1 140px;
  min-width: 0;
}

.referrals-page .ref-wallet-not-linked {
  font-size: 0.78rem;
  color: rgba(150, 160, 185, 0.88);
}

.referrals-page .ref-wallet-addr {
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', 'Courier New', monospace;
  font-size: 0.78rem;
  word-break: break-all;
}

.referrals-page .ref-wallet-chain-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
}

.referrals-page .ref-wallet-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(243, 186, 47, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: #e8c047;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.referrals-page .ref-wallet-action:hover {
  background: rgba(232, 192, 71, 0.12);
  border-color: rgba(232, 192, 71, 0.52);
  color: #f0d36a;
}

.referrals-page .ref-wallet-action:focus-visible {
  outline: 2px solid rgba(232, 192, 71, 0.5);
  outline-offset: 2px;
}

.referrals-page .ref-wallet-save-row {
  margin-top: 0.15rem;
}

.referrals-page .ref-wallet-save-hint {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.referrals-page .ref-wallet-sync-btn:disabled {
  opacity: 0.88;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(180, 190, 215, 0.88);
  background: rgba(255, 255, 255, 0.04);
}

.referrals-page .ref-wallet-sync-btn--saved:disabled {
  border-color: rgba(232, 192, 71, 0.32);
  color: rgba(232, 192, 71, 0.88);
  background: rgba(232, 192, 71, 0.06);
}

.referrals-page .ref-wallet-sync-btn--idle:disabled {
  opacity: 0.75;
}

.ref-program-panel .ref-field-group--first-code {
  margin-bottom: 0;
}

.ref-program-panel .ref-field-group--first-code .referrals-hint {
  margin-top: 0.45rem;
  margin-bottom: 0;
}

.ref-program-panel .ref-link-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.ref-program-panel .ref-link-copy-row .ref-url-trough {
  /* Override legacy .ref-url-trough width:100% + break-all (was collapsing to 1ch in flex) */
  display: block;
  width: auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0.72rem 0.85rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Fused outline buttons — match Sync (referrals-btn-outline + referrals-page gold tokens) */
.ref-program-panel .ref-link-copy-row .ref-copy-inline-btn.referrals-btn-outline {
  margin: 0;
  border-radius: 0 9px 9px 0;
  border-left: 1px solid rgba(0, 0, 0, 0.45);
  padding: 0.55rem 0.95rem;
  font-weight: 600;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  align-self: stretch;
}

.ref-program-panel .ref-copy-inline-btn i {
  font-size: 0.92rem;
  opacity: 0.9;
}

.ref-program-panel .ref-copy-inline-label--full {
  display: none;
}

@media (min-width: 400px) {
  .ref-program-panel .ref-copy-inline-label--short {
    display: none;
  }

  .ref-program-panel .ref-copy-inline-label--full {
    display: inline;
  }
}

@media (max-width: 520px) {
  .ref-program-panel .ref-link-copy-row {
    grid-template-columns: 1fr;
  }

  .ref-program-panel .ref-link-copy-row .ref-url-trough {
    border-radius: 0;
  }

  .ref-program-panel .ref-link-copy-row .ref-copy-inline-btn.referrals-btn-outline {
    border-radius: 0 0 9px 9px;
    border-left: none;
    border-top: 1px solid rgba(0, 0, 0, 0.45);
    justify-content: center;
    width: 100%;
  }
}

.ref-program-panel .ref-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0;
}

.ref-program-panel .ref-stat-card {
  position: relative;
  padding: 0.85rem 1rem;
  padding-right: 1.75rem;
  border-radius: 8px;
  background: #0c0c0e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

.ref-program-panel .ref-stat-value {
  display: block;
  font-size: 1.28rem;
  font-weight: 700;
  color: #f2f2f2;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.ref-program-panel .ref-stat-label {
  display: block;
  margin-top: 0.28rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.ref-program-panel .ref-stat-help {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 1.15rem;
  height: 1.15rem;
  line-height: 1.1rem;
  text-align: center;
  font-size: 0.65rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.4);
  cursor: help;
}

.ref-program-panel .ref-field-group {
  margin-bottom: 1.35rem;
}

.ref-program-panel .ref-link-block {
  margin-bottom: 2rem;
}

.ref-program-panel .ref-field-label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: #f5f5f5;
  margin-bottom: 0.55rem;
  letter-spacing: 0.01em;
}

.ref-program-panel .ref-change-input-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.ref-program-panel .ref-change-input {
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0.78rem 1rem;
  color: #f0f0f0;
  font-size: 0.93rem;
}

.ref-program-panel .ref-change-input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.ref-program-panel .ref-change-input:focus {
  outline: none;
}

.ref-program-panel .ref-change-input-shell .ref-change-save-btn.referrals-btn-outline {
  margin: 0;
  border-radius: 0 9px 9px 0;
  border-left: 1px solid rgba(0, 0, 0, 0.45);
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 0.84rem;
  align-self: stretch;
}

.ref-program-panel .ref-change-save-btn.referrals-btn-outline:focus-visible {
  outline: 2px solid rgba(243, 186, 47, 0.55);
  outline-offset: -2px;
  z-index: 1;
}

.ref-program-panel .ref-link-copy-row .ref-copy-inline-btn.referrals-btn-outline:focus-visible {
  outline-offset: 2px;
  position: relative;
  z-index: 1;
}

.ref-program-panel .ref-change-group {
  margin-bottom: 0.25rem;
}

.ref-program-panel .ref-change-hint {
  margin-top: 0.55rem;
  color: rgba(255, 255, 255, 0.38);
}

@media (max-width: 520px) {
  .ref-program-panel .ref-change-input-shell {
    grid-template-columns: 1fr;
  }

  .ref-program-panel .ref-change-input-shell .ref-change-save-btn.referrals-btn-outline {
    border-left: none;
    border-top: 1px solid rgba(0, 0, 0, 0.45);
    border-radius: 0 0 9px 9px;
    width: 100%;
    padding: 0.6rem 1rem;
  }
}

/* Legacy shared classes (other pages / older markup) */
.ref-field-group {
  margin-bottom: 1.25rem;
}

.ref-url-trough {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-color);
  word-break: break-all;
  line-height: 1.35;
}

.ref-change-input-shell {
  position: relative;
  display: flex;
  align-items: stretch;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.ref-change-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  font-size: 0.95rem;
}

.ref-change-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.ref-change-input:focus {
  outline: none;
}

.ref-change-save-btn {
  flex-shrink: 0;
  margin: 4px;
  padding: 0 1rem;
  border-radius: 8px;
  border: 1px solid #f3ba2f;
  background: transparent;
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  align-self: center;
}

.ref-change-save-btn:hover {
  background: rgba(243, 186, 47, 0.12);
}

.ref-change-hint {
  margin-top: 0.5rem;
}

/* Legacy / alias codes — compact chips inside “Customize referral code” */
.ref-legacy-wrap--compact {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ref-legacy-wrap--compact .ref-legacy-title {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.ref-legacy-wrap--compact .ref-legacy-hint {
  margin: 0 0 0.45rem;
  font-size: 0.7rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.42);
}

.ref-legacy-list--compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ref-legacy-list--compact li {
  margin: 0;
  padding: 0;
}

.ref-legacy-list--compact li code {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
}

.profile-stub-card .profile-stub-lead {
  margin: 0 0 0.75rem;
}

.profile-stub-card .profile-stub-lead:last-child {
  margin-bottom: 0;
}

.profile-stub-card .profile-stub-link {
  color: var(--secondary-color, #4ecdc4);
  text-decoration: none;
  font-weight: 500;
}

.profile-stub-card .profile-stub-link:hover {
  text-decoration: underline;
}

/* Support page */
.support-page .support-panel-text {
  margin: 0 0 0.75rem;
}

.support-page .referrals-panel .support-panel-text:last-child {
  margin-bottom: 0;
}

.support-inline-link {
  color: var(--secondary-color, #4ecdc4);
  text-decoration: none;
  font-weight: 500;
}

.support-inline-link:hover {
  text-decoration: underline;
}

.support-page .support-channel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.support-page .support-channel-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-color) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.support-page .support-channel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text-color) !important;
}

.support-page .support-channel-btn:focus-visible {
  outline: 2px solid rgba(243, 186, 47, 0.45);
  outline-offset: 2px;
}

.support-page .support-channel-btn i {
  font-size: 1.15rem;
}

.support-page .support-list {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.5;
}

.support-page .support-list li {
  margin-bottom: 0.55rem;
}

.support-page .support-list li:last-child {
  margin-bottom: 0;
}

.profile-page-content .referrals-panel {
  background: var(--bg-card, #1e1e1e);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.profile-page-content .referrals-panel h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  color: var(--text-color);
  font-weight: 600;
}

.profile-page-content .referrals-panel-lead {
  margin: 0;
}

.profile-page-content .referrals-muted {
  color: var(--text-secondary, #aaa);
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0 0 0.75rem;
}

.profile-page-content .referrals-hint {
  font-size: 0.8rem;
  color: var(--text-secondary, #999);
  margin: 0.5rem 0 0;
}

.profile-page-content .referrals-link-box {
  margin-top: 0.75rem;
  word-break: break-all;
}

.profile-page-content .referrals-link-box a {
  color: var(--secondary, #4ecdc4);
  text-decoration: none;
}

.profile-page-content .referrals-link-box a:hover {
  opacity: 0.92;
}

.profile-page-content .referrals-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.profile-page-content .referrals-input {
  flex: 1;
  min-width: 140px;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-color);
  font-size: 0.95rem;
  font-family: inherit;
}

.profile-page-content .referrals-input:focus {
  outline: none;
  border-color: rgba(243, 186, 47, 0.4);
}

.profile-page-content .referrals-btn-primary {
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: var(--primary, #0984e3);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  transition: filter 0.2s ease;
}

.profile-page-content .referrals-btn-primary:hover {
  filter: brightness(1.08);
}

.profile-page-content .referrals-btn-outline {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  background: transparent;
  color: var(--text-color);
  font-size: 0.875rem;
  font-family: inherit;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.profile-page-content .referrals-btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
}

.profile-page-content .referrals-pre {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-color);
  font-size: 0.78rem;
  line-height: 1.4;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Public /referrals earnings blocks (USD stats + expandable token table) */
.profile-page-content .ref-earnings-host {
  min-height: 0;
}

.profile-page-content .ref-earnings-surface {
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-color);
}

.profile-page-content .ref-earnings-surface--muted {
  background: rgba(0, 0, 0, 0.22);
}

.profile-page-content .ref-earnings-surface--stack {
  margin-bottom: 0.75rem;
}

.profile-page-content .ref-earnings-surface--stack:last-child {
  margin-bottom: 0;
}

.profile-page-content .ref-earnings-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.profile-page-content .ref-earnings-chip {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

.profile-page-content .ref-earnings-chip--period {
  background: rgba(120, 160, 255, 0.15);
  border-color: rgba(120, 160, 255, 0.28);
}

.profile-page-content .ref-earnings-chip--soft {
  font-weight: 500;
  opacity: 0.88;
}

.profile-page-content .ref-earnings-stat-block {
  margin-bottom: 0.35rem;
}

.profile-page-content .ref-earnings-stat-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary, #aaa);
  margin-bottom: 0.25rem;
}

.profile-page-content .ref-earnings-stat-value {
  display: block;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.15;
  color: #f2f2f2;
}

.profile-page-content .ref-earnings-stat-value--success {
  color: #7dcea0;
}

.profile-page-content .ref-earnings-stat-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-secondary, #888);
  line-height: 1.35;
}

.profile-page-content .ref-earnings-empty {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary, #999);
  line-height: 1.45;
}

.profile-page-content .ref-earnings-details {
  margin-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 0.5rem;
}

.profile-page-content .ref-earnings-details + .ref-earnings-details {
  margin-top: 0.45rem;
}

.profile-page-content .ref-earnings-by-user .ref-earnings-details + .ref-earnings-details {
  margin-top: 0;
}

.profile-page-content .ref-earnings-details--nested {
  margin-top: 0.5rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-page-content .ref-earnings-by-user {
  margin-top: 0.65rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.12);
}

.profile-page-content .ref-earnings-by-user-head {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr) minmax(4rem, max-content) minmax(4.85rem, max-content);
  column-gap: 0.85rem;
  row-gap: 0.35rem;
  align-items: center;
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary, #aaa);
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-page-content .ref-earnings-by-user-h-ref {
  justify-self: start;
  min-width: 0;
}

.profile-page-content .ref-earnings-by-user-h-chain {
  justify-self: end;
  text-align: right;
}

.profile-page-content .ref-earnings-by-user-h-usd {
  justify-self: end;
  text-align: right;
}

.profile-page-content .ref-earnings-by-user-head-spacer {
  width: 1.1rem;
}

.profile-page-content .ref-earnings-details.ref-earnings-details--user-row {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-page-content .ref-earnings-details.ref-earnings-details--user-row:last-child {
  border-bottom: none;
}

.profile-page-content .ref-earnings-user-summary {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr) minmax(4rem, max-content) minmax(4.85rem, max-content);
  grid-template-rows: auto;
  column-gap: 0.85rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  min-height: 2.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  list-style: none;
  border-radius: 0;
  cursor: pointer;
  user-select: none;
  color: #c8d4f0;
}

.profile-page-content .ref-earnings-user-summary::-webkit-details-marker {
  display: none;
}

.profile-page-content .ref-earnings-user-summary::marker {
  content: '';
}

.profile-page-content .ref-earnings-user-chevron {
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid rgba(200, 212, 240, 0.75);
  border-bottom: 2px solid rgba(200, 212, 240, 0.75);
  transform: rotate(-45deg) translateY(-1px);
  transition: transform 0.15s ease;
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-self: center;
}

.profile-page-content .ref-earnings-details--user-row[open] .ref-earnings-user-chevron {
  transform: rotate(45deg) translateY(2px);
}

.profile-page-content .ref-earnings-user-summary .ref-earnings-user-ref {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  word-break: break-all;
}

.profile-page-content .ref-earnings-user-summary .ref-earnings-user-chain {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  text-align: right;
}

.profile-page-content .ref-earnings-user-summary .ref-earnings-user-usd {
  grid-column: 4;
  grid-row: 1;
  justify-self: end;
  text-align: right;
}

.profile-page-content .ref-earnings-user-panel {
  padding: 0 0.65rem 0.65rem;
  padding-left: calc(0.65rem + 1.1rem + 0.65rem);
  background: rgba(0, 0, 0, 0.1);
}

.profile-page-content .ref-earnings-user-panel .ref-earnings-table-wrap {
  margin-top: 0;
}

.profile-page-content .ref-earnings-user-static {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr) minmax(4rem, max-content) minmax(4.85rem, max-content);
  grid-template-rows: auto;
  column-gap: 0.85rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  min-height: 2.75rem;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.profile-page-content .ref-earnings-user-static:last-child {
  border-bottom: none;
}

.profile-page-content .ref-earnings-user-static .ref-earnings-by-user-head-spacer {
  grid-column: 1;
  grid-row: 1;
}

.profile-page-content .ref-earnings-user-static .ref-earnings-user-ref {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  word-break: break-all;
}

.profile-page-content .ref-earnings-user-static .ref-earnings-user-chain {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  text-align: right;
}

.profile-page-content .ref-earnings-user-static .ref-earnings-user-usd {
  grid-column: 4;
  grid-row: 1;
  justify-self: end;
  text-align: right;
}

@media (max-width: 480px) {
  .profile-page-content .ref-earnings-by-user-head {
    display: none;
  }

  .profile-page-content .ref-earnings-user-summary {
    grid-template-columns: 1.1rem 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 0.65rem;
    row-gap: 0.15rem;
    align-items: start;
  }

  .profile-page-content .ref-earnings-user-summary .ref-earnings-user-chevron {
    grid-row: 1 / span 2;
    align-self: center;
  }

  .profile-page-content .ref-earnings-user-summary .ref-earnings-user-ref {
    grid-column: 2;
    grid-row: 1;
  }

  .profile-page-content .ref-earnings-user-summary .ref-earnings-user-chain {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    text-align: left;
    font-size: 0.75rem;
    color: var(--text-secondary, #888);
  }

  .profile-page-content .ref-earnings-user-summary .ref-earnings-user-usd {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end;
    text-align: right;
  }

  .profile-page-content .ref-earnings-user-static {
    grid-template-columns: 1.1rem 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 0.65rem;
    row-gap: 0.15rem;
    align-items: start;
  }

  .profile-page-content .ref-earnings-user-static .ref-earnings-by-user-head-spacer {
    grid-row: 1 / span 2;
    align-self: center;
  }

  .profile-page-content .ref-earnings-user-static .ref-earnings-user-ref {
    grid-column: 2;
    grid-row: 1;
  }

  .profile-page-content .ref-earnings-user-static .ref-earnings-user-chain {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    text-align: left;
    font-size: 0.75rem;
    color: var(--text-secondary, #888);
  }

  .profile-page-content .ref-earnings-user-static .ref-earnings-user-usd {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end;
    text-align: right;
  }

  .profile-page-content .ref-earnings-user-panel {
    padding-left: 0.65rem;
  }
}

.profile-page-content .ref-earnings-ref-cell {
  vertical-align: top;
  min-width: 7rem;
}

.profile-page-content .ref-earnings-hint {
  font-size: 0.8rem;
  color: var(--text-secondary, #888);
}

.profile-page-content .ref-earnings-summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: #c8d4f0;
  list-style: none;
  padding: 0.35rem 0;
  user-select: none;
}

.profile-page-content .ref-earnings-summary::-webkit-details-marker {
  display: none;
}

.profile-page-content .ref-earnings-summary::before {
  content: '';
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-right: 0.45rem;
  border-right: 2px solid rgba(200, 212, 240, 0.75);
  border-bottom: 2px solid rgba(200, 212, 240, 0.75);
  transform: rotate(-45deg) translateY(-1px);
  transition: transform 0.15s ease;
}

.profile-page-content .ref-earnings-details[open] .ref-earnings-summary::before {
  transform: rotate(45deg) translateY(2px);
}

.profile-page-content .ref-earnings-table-wrap {
  margin-top: 0.65rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-page-content .ref-earnings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.profile-page-content .ref-earnings-table th,
.profile-page-content .ref-earnings-table td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-page-content .ref-earnings-table th {
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-secondary, #aaa);
  font-weight: 600;
}

.profile-page-content .ref-earnings-table th.num,
.profile-page-content .ref-earnings-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.profile-page-content .ref-earnings-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.profile-page-content .ref-earnings-table tbody tr:last-child td {
  border-bottom: none;
}

.profile-page-content .referrals-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-page-content .referrals-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.profile-page-content .referrals-table th,
.profile-page-content .referrals-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-page-content .referrals-table th {
  color: var(--text-secondary, #aaa);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.25);
}

.profile-page-content .referrals-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.profile-page-content .referrals-table-empty {
  color: var(--text-secondary, #888);
}

.profile-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  line-height: 1.4;
}

.profile-alert-body {
  flex: 1;
  min-width: 0;
}

.profile-alert-dismiss {
  flex-shrink: 0;
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 0 0 0.5rem;
  opacity: 0.75;
}

.profile-alert-dismiss:hover {
  opacity: 1;
}

.profile-alert-info {
  background: rgba(9, 132, 227, 0.12);
  border-color: rgba(9, 132, 227, 0.35);
  color: var(--text-color);
}

.profile-alert-success {
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.35);
  color: var(--text-color);
}

.profile-alert-warning {
  background: rgba(243, 156, 18, 0.12);
  border-color: rgba(243, 156, 18, 0.35);
  color: var(--text-color);
}

.profile-alert-danger {
  background: rgba(231, 76, 60, 0.12);
  border-color: rgba(231, 76, 60, 0.35);
  color: var(--text-color);
}

/* Referrals: alerts as fixed toasts so messages (e.g. copy) don’t shift layout */
.referrals-page #profile-alerts {
  position: fixed;
  top: calc(var(--top-bar-height, 64px) + 0.65rem + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: min(100vw - 1.5rem, 26rem);
  margin: 0;
  padding: 0;
  z-index: 10050;
  pointer-events: none;
  box-sizing: border-box;
}

.referrals-page #profile-alerts .profile-alert {
  pointer-events: auto;
  margin-bottom: 0;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Notification Bell */
.notification-bell-wrapper {
  position: relative;
}

/* Override generic [class*="-btn"] - bell must stay transparent with border only */
.user-account-info .notification-bell-btn,
.notification-bell-item .notification-bell-btn {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: var(--text-color);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1;
  transition: color 0.2s, border-color 0.2s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  text-align: center;
}

.user-account-info .notification-bell-btn:hover,
.notification-bell-item .notification-bell-btn:hover {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: var(--text-color);
  filter: none;
}

.notification-badge {
  display: none;
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.notification-bell-btn.has-unread .notification-badge {
  display: block;
}

/* Pulsating border and bell when unread */
.user-account-info .notification-bell-btn.has-unread,
.notification-bell-item .notification-bell-btn.has-unread {
  animation: notification-border-pulse 1.5s ease-in-out infinite;
}

.user-account-info .notification-bell-btn.has-unread,
.notification-bell-item .notification-bell-btn.has-unread {
  color: #e74c3c !important;
}

.user-account-info .notification-bell-btn.has-unread i,
.notification-bell-item .notification-bell-btn.has-unread i {
  animation: notification-bell-color 2s ease-in-out infinite;
}

@keyframes notification-border-pulse {
  0%, 100% {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
  }
  50% {
    border-color: rgba(231, 76, 60, 0.6) !important;
    box-shadow: 0 0 8px 2px rgba(231, 76, 60, 0.3);
  }
}

@keyframes notification-bell-color {
  0%, 100% { color: #ffffff !important; }
  50% { color: #e74c3c !important; }
}


.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  width: 320px;
  max-height: 400px;
  background: var(--card-bg, #222831);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 1100;
  display: none;
  overflow: hidden;
  flex-direction: column;
}

.notification-dropdown.is-open {
  display: flex;
}

.notification-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
  font-size: 0.95rem;
}

.notification-dropdown-header.no-notifications {
  border-bottom: none;
}

.notification-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px 0;
}

.notification-loading,
.notification-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.notification-dropdown-header.no-notifications + .notification-list .notification-empty {
  padding: 20px 16px;
}

/* Load more - mobile-friendly tap target (min 44px) */
.notification-load-more-wrap {
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.notification-load-more-btn {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.notification-load-more-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-color);
}

.notification-load-more-btn:active {
  background: rgba(255, 255, 255, 0.15);
}

.notification-load-more-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.notification-load-more-btn.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: notification-load-spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes notification-load-spin {
  to { transform: rotate(360deg); }
}

.notification-dropdown-footer {
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.notification-mark-all-btn {
  background: none;
  border: none;
  color: var(--primary, #4c6ef5);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 0;
  border-radius: 4px;
  width: 100%;
  text-align: center;
}

.notification-mark-all-btn:hover {
  background: rgba(76, 110, 245, 0.1);
}

.notification-item {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
  background: rgba(76, 110, 245, 0.08);
}

.notification-item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.notification-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  flex: 1;
  min-width: 0;
}

.notification-item-new-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.notification-item-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.notification-item-link {
  font-size: 0.8rem;
  color: var(--primary, #4c6ef5);
  text-decoration: none;
  font-weight: 500;
}

.notification-item-link:hover {
  text-decoration: underline;
}

.notification-item-time {
  font-size: 0.75rem;
  color: var(--text-gray);
  margin-top: 4px;
}

/* Notification detail popup */
.notification-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 20px;
}

.notification-popup-overlay.is-open {
  display: flex;
}

.notification-popup {
  background: var(--card-bg, #222831);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.notification-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notification-popup-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  padding-right: 30px;
}

.notification-popup-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  margin: -4px -4px 0 0;
}

.notification-popup-close:hover {
  color: var(--text-color);
}

.notification-popup-body {
  padding: 20px;
  overflow-y: auto;
  max-height: 50vh;
}

.notification-popup-message {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.notification-popup-details {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
}

.notification-popup-details p {
  margin: 0 0 8px 0;
}

.notification-popup-gift-message {
  font-weight: 500;
  color: var(--text-color);
}

.notification-popup-link {
  display: inline-block;
  color: var(--primary, #4c6ef5);
  font-weight: 500;
  text-decoration: none;
}

.notification-popup-link:hover {
  text-decoration: underline;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8));
  background-size: cover;
  background-position: center;
  color: var(--text-color);
  text-align: center;
  padding: 4rem 0;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--text-color);
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #2980b9;
}

/* Giftcard link - hidden by default, shown only on mobile */
.giftcard-link-mobile {
  display: none;
  margin-top: 1.5rem;
  margin-bottom: -1rem;
  color: #4ecdc4;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  opacity: 0.9;
  width: 100%;
  text-align: center;
}

.giftcard-link-mobile:hover {
  opacity: 1;
  text-decoration: underline;
  color: var(--primary);
}

.giftcard-link-mobile i {
  margin-right: 0.35rem;
  font-size: 0.9rem;
}

/* Sections */
section {
  padding: 3rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--text-color);
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--secondary-color);
}

/* Section Tabs - Merge with existing but keep new styles */
.section-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid #444; /* Keep container border */
}

.section-tab {
  padding: 10px 20px;
  margin: 0 5px;
  cursor: pointer;
  border-bottom: none; /* Remove bottom border from buttons */
  transition: all 0.3s;
  font-weight: 500;
  color: var(--text-secondary);
}

.section-tab:hover {
  background-color: rgba(255, 255, 255, 0.1); /* Consistent hover state */
  color: var(--text-color);
}

.section-tab.active {
  color: var(--text-color);
  background-color: var(--primary);
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Card styles - merging but keeping new elements */
.card-image {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

/* REMOVED: Hardcoded token tags */
/*
.xrp-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--xrp-color);
  color: white;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.csc-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--csc-color);
  color: white;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
*/

.card-inner {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 220px;
}

.card-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.card-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 44px; /* Increased height to prevent letter cutoff */
  line-height: 1.4; /* Better line spacing for readability */
  margin-bottom: 15px;
}

.card-price {
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

/* Footer - updated styles for simplified footer */
.site-footer {
  background-color: var(--dark-color);
  color: var(--text-color);
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-footer p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
}

.footer-links a:hover {
  color: var(--text-color);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.twitter-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Responsive adjustments for footer */
@media (max-width: 768px) {
  .site-footer .footer-content {
    gap: 1rem;
  }
  
  .footer-links {
    gap: 1.5rem;
    flex-direction: column;
  }
  
  .footer-links a {
    font-size: 0.85rem;
  }
}

/* Wallet modal */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  background-color: var(--dark-color);
  margin: 10% auto;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  color: var(--text-color);
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 25px;
  color: var(--text-secondary);
  cursor: pointer;
}

.close-modal:hover {
  color: var(--text-color);
}

.wallet-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.wallet-button {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 8px;
  background-color: #2a2a3a;
  border: 1px solid #444;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text-color);
}

.wallet-button:hover {
  background-color: #333344;
  border-color: #555;
}

.wallet-button img {
  width: 30px;
  height: 30px;
  margin-right: 15px;
}

.wallet-button.xaman {
  background-color: #162531;
  border-color: #1f364a;
}

.wallet-button.xaman:hover {
  background-color: #203547;
}

/* Responsive design */
@media (max-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .hero {
    padding: 2rem 0;
  }
  
  .hero-modern {
    padding: 2rem 0;
  }
  
  .hero-title-gradient {
    font-size: 2rem;
    flex-direction: column;
    gap: 0.25rem;
  }
  
  /* Show giftcard link on mobile/tablet when hamburger menu is active */
  .giftcard-link-mobile {
    display: block;
  }
  
  .hero-title-gradient i {
    font-size: 1.5rem;
  }
  
  .hero-description-modern {
    font-size: 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section-title h2 {
    font-size: 1.5rem;
  }

  /* Mobile: Hide desktop elements, show mobile elements */
  .desktop-only {
    display: none !important;
  }
  
  .mobile-only {
    display: flex !important;
  }
  
  .sidebar-nav .main-nav ul li.mobile-only {
    display: flex !important;
  }
  
  /* Must come after mobile-only: hide account when user not logged in */
  .sidebar-nav .main-nav ul li.user-account-item.user-account-hidden,
  .sidebar-nav .main-nav ul li.header-connect-wallet-item.connect-wallet-hidden {
    display: none !important;
  }

  /* Mobile: fixed top bar (sticky breaks when sidebar sets body overflow:hidden) */
  header.top-bar {
    position: fixed;
    top: env(safe-area-inset-top, 0px);
    left: 0;
    right: 0;
    width: 100%;
    z-index: 250; /* Above .sidebar-nav (200) — logo stays visible when menu is open */
  }

  .top-bar-inner {
    padding: 0 0.65rem;
    gap: 0.5rem;
  }

  .top-bar-inner .logo {
    min-width: 0;
    flex: 1 1 auto;
  }

  .top-bar-inner .logo img {
    height: 34px;
  }

  .top-bar-actions {
    gap: 0.45rem;
    flex-shrink: 0;
  }

  .top-bar-actions .notification-bell-item .notification-bell-btn,
  .top-bar-actions .header-profile-menu-trigger {
    padding: 5px 10px;
  }
  
  /* Mobile: Sidebar slides in from left, below the header - height stops above bottom nav */
  .sidebar-nav {
    width: 280px;
    top: calc(var(--top-bar-height) + env(safe-area-inset-top, 0px));
    height: calc(100vh - var(--top-bar-height) - 80px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar-nav.active {
    transform: translateX(0);
  }
  
  .sidebar-nav .sidebar-collapse-btn {
    display: none; /* Hide collapse on mobile - use Menu button */
  }
  
  /* Mobile: Account at bottom of sidebar - padding ensures it stays above bottom nav + browser chrome */
  .sidebar-nav .main-nav ul {
    min-height: 100%;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  
  .sidebar-nav .main-nav ul li.user-account-item.mobile-only {
    margin-top: auto !important;
    border-top: 2px solid rgba(255, 255, 255, 0.2) !important;
  }
  
  .sidebar-nav .user-account-info {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 1rem 1.5rem;
  }
  
  .sidebar-nav .account-address {
    font-size: 0.85rem;
    padding: 6px 10px;
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    word-break: break-all;
    border-radius: 4px;
  }
  
  .sidebar-nav .user-account-info .logout-btn {
    width: 100%;
    justify-content: center;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
  }
  
  /* Mobile: Bottom navigation bar
     z-index above scratch-card layers (.payment-required-overlay 100, .loading-indicator 110,
     .win-notification-overlay 200) but below .verification-modal (1000) and notifications (1100+) */
  .bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--dark-color);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 900;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
  }
  
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 48px;
    min-height: 48px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    border: none;
    background: none;
    cursor: pointer;
    transition: color 0.2s;
  }
  
  .bottom-nav-item i {
    font-size: 1.25rem;
  }
  
  .bottom-nav-item:hover,
  .bottom-nav-item:focus,
  .bottom-nav-item.active {
    color: var(--secondary-color);
  }

  #bottom-nav a.bottom-nav-item.active,
  #bottom-nav a.bottom-nav-item.active i,
  #bottom-nav a.bottom-nav-item.active span {
    color: var(--secondary-color) !important;
  }
  
  .bottom-nav-item--center {
    /* Optional: center item emphasis */
  }
  
  .bottom-nav-item--menu {
    position: relative;
  }
  
  .bottom-nav-notification-badge {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translate(50%, -50%);
    margin-right: -12px;
    width: 14px;
    height: 14px;
    background: #e74c3c;
    border-radius: 50%;
    border: 2px solid var(--dark-color);
    display: none;
  }
  
  .bottom-nav-notification-badge.has-unread {
    display: block;
  }
  
  /* Mobile: Notification dropdown centered */
  #notification-dropdown {
    width: calc(100vw - 32px) !important;
    max-width: 320px !important;
    /* Position set by JS to align with bell button */
  }
  
  /* Mobile overlay - starts below header so logo stays visible */
  .mobile-nav-overlay {
    position: fixed;
    top: calc(var(--top-bar-height) + env(safe-area-inset-top, 0px));
    left: 0;
    width: 100%;
    height: calc(100vh - var(--top-bar-height) - env(safe-area-inset-top, 0px));
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

/* Smaller iPhone screens (iPhone SE, iPhone mini, etc.) */
@media (max-width: 480px) {
  .main-nav ul {
    padding: 60px 0 0 0; /* Reduced top padding for smaller screens */
    min-height: 100vh;
    height: auto; /* Allow natural height instead of forcing 100% */
  }
  
  .user-account-item {
    margin-top: 0 !important; /* Remove auto margin that pushes it down */
    margin-bottom: 0 !important;
  }
  
  .user-account-info {
    padding: 0.75rem 1rem;
    gap: 4px;
  }
  
  .account-address {
    font-size: 0.8rem;
    padding: 5px 8px;
  }
  
  .user-account-info .logout-btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
  }
  
  /* Ensure mobile-tabs stay compact on smallest screens */
  .mobile-tabs {
    gap: 0.15rem !important;
    padding: 0 0.15rem 1rem 0.15rem !important;
  }
  
  .mobile-tabs .section-tab {
    padding: 0.5rem 0.65rem !important;
    font-size: 0.85rem !important;
  }
  
  .mobile-tabs .clear-filter-btn {
    width: 1.75rem !important;
    height: 1.75rem !important;
    font-size: 0.7rem !important;
    margin-right: 0.2rem !important;
  }
}

/* Desktop/Mobile tab visibility */
.mobile-tabs {
  display: none;
}

.desktop-tabs {
  display: flex;
}

/* Section tabs mobile improvements - tablets and below */
@media (max-width: 768px) {
  .desktop-tabs {
    display: none;
  }
  
  .mobile-tabs {
    display: flex;
    padding: 0 0.15rem 1rem 0.15rem;
    margin-left: -15px;
    margin-right: -15px;
    margin-bottom: 2rem;
    border-bottom: 1px solid #444;
    justify-content: flex-start;
    align-items: center;
    gap: 0.15rem;
  }
  
  .mobile-tabs .section-tab {
    padding: 0.5rem 0.65rem;
    font-size: 0.85rem;
    white-space: nowrap;
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s;
  }
  
  .mobile-tabs .section-tab:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .mobile-tabs .section-tab.active {
    background-color: var(--primary);
    color: white;
  }
  
  /* Clear filter button - smaller and more compact like Netflix */
  .mobile-tabs .clear-filter-btn {
    padding: 0 !important;
    font-size: 0.7rem;
    min-width: auto;
    border-radius: 50%;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(128, 128, 128, 0.3) !important;
    margin-right: 0.2rem;
  }
  
  .mobile-tabs .clear-filter-btn:hover {
    background-color: rgba(128, 128, 128, 0.5) !important;
  }
  
  /* Dropdown styles */
  .section-tab-dropdown {
    position: relative;
  }
  
  .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
  }
  
  .dropdown-toggle i {
    font-size: 0.8rem;
    transition: transform 0.3s;
  }
  
  .dropdown-toggle.active i {
    transform: rotate(180deg);
  }
  
  /* Style dropdown toggle when active (selected token) - multiple selectors for maximum coverage */
  .mobile-tabs .section-tab.dropdown-toggle.active,
  .mobile-tabs .dropdown-toggle.active,
  .section-tab.dropdown-toggle.active,
  .dropdown-toggle.active {
    background-color: #4c6ef5 !important;
    color: white !important;
  }
  
  /* Additional backup rule with hard-coded color */
  [class*="dropdown-toggle"][class*="active"] {
    background-color: #4c6ef5 !important;
    color: white !important;
  }
  
  .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 120px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  
  .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .dropdown-item:last-child {
    border-bottom: none;
  }
  
  .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 576px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .hero {
    padding: 2rem 0;
  }
  
  .hero-modern {
    padding: 2rem 0;
  }
  
  .hero-title-gradient {
    font-size: 1.75rem;
  }
  
  .section-tabs {
    flex-wrap: wrap;
    gap: 0.15rem;
    justify-content: center;
    padding: 0 0.15rem 1rem 0.15rem;
  }
  
  .section-tab {
    flex: 0 1 auto;
    min-width: auto;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.5rem 0.65rem;
  }
  
  /* Mobile optimizations for card content */
  .card-inner {
    height: 230px;
    padding: 1.25rem;
  }

  .cards-grid .card-prize-badges-float {
    top: 0.3rem;
    right: 0.35rem;
  }
  
  .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
  }
  
  .jackpot-label {
    font-size: 0.65rem;
  }
  
  .jackpot-value {
    font-size: 1.2rem;
  }
  
  .card-jackpot {
    margin: 0.2rem 0 1.5rem 0;
  }
  
  .entry-row {
    gap: 0.3rem;
  }
  
  .entry-label {
    font-size: 0.8rem;
  }
  
  .entry-row [class*="-price"] {
    font-size: 0.9rem !important;
  }
  
  .main-page .play-btn,
  .main-page .cards-grid .play-btn {
    height: 44px;
    font-size: 0.95rem;
    border-radius: 10px;
  }
  
  /* Ensure mobile-tabs stay compact on smaller screens too */
  .mobile-tabs {
    gap: 0.15rem !important;
    padding: 0 0.15rem 1rem 0.15rem !important;
  }
  
  .mobile-tabs .section-tab {
    padding: 0.5rem 0.65rem !important;
    font-size: 0.85rem !important;
  }
  
  .mobile-tabs .clear-filter-btn {
    width: 1.75rem !important;
    height: 1.75rem !important;
    font-size: 0.7rem !important;
    margin-right: 0.2rem !important;
  }
  
  header .container {
    flex-wrap: nowrap;
  }
  
  .logo {
    margin-bottom: 0;
  }
  
  .main-nav {
    width: 100%;
  }
}

/* Win animation */
@keyframes winPulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* Token-specific buttons */
/* 
.xrp-btn {
  background-color: var(--xrp-color);
}

.xrp-btn:hover {
  background-color: #0077aa;
}

.csc-btn {
  background-color: var(--csc-color);
}

.csc-btn:hover {
  background-color: #7b2cbf;
}
*/

.free {
  font-weight: 600;
  color: var(--success-color);
  margin-bottom: 0.8rem;
  text-align: center;
}

/* Index page specific card styles */
.cards-grid .card {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
  /* Override any token-specific left borders */
  border-left: none !important;
}

.cards-grid .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  background: var(--card-hover);
}

.cards-grid .card-inner {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 220px;
  position: relative;
}

/* +NFT/+PROMO: top corner of the text block — high enough that the title doesn’t share a line or get side-cropped */
.cards-grid .card-prize-badges-float {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  z-index: 2;
  pointer-events: none;
  line-height: 1;
}

.cards-grid .card-prize-badges-float .card-prize-badges {
  position: static;
  top: auto;
  right: auto;
  transform: none;
  pointer-events: auto;
}

.cards-grid .card-title {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
  color: var(--text-color);
  text-align: center;
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
}

.cards-grid .card-jackpot {
  text-align: center;
  margin: 0.25rem 0 2rem 0;
  animation: jackpot-pulse 10s ease-in-out infinite;
  animation-delay: calc(var(--card-index, 0) * 0.5s);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.cards-grid .jackpot-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  opacity: 0.65;
  letter-spacing: 1px;
  font-weight: 600;
  text-transform: uppercase;
}

.cards-grid .jackpot-value {
  font-size: 1.4rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.1;
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.25),
    0 0 20px rgba(255, 255, 255, 0.15),
    0 0 30px rgba(255, 255, 255, 0.08);
}

.cards-grid .card-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 44px; /* Increased height to prevent letter cutoff */
  line-height: 1.4; /* Better line spacing for readability */
  margin-bottom: 15px; /* Keep original spacing */
}

.cards-grid .card-price {
  display: flex;
  flex-direction: column;
  margin-top: 15px; /* Fixed spacing from description */
  margin-bottom: 0px; /* Equal spacing before button */
}

.cards-grid .entry-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.cards-grid .entry-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  opacity: 0.7;
  font-weight: 500;
  display: inline-block;
  margin: 0;
}

.main-page .cards-grid .card-price .entry-row .xrp-price,
.main-page .cards-grid .card-price .entry-row .csc-price,
.main-page .cards-grid .card-price .entry-row [class*="-price"] {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  display: inline !important;
  margin-bottom: 0 !important;
  text-align: left !important;
  color: var(--text-color) !important;
}

.cards-grid .xrp-price,
.cards-grid .csc-price,
.cards-grid .free {
  font-weight: 600;
  margin-bottom: 0.8rem;
  text-align: center;
}

/* REMOVED: Hardcoded token price colors */
/*
.cards-grid .xrp-price {
  color: var(--xrp-color);
}

.cards-grid .csc-price {
  color: var(--csc-color);
}
*/

/* Default grid button styles - token-specific styles should override these */
.cards-grid .play-btn {
  /* Same as .play-btn but scoped to grid */
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
  width: 100%;
  text-align: center;
  display: inline-block;
  text-decoration: none;
}

/* Premium dark button style for main page cards grid */
.main-page .cards-grid .play-btn {
  height: 46px;
  width: 100%;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: linear-gradient(180deg, #1b2431 0%, #131b26 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.95);
  
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.18s ease,
              filter 0.18s ease;
}

.main-page .cards-grid .card:hover .play-btn {
  transform: translateY(-2px);
  border-color: rgba(230, 201, 122, 0.25); /* soft champagne */
  filter: brightness(1.06);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.main-page .cards-grid .card:active .play-btn {
  transform: translateY(0px);
  filter: brightness(0.98);
}

/* REMOVED: Hardcoded hover styles */
/*
.cards-grid .play-btn:hover {
  background-color: #2980b9;
}

.cards-grid .csc-btn:hover {
  background-color: #7b2cbf;
}

.cards-grid .xrp-btn:hover {
  background-color: #0077aa;
}
*/

/* Dynamic token colors override */
.cards-grid .play-btn:hover {
  filter: brightness(1.1);
}

/* Dynamic token colors - These get populated by the server dynamically */
:root {
  /* Default gray fallback colors - backend colors will override these */
  --token-default: #6c757d;  /* Gray default for all tokens */
  --xrp-color: #6c757d; 
  --csc-color: #6c757d;
  /* Other tokens will be added here dynamically */
}

/* Token styling system - applied to all tokens dynamically */

/* Token-colored tags/badges (exclude grid-type-tag) */
[class*="-tag"]:not(.grid-type-tag) {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--token-default);
  color: white;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Token-colored prices */
[class*="-price"] {
  font-weight: 600;
  color: var(--token-default);
  margin-bottom: 0.8rem;
  text-align: center;
}

/* Token-colored buttons */
[class*="-btn"] {
  background-color: var(--token-default);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
  width: 100%;
  text-align: center;
  display: inline-block;
  text-decoration: none;
}

/* Universal hover for all token buttons */
[class*="-btn"]:hover {
  filter: brightness(1.1);
}

/* Class name includes "-btn" — beat generic rule above (same specificity, must come later) */
button.header-connect-wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-card, #1e1e1e);
  color: var(--text-color, #f0f0f0);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease,
    filter 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  width: auto;
  text-align: center;
  text-decoration: none;
}

button.header-connect-wallet-btn:hover {
  background: #2a2a2a;
  border-color: rgba(243, 186, 47, 0.35);
  color: #ffffff;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(243, 186, 47, 0.08);
  filter: none;
}

button.header-connect-wallet-btn:focus-visible {
  outline: 2px solid rgba(243, 186, 47, 0.45);
  outline-offset: 2px;
}

body.home-hub button.header-connect-wallet-btn:hover {
  border-color: rgba(230, 201, 122, 0.45);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(230, 201, 122, 0.1);
}

/* Token-colored card accents - REMOVED */
/* [data-token] {
  border-left: 3px solid var(--primary);
} */

/* Blockchain-specific tag styles - must override generic tag styling */
.xrpl-tag { background-color: #4c6ef5 !important; }
.solana-tag { background-color: #9945FF !important; }

/* Grid type tag - small tag at bottom-left of card image */
.grid-type-tag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Grid type colors matching blockchain */
.grid-type-tag.grid-type-xrpl {
  background-color: rgba(76, 110, 245, 0.85);
}

.grid-type-tag.grid-type-solana {
  background-color: rgba(153, 69, 255, 0.85);
}


.grid-2x2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 120px;
}

.grid-3x3 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 180px;
}

.grid-4x4 {
  grid-template-columns: repeat(4, 1fr);
  max-width: 240px;
}

.grid-5x5 {
  grid-template-columns: repeat(5, 1fr);
  max-width: 300px;
}

.grid-cell {
  width: 50px;
  height: 50px;
  background-color: var(--dark-color);
  border: 1px solid var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border-radius: 4px;
}

.grid-cell.winning {
  background-color: var(--success-color);
  color: white;
  animation: pulse 1.5s infinite;
}

.grid-cell.power-tile {
  background-color: var(--warning-color);
  color: white;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.fairness-box {
  background-color: rgba(58, 123, 213, 0.1);
  border: 1px solid rgba(58, 123, 213, 0.3);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.important-note {
  background-color: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-color);
}

.verification-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.verification-card {
  background-color: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}

.verification-icon {
  color: var(--success-color);
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.verification-card h3 {
  color: var(--text-color);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.verification-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* Odds information styling */
.odds-info {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: normal;
  opacity: 0.8;
}

.fairness-icon {
  color: var(--secondary-color);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.token-example {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: bold;
  margin: 0 4px;
}

.xrp-example { background-color: var(--xrp-color); }
.csc-example { background-color: var(--csc-color); }
.free-example { background-color: var(--success-color); }

.winning-patterns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.pattern-card {
  background-color: var(--dark-color);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
}

.pattern-title {
  color: var(--secondary-color);
  font-weight: bold;
  margin-bottom: 1rem;
}

.hash-demo {
  background-color: var(--dark-color);
  padding: 1rem;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.9rem;
  margin: 1rem 0;
  overflow-wrap: break-word;
}

.hash-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1rem 0;
  justify-content: center;
}

.hash-pair {
  background-color: var(--card-bg);
  padding: 8px;
  border-radius: 4px;
  text-align: center;
  min-width: 60px;
}

.hash-hex {
  font-family: monospace;
  color: var(--secondary-color);
  font-size: 0.8rem;
}

.hash-symbol {
  font-size: 1.2rem;
  margin-top: 4px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-card {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.cta-section {
  text-align: center;
  margin: 4rem 0;
  padding: 3rem 2rem;
  background-color: var(--card-bg);
  border-radius: 12px;
}

.cta-button {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

/* How It Works Page - Base Styles */
.how-it-works-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.how-it-works-toc {
  background-color: var(--card-bg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.how-it-works-toc-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 0.85rem 0;
  letter-spacing: 0.02em;
}

.how-it-works-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.35rem 1.25rem;
}

.how-it-works-toc-list li {
  margin: 0;
}

.how-it-works-toc-list a {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.45;
  display: inline-block;
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.how-it-works-toc-list a:hover {
  color: #5dade2;
  border-bottom-color: rgba(93, 173, 226, 0.45);
}

.step-title-plain {
  margin-bottom: 1.5rem;
}

.how-it-works-content > .step-section {
  scroll-margin-top: 5.5rem;
}

.getting-started-list {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
  line-height: 1.6;
}

.getting-started-list li {
  margin-bottom: 0.45rem;
}

.step-section {
  background-color: var(--card-bg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.step-title {
  display: flex;
  align-items: center;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 50px;
  background-color: var(--secondary-color);
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: 50%;
  margin-right: 1rem;
  flex-shrink: 0;
}

/* LuckyHash Points section – how it works */
.lhp-points-table-wrap {
  overflow-x: auto;
  margin: 1.25rem auto;
  width: fit-content;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lhp-points-table {
  width: auto;
  min-width: 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.lhp-points-table caption.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lhp-points-table th,
.lhp-points-table td {
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  color: var(--text-color);
}

.lhp-points-table thead th {
  background: rgba(232, 192, 71, 0.14);
  font-weight: 700;
  color: var(--text-color);
  border-bottom-color: rgba(232, 192, 71, 0.35);
}

.lhp-points-table thead th:last-child {
  text-align: right;
}

.lhp-points-table tbody th {
  font-weight: 600;
  white-space: nowrap;
  padding-right: 1.5rem;
}

.lhp-points-table tbody td {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
  color: #E8C047;
}

.lhp-points-table tbody tr:last-child th,
.lhp-points-table tbody tr:last-child td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.lhp-points-table tfoot th,
.lhp-points-table tfoot td {
  padding: 0.55rem 0.85rem;
  border-bottom: none;
  background: rgba(232, 192, 71, 0.1);
  font-weight: 700;
  font-size: 0.9rem;
}

.lhp-points-table tfoot td {
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #E8C047;
}


.lhp-points-footnote {
  font-size: 0.92rem;
  margin: 0 0 1.25rem 0;
  line-height: 1.55;
  color: var(--text-color);
  opacity: 0.85;
}

.grid-demo {
  display: grid;
  gap: 8px;
  margin: 1.5rem auto;
  justify-content: center;
}

/* How It Works Responsive Design */
@media (max-width: 768px) {
  .how-it-works-toc-list {
    grid-template-columns: 1fr;
  }

  .how-it-works-content {
    padding: 1rem;
  }
  
  .step-section {
    padding: 1.5rem;
  }
  
  .step-title {
    font-size: 1.3rem;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .step-number {
    margin-bottom: 0.5rem;
    margin-right: 0;
  }
  
  .winning-patterns {
    grid-template-columns: 1fr;
  }
  
  .grid-cell {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .grid-2x2 {
    max-width: 100px;
  }
  
  .grid-3x3 {
    max-width: 150px;
  }
  
  .grid-4x4 {
    max-width: 200px;
  }
  
  .grid-5x5 {
    max-width: 250px;
  }
}

/* ===================================
   MODERN HERO SECTION (SHARED)
   =================================== */

.hero-modern {
  background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8));
  background-size: cover;
  background-position: center;
  padding: 3rem 0 2rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* ===================================
   SHARED GAME SETUP COMPONENTS
   ===================================
   Reusable layout/visual primitives for the per-game pre-payment form. Each game
   (dice, plinko, coinflip, limbo, hexwheel, hilo, mines) reuses these so the
   inputs/labels/quick-bet buttons render identically rather than re-implementing
   the same widget under different prefixes. See pain note #24. */

/* Top row of every game form: amount input + Min/½/2x/Max + token select. */
.game-amount-row { display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: flex-end; flex-wrap: nowrap; }
.game-amount-row .game-amount-cell { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.game-amount-row .game-token-cell { flex: 0 0 120px; display: flex; flex-direction: column; gap: 0.6rem; }
.game-amount-row .game-amount-cell > label,
.game-amount-row .game-token-cell > label {
  display: block;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #ccc;
}
.game-amount-input-row { display: flex; align-items: center; gap: 0.5rem; width: 100%; }
.game-amount-row .game-amount-input-row input,
.game-amount-row .game-token-cell select {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #333;
  background: #0d0e14;
  color: #fff;
  font-size: 1rem;
  box-sizing: border-box;
}
.game-quick-bet { display: flex; gap: 0.25rem; flex-shrink: 0; }
.game-quick-bet-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.15s;
  white-space: nowrap;
}
.game-quick-bet-btn:hover { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.35); transform: translateY(-1px); }
@media (max-width: 600px) {
  .game-amount-row { flex-direction: column; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
  .game-amount-row .game-amount-cell { flex: none; width: 100%; align-items: center; }
  .game-amount-row .game-amount-cell > label { align-self: flex-start; }
  .game-amount-input-row { width: 100%; }
  .game-amount-row .game-token-cell { flex: none; width: 100%; }
}

/* Quantity row — 2-col layout for games that need >1 quantity selector (plinko:
   drops + balls per drop) and 1-col-with-empty-col2 for games with just one
   (hex wheel: spins). Labels sit above their cell's controls, left-aligned.
   Cells use default align-items (stretch) so child controls span the column
   and can self-centre their pills via their own justify-content. */
.game-quantity-row { display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: flex-start; }
.game-quantity-row .game-quantity-cell {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.game-quantity-row .game-quantity-cell > label {
  display: block;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #ccc;
  text-align: left;
}
@media (max-width: 600px) {
  .game-quantity-row { flex-direction: column; gap: 0.75rem; }
  .game-quantity-row .game-quantity-cell { width: 100%; }
}

/* Game-page hero standard. Capped height + vertical centering so every game hero
   is the same shape, with a consistent gap before the play area. Applied via the
   .hero-modern--game modifier so non-game pages (referrals, profile) keep
   their taller default hero. Hex wheel is the first adopter; coinflip / limbo /
   hilo / mines / dice / plinko / scratch get the class in follow-up commits. */
.hero-modern.hero-modern--game {
  min-height: 180px;
  max-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
}
.hero-modern.hero-modern--game .hero-details-modern {
  margin: 0 auto;
}
.hero-modern.hero-modern--game .hero-title-gradient {
  margin-bottom: 0.5rem;
}
.hero-modern.hero-modern--game .hero-description-modern {
  margin-bottom: 0;
}
@media (max-width: 600px) {
  .hero-modern.hero-modern--game {
    min-height: 140px;
    max-height: 180px;
    margin-bottom: 1rem;
  }
  .hero-modern.hero-modern--game .hero-title-gradient {
    font-size: 1.5em;
  }
  .hero-modern.hero-modern--game .hero-title-gradient i {
    font-size: 1.25em;
  }
  .hero-modern.hero-modern--game .hero-description-modern {
    font-size: 16px;
  }
}

.hero-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.04) 0%, transparent 60%),
              radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.hero-details-modern {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title-gradient {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45aaf2);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFloat 6s ease-in-out infinite;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.hero-title-gradient i {
  font-size: 2rem;
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: sparkle 2s ease-in-out infinite alternate;
}

.hero-description-modern {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 1.5rem auto;
  line-height: 1.6;
  opacity: 0.9;
}

@keyframes gradientFloat {
  0%, 100% { 
    background-position: 0% 50%;
  }
  50% { 
    background-position: 100% 50%;
  }
}

@keyframes sparkle {
  0% { 
    transform: rotate(0deg) scale(1);
    opacity: 0.8;
  }
  100% { 
    transform: rotate(10deg) scale(1.1);
    opacity: 1;
  }
}

/* How It Works Page Styles */