/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', sans-serif;
  background: #0a0a0f;
  color: #e0e0e0;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Animated background particles (simple stars) */
#particles {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0f 70%);
  z-index: -1;
}
#particles::after {
  content: '';
  position: absolute;
  top:0; left:0;
  width:100%; height:100%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800"><circle cx="100" cy="150" r="1.5" fill="white" opacity="0.4"/><circle cx="700" cy="100" r="1" fill="white" opacity="0.3"/><circle cx="400" cy="600" r="2" fill="white" opacity="0.5"/><circle cx="200" cy="400" r="1.2" fill="white" opacity="0.2"/><circle cx="600" cy="300" r="1.8" fill="white" opacity="0.4"/></svg>');
  background-size: cover;
}

.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* === Typography === */
h3 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 500;
  margin-bottom: 15px;
  color: #00d4ff;
  text-shadow: 0 0 10px rgba(0,212,255,0.3);
}

/* === Header === */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
  padding: 15px 25px;
  background: rgba(15,15,30,0.7);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
}
.logo { display:flex; align-items: center; gap:10px; font-size:28px; font-weight:700; font-family:'Orbitron', sans-serif; color:#fff; }
.mode-toggle { display:flex; gap:5px; background:rgba(0,0,0,0.4); padding:5px; border-radius:30px; }
.mode-toggle button {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: #aaa;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display:flex; align-items:center; gap:8px;
  white-space: nowrap;
}
.mode-toggle button.active {
  background: linear-gradient(135deg, #00d4ff, #0900ff);
  color: #fff;
  box-shadow: 0 0 20px rgba(0,212,255,0.5);
}
.header-right { display:flex; align-items:center; gap:15px; }

/* === Glass Card === */
.glass-card {
  background: rgba(20,20,40,0.5);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.glass-card:hover {
  box-shadow: 0 12px 40px rgba(0,212,255,0.15);
}

/* === Buttons === */
.btn-glow {
  padding: 12px 24px;
  background: linear-gradient(135deg, #00d4ff, #0900ff);
  border: none;
  border-radius: 30px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 15px rgba(0,212,255,0.4);
}
.btn-glow:hover { box-shadow: 0 0 25px rgba(0,212,255,0.7); transform: translateY(-2px); }
.btn-gradient { background: linear-gradient(135deg, #ff6b6b, #ffa500); border:none; border-radius:30px; padding:10px 20px; color:white; font-weight:600; cursor:pointer; }
.btn-small { padding:8px 15px; border-radius:20px; background:rgba(255,255,255,0.1); border:1px solid rgba(255,255,255,0.2); color:white; cursor:pointer; }
.btn-large { padding:15px 30px; font-size:18px; }

input[type="text"], input[type="password"], input[type="number"] {
  width: 100%;
  padding: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  color: white;
  margin: 10px 0;
  font-size: 16px;
}

/* === Panels === */
.mode-panel { display: none; }
.mode-panel.active { display: block; }

/* === Web3 Specific === */
.wallet-info { display:flex; justify-content:space-between; align-items:center; }
.address { font-family: monospace; background:rgba(0,0,0,0.4); padding:5px 10px; border-radius:8px; }
.balance-row { display:flex; justify-content: space-between; margin-top:15px; font-size:20px; }
.market-form { display:flex; flex-wrap: wrap; gap:20px; }
.input-group { flex:1; min-width:200px; }
.price-info { margin-top:15px; font-size:18px; text-align: center; }

/* === Game Buttons === */
.game-buttons { display: flex; gap:20px; flex-wrap: wrap; }
.game-btn {
  flex: 1;
  min-width: 150px;
  padding: 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: 15px;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.game-btn:hover {
  background: rgba(0,212,255,0.1);
  border-color: #00d4ff;
  transform: scale(1.02);
}
.game-icon { font-size: 40px; }

/* === Demo Auth === */
.auth-card { max-width: 400px; margin: 0 auto; }
.auth-buttons { display:flex; gap:10px; margin-top:15px; }

/* === Balance Display === */
.balance-display { text-align: center; }
.balance-value { font-size: 48px; font-weight: 700; font-family: 'Orbitron', sans-serif; color: #00d4ff; text-shadow: 0 0 20px rgba(0,212,255,0.5); }
.balance-label { display: block; font-size: 14px; color: #aaa; margin-top: 5px; }

/* === Ad Section === */
.ad-card { text-align: center; }

/* === Toast Notification === */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  color: white;
  padding: 15px 25px;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  z-index: 1000;
  animation: slideIn 0.3s ease, fadeOut 0.3s 2.7s forwards;
}
@keyframes slideIn { from { transform: translateX(100px); opacity:0; } to { transform: translateX(0); opacity:1; } }
@keyframes fadeOut { to { opacity:0; } }

/* Responsive */
@media (max-width: 768px) {
  header { flex-direction: column; }
  .mode-toggle { flex-direction: column; }
}