:root {
  --bg-dark: #0b0710;
  --surface: #14101f;
  --surface-light: #1f1a2e;
  --gold: #d4af37;
  --gold-light: #f5e7c8;
  --purple: #6b4e9e;
  --purple-light: #8a6cc9;
  --text: #ffffff;
  --text-muted: #b0a8c0;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8);
}

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

body {
  background-color: var(--bg-dark);
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  background-image: radial-gradient(circle at 30% 40%, rgba(107, 78, 158, 0.15) 0%, transparent 40%);
}

.app {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

/* Header */
.header {
  margin-bottom: 2rem;
  background: rgba(20, 16, 31, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 100px;
  padding: 0.8rem 1.5rem;
  box-shadow: var(--shadow);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text);
  letter-spacing: 1px;
}

.logo-icon {
  font-size: 2.2rem;
  color: var(--gold);
}

.gold {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.search-wrapper {
  flex: 1;
  max-width: 400px;
}

#gameSearch {
  width: 100%;
  padding: 0.8rem 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--gold);
  border-radius: 40px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  outline: none;
  transition: 0.2s;
}

#gameSearch:focus {
  border-color: var(--purple-light);
  box-shadow: 0 0 15px var(--purple-light);
}

.user-actions {
  display: flex;
  gap: 0.75rem;
}

.btn {
  padding: 0.6rem 1.8rem;
  border-radius: 40px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}

.btn-outline:hover {
  background: var(--gold);
  color: var(--bg-dark);
  box-shadow: 0 0 20px var(--gold);
}

.btn-primary {
  background: linear-gradient(145deg, var(--gold), var(--purple));
  color: white;
}

.btn-primary:hover {
  filter: brightness(1.2);
  box-shadow: 0 0 25px var(--purple-light);
}

/* Hero Stats */
.hero-stats {
  background: linear-gradient(145deg, var(--surface), var(--surface-light));
  border-radius: 60px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: var(--shadow);
}

.stat-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--bg-dark);
  font-weight: 800;
  padding: 0.3rem 1.5rem;
  border-radius: 40px;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--gold);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Value Props */
.value-props {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.prop-card {
  background: var(--surface);
  border-radius: 40px;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid rgba(212, 175, 55, 0.2);
  transition: transform 0.3s;
  box-shadow: var(--shadow);
}

.prop-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
}

.prop-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.prop-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.prop-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Live Payouts Ticker */
.live-payouts {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-radius: 60px;
  padding: 0.7rem 1.5rem;
  margin-bottom: 2.5rem;
  border: 1px solid var(--gold);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ticker-label {
  background: var(--gold);
  color: var(--bg-dark);
  font-weight: 800;
  padding: 0.3rem 1.2rem;
  border-radius: 40px;
  margin-right: 1.5rem;
  white-space: nowrap;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.payout-ticker {
  display: flex;
  gap: 1.5rem;
  animation: scroll 30s linear infinite;
  white-space: nowrap;
  color: var(--text-muted);
}

.payout-ticker span:nth-child(odd) {
  color: var(--gold);
  font-weight: 500;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Game Grid */
.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0.5rem 0;
}

@media (min-width: 1200px) {
  .game-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.game-card {
  background: var(--surface);
  border-radius: 30px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  overflow: hidden;
  aspect-ratio: 3/4;
  display: flex;
}

.game-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--gold);
  box-shadow: 0 0 30px var(--gold);
}

.game-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}

.game-image {
  width: 190px;
  height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.8));
  transition: transform 0.3s;
  margin-bottom: 0.8rem;
}

.game-card:hover .game-image {
  transform: scale(1.1);
}

.game-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.3rem;
}

.game-rating {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--gold);
  font-size: 0.7rem;
}

.game-rating span {
  color: var(--text-muted);
  margin-left: 0.2rem;
}

.game-rating i {
  font-size: 0.7rem;
}

/* No Results */
.no-results {
  display: none;
  text-align: center;
  font-size: 1.2rem;
  color: var(--gold);
  margin: 3rem 0;
  padding: 2rem;
  background: var(--surface);
  border-radius: 60px;
  border: 2px dashed var(--gold);
}

/* Footer */
.footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(212, 175, 55, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.social-links {
  display: flex;
  gap: 2rem;
}

.social-link {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 2px solid var(--gold);
  transition: 0.2s;
}

.social-link:hover {
  border-color: var(--purple-light);
  transform: scale(1.15);
  box-shadow: 0 0 20px var(--purple-light);
}

.social-link img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.counter {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.counter-link {
  color: var(--gold);
  text-decoration: none;
}

.copyright {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border-left: 6px solid var(--gold);
  border-radius: 60px;
  padding: 0.8rem 1.2rem;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transform: translateX(100%);
  animation: slideIn 0.3s forwards, fadeOut 0.3s 4.7s forwards;
  pointer-events: auto;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.toast-icon {
  font-size: 1.4rem;
}

.toast-message {
  font-weight: 500;
}

.toast strong {
  color: var(--gold);
}

@keyframes slideIn {
  to { transform: translateX(0); }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(100%); }
}

/* Responsive */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .value-props {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app {
    padding: 1rem;
  }

  .header-content {
    flex-direction: column;
  }

  .live-payouts {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .game-image {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .game-image {
    width: 70px;
    height: 70px;
  }
}