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

:root {
  --primary: #0a0e27;
  --secondary: #1a1f3a;
  --tertiary: #2d3561;
  --accent: #ffd700;
  --accent-light: #ffed4e;
  --accent-dark: #cc9900;
  --text: #ffffff;
  --text-light: #b0b8cc;
  --success: #00d4aa;
  --danger: #ff4757;
  --warning: #ffa502;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

html, body {
  width: 100%;
  height: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--tertiary) 100%);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== صفحة البداية ===== */
.hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stars {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.stars::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  z-index: 0;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #fff, rgba(255, 255, 255, 0.5)),
    radial-gradient(2px 2px at 60px 70px, #fff, rgba(255, 255, 255, 0.5)),
    radial-gradient(1px 1px at 50px 50px, #fff, rgba(255, 255, 255, 0.5));
  background-size: 500px 500px;
  animation: twinkle 5s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 500px;
  padding: 30px;
  animation: slideInUp 0.8s ease;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== العنوان والشعار ===== */
.logo-container {
  margin-bottom: 40px;
}

.main-title {
  font-size: 4rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
  margin-bottom: 10px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  letter-spacing: 1px;
  margin-bottom: 30px;
}

/* ===== عرض الجاكبوت ===== */
.jackpot-display {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
  border: 2px solid var(--accent);
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.2); }
  50% { box-shadow: 0 0 50px rgba(255, 215, 0, 0.4); }
}

.jackpot-label {
  font-size: 0.9rem;
  color: var(--text-light);
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.jackpot-amount {
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.jackpot-animating {
  font-size: 2rem;
  animation: bounce 0.5s ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===== الإحصائيات المباشرة ===== */
.live-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 40px;
}

.stat-item {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: rgba(255, 215, 0, 0.15);
  border-color: var(--accent);
}

.stat-icon {
  font-size: 1.8rem;
}

.stat-text {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ===== الأزرار الرئيسية ===== */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 40px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.3s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #000;
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(255, 215, 0, 0.5);
}

.btn-secondary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

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

.btn-text {
  font-weight: 700;
}

/* ===== شبكة الميزات ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 30px;
}

.feature {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.feature:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: var(--accent);
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  display: block;
}

.feature-text {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ===== صفحات المصادقة ===== */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

.auth-card {
  background: rgba(26, 31, 58, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideInUp 0.6s ease;
}

.auth-card h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-card p {
  color: var(--text-light);
  margin-bottom: 30px;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 600;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
}

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

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

.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--gradient-accent);
  color: #000;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

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

.btn-submit:active {
  transform: translateY(0);
}

.auth-link {
  text-align: center;
  margin-top: 20px;
  color: var(--text-light);
}

.auth-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.auth-link a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

.terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0;
  font-size: 0.9rem;
}

.terms input {
  margin-top: 4px;
  cursor: pointer;
}

/* ===== لوحة التحكم ===== */
.dashboard {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  min-height: 100vh;
}

.dashboard-header {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
  border-bottom: 2px solid var(--accent);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-header h1 {
  font-size: 2rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dashboard-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 80px);
}

/* الشريط الجانبي */
.sidebar {
  background: linear-gradient(180deg, rgba(26, 31, 58, 0.8) 0%, rgba(42, 49, 90, 0.6) 100%);
  border-right: 1px solid rgba(255, 215, 0, 0.1);
  padding: 25px 0;
  height: fit-content;
  position: sticky;
  top: 80px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 15px;
}

.nav-btn {
  padding: 14px 16px;
  background: transparent;
  border: 2px solid rgba(255, 215, 0, 0.2);
  color: var(--text-light);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  text-align: right;
  font-weight: 500;
}

.nav-btn:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: var(--accent);
  color: var(--text);
  transform: translateX(-5px);
}

.nav-btn.active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.05) 100%);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

/* المحتوى الرئيسي */
.dashboard-main {
  padding: 30px 25px;
  overflow-y: auto;
  max-height: calc(100vh - 80px);
}

.section {
  display: none;
  animation: fadeIn 0.4s ease;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 25px;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* الإحصائيات */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.02) 100%);
  border: 2px solid rgba(255, 215, 0, 0.2);
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.2);
  transform: translateY(-5px);
}

