
      /* إعدادات عامة */
  * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
  }

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #0c1445 0%, #1a237e 25%, #283593 50%, #3949ab 75%, #5c6bc0 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    direction: rtl;
}

/* خلفية النجوم */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
            radial-gradient(2px 2px at 20px 30px, #fff, transparent),
            radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
            radial-gradient(1px 1px at 90px 40px, #fff, transparent),
            radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
            radial-gradient(2px 2px at 160px 30px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 3s linear infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* تأثير الشهب */
.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, #fff, transparent);
    border-radius: 50%;
    animation: shooting 8s linear infinite;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, #fff, transparent);
    transform: translateX(-50px);
}

@keyframes shooting {
    0% {
        transform: translateX(-100px) translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(100vw) translateY(100vh);
        opacity: 0;
    }
}

/* الحاوي الرئيسي */
.container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    flex-direction: column;
}

/* بطاقة تسجيل الدخول */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 500px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideUp 1s ease-out;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d4af37, #ffd700, #d4af37);
    border-radius: 25px 25px 0 0;
}

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

/* رأس البطاقة */
.header {
    text-align: center;
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
}

.logo-icon {
    font-size: 3.2rem;
    background: linear-gradient(135deg, #d4af37, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
    animation: pulse 2s ease-in-out infinite;
}

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

.header h1 {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 10px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1rem;
    font-weight: 400;
    margin-top: 10px;
}

/* رسائل النظام */
.message-container {
    margin: 20px 0;
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.5s ease;
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 2px solid rgba(59, 130, 246, 0.3);
}

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

.message-container .icon {
    font-size: 1.2rem;
    font-weight: bold;
}

/* النموذج */
.auth-form {
    padding: 30px;
}

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

.form-group label {
    display: block;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.input-wrapper input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 1);
}

.input-wrapper input.error {
    border-color: #e74c3c;
    animation: shake 0.5s ease-in-out;
}

.input-wrapper input.success {
    border-color: #27ae60;
}

.input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #7f8c8d;
    pointer-events: none;
}

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

/* زر الإرسال */
.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #b8941f, #e6c200);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(212, 175, 55, 0.4);
}

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

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

.btn-loader {
    display: none;
    width: 22px;
    height: 22px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.submit-btn.loading .btn-text {
    display: none;
}

.submit-btn.loading .btn-loader {
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* روابط التسجيل والعودة */
.register-link {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.register-link a {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: #b8941f;
    text-decoration: underline;
}

/* معلومات الأمان */
.security-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    margin-top: 20px;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.security-icon {
    font-size: 1rem;
    color: #27ae60;
}

/* تأثيرات التحميل للصفحة */
body {
    opacity: 0;
    animation: pageLoad 0.8s ease-out forwards;
}

@keyframes pageLoad {
    to {
        opacity: 1;
    }
}

/* التأثير المتموج للأزرار */
.auth-card,
.input-wrapper input,
.submit-btn {
    will-change: transform;
}

.auth-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(212, 175, 55, 0.05), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(0%) translateY(0%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* تحسين الشهب في الصفحة المتجاوبة */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    .auth-card {
        margin: 10px;
        border-radius: 20px;
    }
    .header h1 {
        font-size: 1.8rem;
    }
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    .logo-icon {
        font-size: 3rem;
    }
    .security-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .auth-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.6rem;
    }
    .logo-icon {
        font-size: 2.5rem;
    }
    .input-wrapper input {
        padding: 15px 50px 15px 15px;
        font-size: 0.95rem;
    }
    .submit-btn {
        padding: 16px;
        font-size: 1rem;
    }
}
