:root {
  --bg: #06060f;
  --surface: #0f0f23;
  --primary: #8b5cf6;
  --text: #f1f5f9;
  --danger: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Cairo', sans-serif; }
body { background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; }

/* شاشة التحميل */
.loading-screen {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  justify-content: center; align-items: center; background: var(--bg); z-index: 999;
}
.spinner {
  width: 40px; height: 40px; border: 4px solid rgba(139, 92, 246, 0.3);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 1s linear infinite; margin-bottom: 15px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* التطبيق */
.app-container { display: flex; flex-direction: column; height: 100%; }
.header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px; background: var(--surface); border-bottom: 1px solid rgba(255,255,255,0.1);
}
.logo { font-weight: 900; font-size: 18px; }
.wallet { background: rgba(251, 191, 36, 0.2); color: #fbbf24; padding: 5px 12px; border-radius: 20px; font-weight: bold; }

.main-content { flex: 1; padding: 20px; display: flex; flex-direction: column; align-items: center; }
h1 { margin-bottom: 10px; }
p { color: #94a3b8; margin-bottom: 20px; }

/* النماذج والأزرار */
#auth-section, #game-section { width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: 10px; }
input {
  width: 100%; padding: 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.2);
  background: var(--surface); color: var(--text); outline: none; font-size: 14px;
}
input:focus { border-color: var(--primary); }

.btn {
  padding: 12px; border-radius: 8px; border: none; font-weight: bold;
  font-size: 16px; cursor: pointer; transition: 0.2s;
}
.btn.primary { background: var(--primary); color: white; }
.btn.secondary { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn.danger { background: var(--danger); color: white; }
.btn:active { transform: scale(0.95); }
.mt-2 { margin-top: 10px; }