@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Poppins:wght@300;400;600;700&display=swap');

:root {
  --gold: #FFD700;
  --dark-gold: #D4A017;
  --neon-green: #39FF14;
  --neon-pink: #FF10F0;
  --neon-blue: #00D4FF;
  --neon-orange: #FF6B00;
  --dark-bg: #0a0a0f;
  --card-bg: #1a1a2e;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: var(--dark-bg);
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(255, 16, 240, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 80px;
  position: relative;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 16px;
}

.logo {
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--neon-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.header-actions { display: flex; gap: 8px; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-1px); }

/* Balance Card */
.balance-card {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 107, 0, 0.1));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.balance-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 4px;
}

.balance-amount {
  font-family: 'Orbitron', monospace;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.balance-sub {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.balance-sub span { color: var(--neon-green); }

.deposit-withdraw-btns {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.action-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-deposit {
  background: linear-gradient(135deg, var(--neon-green), #2eb82e);
  color: #000;
}
.btn-deposit:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(57, 255, 20, 0.3); }

.btn-withdraw {
  background: linear-gradient(135deg, var(--neon-blue), #0099cc);
  color: #000;
}
.btn-withdraw:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3); }

/* Slot Machine */
.slot-machine {
  background: linear-gradient(180deg, #1a1a3e 0%, #0a0a1f 100%);
  border: 3px solid var(--gold);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  box-shadow: 0 0 60px rgba(255, 215, 0, 0.15),
              inset 0 2px 10px rgba(255, 215, 0, 0.1);
}

.slot-machine::before {
  content: '🎰';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  background: var(--dark-bg);
  padding: 0 12px;
}

.machine-header {
  text-align: center;
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.reels-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  perspective: 1000px;
}

.reel {
  width: 90px;
  height: 120px;
  background: linear-gradient(180deg, #2a2a4a, #1a1a2e, #2a2a4a);
  border: 2px solid var(--gold);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.5);
}

.reel-window {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
  z-index: 2;
}

.reel-spinning {
  animation: spinReel 0.1s linear infinite;
}

.reel-spinning:nth-child(2) { animation-delay: 0.05s; }
.reel-spinning:nth-child(3) { animation-delay: 0.1s; }

@keyframes spinReel {
  0% { transform: translateY(-10px); opacity: 0.7; }
  50% { transform: translateY(10px); opacity: 1; }
  100% { transform: translateY(-10px); opacity: 0.7; }
}

.reel.win-reel {
  animation: winPulse 0.5s ease-in-out infinite alternate;
  border-color: var(--neon-green);
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.5);
}

@keyframes winPulse {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

.machine-payline {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 215, 0, 0.3);
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}

/* Bet Controls */
.bet-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.bet-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.6);
}

.bet-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bet-btn:hover { background: var(--gold); color: #000; }

.bet-amount {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 80px;
  text-align: center;
}

/* Spin Button */
.spin-btn {
  width: 100%;
  padding: 18px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, var(--gold), var(--dark-gold), var(--gold));
  background-size: 200% 200%;
  color: #000;
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 4px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
  animation: shimmer 3s ease-in-out infinite;
}

.spin-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255, 215, 0, 0.6);
}

.spin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  animation: none;
}

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

.spin-btn.spinning {
  animation: none;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-orange));
  color: #fff;
}

/* Jackpot Overlay */
.jackpot-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  flex-direction: column;
}

.jackpot-overlay.active { display: flex; }

.jackpot-text {
  font-family: 'Orbitron', monospace;
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--neon-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: jackpotPulse 0.5s ease-in-out infinite alternate;
  text-align: center;
}

@keyframes jackpotPulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.jackpot-amount {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  color: var(--gold);
  margin-top: 16px;
}

/* Win Animation */
.win-animation {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  display: none;
}

.win-animation.active { display: block; }

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.modal-overlay.active { display: flex; }

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px 24px 0 0;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.modal-title {
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Forms */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
}

.form-input::placeholder { color: rgba(255, 255, 255, 0.3); }

.submit-btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--gold), var(--dark-gold));
  color: #000;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
}

.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3); }

.quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.quick-amount {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.quick-amount:hover, .quick-amount.active {
  border-color: var(--gold);
  background: rgba(255, 215, 0, 0.1);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--glass);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--gold);
  color: #000;
}

/* Leaderboard */
.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--glass);
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--glass-border);
}

.leaderboard-rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255, 215, 0, 0.1);
  color: var(--gold);
}

.leaderboard-rank.gold { background: linear-gradient(135deg, #FFD700, #FFA500); color: #000; }
.leaderboard-rank.silver { background: linear-gradient(135deg, #C0C0C0, #808080); color: #000; }
.leaderboard-rank.bronze { background: linear-gradient(135deg, #CD7F32, #8B4513); color: #fff; }

.leaderboard-info { flex: 1; }
.leaderboard-name { font-weight: 600; font-size: 0.95rem; }
.leaderboard-level { font-size: 0.75rem; color: rgba(255, 255, 255, 0.5); }
.leaderboard-score {
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 700;
}

/* Achievements */
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.achievement-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.achievement-card.unlocked {
  border-color: rgba(255, 215, 0, 0.3);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(255, 107, 0, 0.05));
}

.achievement-card.locked { opacity: 0.5; }

.achievement-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
  filter: grayscale(100%);
}

.achievement-card.unlocked .achievement-icon { filter: grayscale(0%); }

.achievement-title {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.achievement-desc {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.achievement-locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.5);
}

/* Transaction List */
.transaction-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--glass);
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--glass-border);
}

.transaction-info { flex: 1; }
.transaction-type {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: capitalize;
}
.transaction-date {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
}
.transaction-amount {
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  font-weight: 700;
}
.transaction-amount.positive { color: var(--neon-green); }
.transaction-amount.negative { color: var(--neon-pink); }

/* Profile */
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(0, 212, 255, 0.1));
  border-radius: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--dark-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.profile-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-level {
  font-size: 0.8rem;
  color: var(--gold);
}

.profile-xp-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.profile-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--neon-orange));
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* Share Buttons */
.share-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.share-btn {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 2000;
  transition: transform 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--neon-green); color: var(--neon-green); }
.toast.error { border-color: var(--neon-pink); color: var(--neon-pink); }
.toast.info { border-color: var(--neon-blue); color: var(--neon-blue); }

/* Loading */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Phone Input */
.phone-input-group {
  display: flex;
  gap: 8px;
}

.phone-prefix {
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark-bg); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* Responsive */
@media (max-width: 400px) {
  .reel { width: 70px; height: 100px; font-size: 2.2rem; }
  .balance-amount { font-size: 1.8rem; }
  .spin-btn { padding: 14px; font-size: 1rem; }
}

/* Logout Section */
.logout-section {
  padding: 20px;
  border-top: 1px solid var(--glass-border);
  margin-top: 20px;
}

.logout-btn,
.logout-all-btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.logout-btn:hover {
  background: rgba(255, 16, 240, 0.1);
  border-color: var(--neon-pink);
  transform: translateY(-2px);
}

.logout-all-btn:hover {
  background: rgba(255, 107, 0, 0.1);
  border-color: var(--neon-orange);
  transform: translateY(-2px);
}

.logout-icon {
  font-size: 1.2rem;
}

.hidden { display: none !important; }
