:root {
  --primary: #4c6ef5;
  --primary-dark: #3b5bdb;
  --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;
}

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

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

.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.5rem;
  font-weight: 600;
  color: var(--text-color);
  text-align: center;
}

.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: 1.5rem;
  left: 0;
  right: 0;
  padding: 0 1.5rem;
}

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

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

.free-tag {
  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);
}

.premium-tag {
  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: 1000;
  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);
}

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

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

/* Header */
header {
  background-color: var(--dark-color);
  color: var(--text-color);
  padding: 1rem 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  position: relative;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

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

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

.logo h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

.connected-wallet {
  display: none;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  z-index: 1001;
}

.connected-wallet i {
  color: var(--success-color);
  margin-right: 5px;
}

/* Mobile hamburger menu */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
  justify-content: space-around;
  align-items: center;
  z-index: 1002;
  transition: all 0.3s ease;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation */
.main-nav {
  display: block;
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.main-nav ul li {
  margin-left: 20px;
}

.main-nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
  font-size: 0.9rem;
  display: block;
  padding: 0.5rem 0;
}

.main-nav ul li a:hover {
  color: var(--secondary-color);
}

/* User Account in Navigation */
.user-account-item {
  margin-left: 30px !important;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 20px;
}

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

.logout-btn {
  background: rgba(231, 76, 60, 0.8);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: rgba(231, 76, 60, 1);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('/images/hero-bg.jpg');
  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;
}

/* 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;
  }
  
  .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 Navigation */
  .mobile-menu-toggle {
    display: flex !important;
  }
  
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, var(--dark-color), var(--primary-color));
    backdrop-filter: blur(10px);
    transition: right 0.3s ease;
    z-index: 1000;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
  }
  
  .main-nav.active {
    right: 0;
  }
  
  .main-nav ul {
    flex-direction: column;
    padding: 80px 0 0 0;
    margin: 0;
    height: 100%;
    align-items: stretch;
  }
  
  .main-nav ul li {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .main-nav ul li a {
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
  }
  
  .main-nav ul li a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--secondary-color);
    color: var(--text-color);
  }
  
  /* Mobile User Account Styles */
  .user-account-item {
    margin-left: 0 !important;
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 2px solid rgba(255, 255, 255, 0.2) !important;
    margin-top: auto !important;
  }
  
  .user-account-info {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 1.5rem 2rem;
  }
  
  .account-address {
    font-size: 0.9rem;
    padding: 8px 12px;
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    word-break: break-all;
  }
  
  .logout-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    font-weight: 600;
  }
  
  /* Mobile overlay */
  .mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Section tabs mobile improvements */
  .section-tabs {
    overflow-x: auto;
    padding: 0 1rem 1rem 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .section-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .section-tab {
    white-space: nowrap;
    min-width: max-content;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

@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.5rem;
    justify-content: center;
  }
  
  .section-tab {
    flex: 0 1 auto;
    min-width: 80px;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
  }
  
  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;
}

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

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

/* 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 token colors */
  --xrp-color: #0a93eb; 
  --csc-color: #8e44ad;
  /* Other tokens will be added here dynamically */
}

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

/* Token-colored tags/badges */
[class*="-tag"] {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--primary);
  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(--primary);
  margin-bottom: 0.8rem;
  text-align: center;
}

/* Token-colored buttons */
[class*="-btn"] {
  background-color: var(--primary);
  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);
}

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

/* Token-specific styles - apply to built-in tokens for backward compatibility */
.xrp-tag { background-color: var(--xrp-color); }
.xrp-price { color: var(--xrp-color); }
.xrp-btn { background-color: var(--xrp-color); }
.xrp-btn:hover { filter: brightness(1.1); }
/* [data-token="xrp"] { border-left: 3px solid var(--xrp-color); } */

.csc-tag { background-color: var(--csc-color); }
.csc-price { color: var(--csc-color); }
.csc-btn { background-color: var(--csc-color); }
.csc-btn:hover { filter: brightness(1.1); }
/* [data-token="csc"] { border-left: 3px solid var(--csc-color); } */

/* These styles ensure that any other token-specific classes get the same treatment */

/* Global override to ensure no token-colored borders are displayed */
[data-token] {
  border-left: none !important;
}

.scratch-container-wrapper[data-token],
.symbol-legend[data-token],
.card[data-token] {
  border-left: none !important;
}

/* Confetti canvas styling - only for confetti canvases */
canvas[id^="confetti-canvas"] {
  pointer-events: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 9999 !important;
  width: 100vw !important;
  height: 100vh !important;
}

/* Card Hero Section */
.card-hero {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
  color: var(--text-color);
  text-align: center;
  padding: 4rem 0;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Dark overlay for card hero when background image is present */
.card-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8));
  z-index: 1;
}

.card-hero .container {
  position: relative;
  z-index: 2;
}

.card-hero .card-details h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.card-hero .card-description {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 1rem auto;
  color: var(--text-light);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.card-hero .token-badge {
  display: inline-block;
  margin: 0.5rem 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

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

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

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

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

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

.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(auto-fit, minmax(250px, 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 Responsive Design */
@media (max-width: 768px) {
  .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;
  }
  
  .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)), url('/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  padding: 3rem 0 2rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.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 */