/* ====================================================
   index.css - تصميم صفحة تسجيل الدخول
   ==================================================== */

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

:root {
  --navy: #0A1628;
  --navy-mid: #0D1F3C;
  --navy-light: #1A3A5C;
  --gold: #D4AF37;
  --gold-light: #F0D060;
  --gold-dark: #B8941F;
  --white: #FFFFFF;
  --blue-accent: #2563EB;
}

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

body {
  font-family: 'Cairo', sans-serif;
  background: var(--navy);
}

/* خلفية متحركة */
.bg-animated {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0A1628 0%, #0D1F3C 40%, #0F2952 70%, #071020 100%);
  z-index: 0;
}

/* جسيمات متطايرة */
.particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: float linear infinite;
}

@keyframes float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.15; }
  90% { opacity: 0.15; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* بطاقة تسجيل الدخول */
.login-card {
  background: rgba(13, 31, 60, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 24px;
  padding: 40px 36px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(212, 175, 55, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: slideUp 0.6s ease-out;
}

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

/* شعار دائري */
.logo-circle {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.3); }
  50% { box-shadow: 0 0 40px rgba(212, 175, 55, 0.6); }
}

/* حقول الإدخال */
.login-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
  color: white;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  transition: all 0.3s ease;
  outline: none;
  width: 100%;
  direction: rtl;
}

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

.login-input:focus {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.05);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.login-input:hover {
  border-color: rgba(212, 175, 55, 0.4);
}

/* زر الدخول */
.login-btn {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-light) 100%);
  color: var(--navy);
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
}

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

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* رسالة الخطأ */
.error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* فاصل */
.divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* صندوق المعلومات */
.info-box {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 12px 16px;
}

/* ألوان مخصصة */
.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }
.bg-navy { background: var(--navy); }

/* الخلفية المتدرجة */
.bg-navy-gradient {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
}

/* Tailwind font override */
.font-cairo { font-family: 'Cairo', sans-serif; }

/* تأثير التحميل */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin {
  display: inline-block;
  animation: spin 1s linear infinite;
}