.stat-card h3 {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 10px;
  font-weight: 600;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 5px;
}

.stat-unit {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* النماذج */
.form-card {
  background: rgba(26, 31, 58, 0.6);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 25px;
}

.form-card label {
  display: block;
  margin: 15px 0 8px;
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.95rem;
}

.form-card input,
.form-card select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-size: 1rem;
}

.form-card input:focus,
.form-card select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 215, 0, 0.05);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
}

/* الألعاب */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.game-card {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  transition: all 0.4s ease;
  cursor: pointer;
}

.game-card:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(255, 215, 0, 0.2);
}

.game-icon {
  font-size: 3.5rem;
  margin-bottom: 15px;
  display: block;
  transition: transform 0.3s ease;
}

.game-card:hover .game-icon {
  transform: scale(1.2) rotate(10deg);
}

.game-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text);
}

.game-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 15px;
  line-height: 1.5;
}

.game-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
}

.game-stats span {
  background: rgba(255, 215, 0, 0.1);
  padding: 8px;
  border-radius: 6px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

/* صندوق المعلومات */
.info-box {
  background: rgba(0, 212, 170, 0.1);
  border-right: 4px solid var(--success);
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
}

.info-box h3 {
  color: var(--success);
  margin-bottom: 10px;
  font-size: 1rem;
}

.info-box ul {
  list-style: none;
  font-size: 0.95rem;
}

.info-box li {
  padding: 5px 0;
  color: var(--text-light);
}

/* النتيجة السريعة */
.game-result {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.result-content {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--tertiary) 100%);
  border: 2px solid var(--accent);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 400px;
  animation: slideInUp 0.4s ease;
  box-shadow: 0 20px 60px rgba(255, 215, 0, 0.3);
}

.result-content h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--accent);
}

.result-content p {
  margin: 10px 0;
  color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .dashboard-container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 15px;
    position: static;
    border-right: none;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
  }

  .sidebar nav {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-btn {
    flex: 1;
    min-width: 120px;
  }

  .dashboard-main {
    max-height: none;
    padding: 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  .main-title {
    font-size: 3rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .jackpot-amount {
    font-size: 2.5rem;
  }

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

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

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

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

  .sidebar nav {
    flex-direction: row;
  }

  .nav-btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .dashboard-header h1 {
    font-size: 1.5rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .auth-card {
    padding: 25px;
  }

  .btn {
    padding: 14px 16px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 20px;
  }

  .main-title {
    font-size: 2.5rem;
  }

  .jackpot-display {
    padding: 15px;
  }

  .jackpot-amount {
    font-size: 2rem;
  }

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

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

  .auth-card {
    padding: 20px;
  }

  .form-group input,
  .form-group select {
    padding: 12px;
  }
}/* إصلاحات إضافية لرفع الصور */
.wallet-box {
    background: rgba(255, 215, 0, 0.1);
    border: 2px dashed var(--accent);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    text-align: center;
}

.wallet-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent);
    margin: 10px 0;
    direction: ltr;
    letter-spacing: 1px;
}

.warning-text {
    color: var(--warning);
    background: rgba(255, 165, 2, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 0.9rem;
}

.form-control[type="file"] {
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
}

.form-control[type="file"]:focus {
    border-color: var(--accent);
    outline: none;
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 20px;
}

/* تنسيقات إضافية للبطاقات */
.card {
    background: rgba(26, 31, 58, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
}

.page-header h1 {
    font-size: 1.8rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* تنسيق الإشعارات */
.notification-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--accent);
}

.notification-item.unread {
    border-left: 4px solid var(--accent);
    background: rgba(255, 215, 0, 0.08);
}

/* تنسيق الألعاب الإضافية */
.game-card.featured {
    border: 3px solid var(--accent);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.game-image {
    width: 100%;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.game-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.tag {
    background: rgba(255, 215, 0, 0.1);
    color: var(--accent);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.tag.success {
    background: rgba(0, 212, 170, 0.1);
    color: var(--success);
}

/* رسائل فارغة */
.empty-msg {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
    font-style: italic;
}