* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #9146ff;
  --primary-dark: #772ce8;
  --secondary: #18181b;
  --accent: #f0f0ff;
  --text: #efeff1;
  --text-muted: #adadb8;
  --bg: #0e0e10;
  --bg-elevated: #18181b;
  --bg-card: #1f1f23;
  --border: #2d2d35;
  --success: #00f593;
  --warning: #ffb800;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.navbar {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.nav-brand:hover {
  opacity: 0.8;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.brand-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.btn-login {
  background: var(--primary);
  color: white !important;
  padding: 10px 20px;
  border-radius: 8px;
  transition: background 0.2s;
}

.btn-login:hover {
  background: var(--primary-dark);
}

.btn-logout {
  background: var(--bg-card);
  color: var(--text) !important;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: all 0.2s;
  cursor: pointer;
}

.btn-logout:hover {
  background: var(--bg-elevated);
  border-color: var(--primary);
}

/* Hero Section */
.hero {
  padding: 120px 0 80px;
  text-align: center;
}

.hero-content h1 {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
}

.highlight {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 40px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 80px;
}

.btn {
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 80px;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Features Section */
.features {
  padding: 80px 0;
  background: var(--bg-elevated);
}

.section-title {
  font-size: 48px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 64px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 24px;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Games Section */
.games {
  padding: 80px 0;
}

.games-grid {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 16px;
  padding-top: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.games-grid.auto-scroll {
  overflow-x: hidden;
  position: relative;
}

.games-grid.auto-scroll .games-scroll-track {
  display: flex;
  gap: 24px;
  will-change: transform;
}

.games-grid.auto-scroll:hover .games-scroll-track {
  /* Pause handled by JavaScript */
}

/* Remove the CSS animation - using JavaScript instead */

.games-grid::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 320px;
  max-width: 320px;
  flex-shrink: 0;
  padding: 32px;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.game-card:hover {
  transform: translateY(-4px);
}

.game-card.active {
  border-color: var(--success);
  cursor: pointer;
}

.game-card.active:hover {
  border-color: var(--success);
}

.game-card.coming-soon {
  opacity: 0.7;
}

.game-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--success);
  color: var(--bg);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.game-card.coming-soon .game-badge {
  background: var(--warning);
}

.live-badge {
  background: #e74c3c !important;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.offline-badge {
  background: #7f8c8d !important;
}

.game-card.offline {
  opacity: 0.85;
}

.game-card.offline:hover {
  opacity: 1;
}

.game-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.game-icon-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
}

.game-card h3 {
  font-size: 24px;
  margin-bottom: 12px;
}

.game-card p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.game-features {
  list-style: none;
  padding: 0;
}

.game-features li {
  color: var(--text-muted);
  padding: 8px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.game-features li:first-child {
  border-top: none;
}

/* Pricing Section */
.pricing {
  padding: 80px 0;
  background: var(--bg-elevated);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-bottom: 64px;
}

.pricing-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.pricing-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
}

.pricing-card.popular {
  border-color: var(--primary);
  transform: scale(1.05);
}

.pricing-card.popular:hover {
  transform: scale(1.05) translateY(-8px);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.pricing-header h3 {
  font-size: 24px;
  margin-bottom: 16px;
}

.price {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 16px;
}

.currency {
  font-size: 24px;
  font-weight: 700;
  margin-top: 8px;
}

.amount {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
}

.coin-amount {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.bonus {
  color: var(--success);
  font-weight: 600;
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  text-align: left;
}

.pricing-features li {
  padding: 12px 0;
  color: var(--text-muted);
}

.btn-purchase {
  width: 100%;
  margin-top: 16px;
}

.balance-section {
  max-width: 600px;
  margin: 0 auto;
}

.balance-card {
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
}

.balance-card h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.balance-amount {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
}

.balance-info {
  color: var(--text-muted);
  font-size: 14px;
}

/* Footer */
.footer {
  background: var(--secondary);
  padding: 64px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 64px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand .logo {
  width: 48px;
  height: 48px;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 300px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-column h4 {
  margin-bottom: 16px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.footer-column a {
  display: block;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 12px;
  transition: color 0.2s;
}

.footer-column a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 32px;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text);
}

.modal-content h2 {
  margin-bottom: 16px;
}

.modal-content p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.btn-twitch {
  background: #9146ff;
  color: white;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: background 0.2s;
}

.btn-twitch:hover {
  background: #772ce8;
}

/* Purchase Confirmation Modal */
.purchase-summary {
  margin-bottom: 24px;
}

.purchase-coins {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.purchase-coins-label {
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.purchase-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.purchase-modal-actions {
  display: flex;
  gap: 12px;
}

.purchase-modal-actions .btn {
  flex: 1;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: background 0.2s, opacity 0.2s;
}

.btn-cancel {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border) !important;
}

.btn-cancel:hover {
  background: var(--bg);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 40px;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 32px;
  }
  
  .features-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  
  .game-card {
    min-width: 320px;
    max-width: 320px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 8px;
    z-index: 1000;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
    border-radius: 8px;
  }

  .nav-links a:hover {
    background: var(--bg-card);
  }

  .nav-links .btn-login {
    text-align: center;
  }

  .nav-links .user-dropdown {
    width: 100%;
  }

  .nav-links .user-dropdown-trigger {
    width: 100%;
    justify-content: center;
  }

  .nav-links .user-dropdown-menu {
    position: static;
    box-shadow: none;
    border: 1px solid var(--border);
    margin-top: 8px;
  }

  .navbar .container {
    position: relative;
  }

  .hamburger {
    display: flex;
  }
}


/* User Dropdown */
.user-dropdown {
  position: relative;
}

.user-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px 6px 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.user-dropdown-trigger:hover {
  border-color: var(--primary);
  background: var(--bg-elevated);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-weight: 500;
  color: var(--text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-arrow {
  color: var(--text-muted);
  transition: transform 0.2s;
}

.user-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 280px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.user-dropdown.open .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--bg-elevated);
}

.dropdown-item svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* VIP Status Item */
.vip-status-item {
  flex-direction: column;
  align-items: flex-start;
  cursor: default;
}

.vip-status-item:hover {
  background: transparent;
}

.vip-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.vip-tier {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.vip-tier.bronze { color: #cd7f32; }
.vip-tier.silver { color: #c0c0c0; }
.vip-tier.gold { color: #ffd700; }
.vip-tier.platinum { color: #e5e4e2; }
.vip-tier.diamond { color: #b9f2ff; }

.vip-progress-container {
  width: 100%;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.vip-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.vip-progress-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* Coin Balance Item */
.coin-balance-item {
  cursor: default;
}

.coin-balance-item:hover {
  background: transparent;
}

.coin-balance-label {
  flex: 1;
}

.coin-balance-value {
  font-weight: 700;
  color: var(--primary);
  font-size: 16px;
}

/* Logout Item */
.logout-item {
  color: #e74c3c;
}

.logout-item svg {
  color: #e74c3c;
}

.logout-item:hover {
  background: rgba(231, 76, 60, 0.1);
}

/* Following Modal */
.following-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1001;
}

.following-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.following-modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  z-index: 1;
}

.following-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.following-modal-header h3 {
  font-size: 20px;
}

.following-list {
  max-height: 400px;
  overflow-y: auto;
}

.following-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  transition: background 0.2s;
  text-decoration: none;
  color: var(--text);
}

.following-item:hover {
  background: var(--bg-elevated);
}

.following-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.following-info {
  flex: 1;
}

.following-name {
  font-weight: 600;
  margin-bottom: 2px;
}

.following-status {
  font-size: 12px;
  color: var(--text-muted);
}

.following-status.live {
  color: #e74c3c;
}

.following-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.following-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
