/* ===== صفحة تسجيل الدخول ===== */

/* الصفحة الرئيسية */
.main-content {
    min-height: calc(100vh - 140px);
    background: linear-gradient(135deg, var(--white-off) 0%, var(--white) 100%);
    padding: 2rem 0;
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="login-pattern" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(126,34,206,0.05)"/><circle cx="10" cy="10" r="0.5" fill="rgba(255,215,0,0.05)"/><circle cx="30" cy="15" r="0.5" fill="rgba(126,34,206,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23login-pattern)"/></svg>');
    opacity: 0.3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* حاوية المصادقة */
.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 70vh;
}

/* بطاقة المصادقة */
.auth-card {
    background: var(--white);
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--gold);
    position: relative;
    backdrop-filter: blur(10px);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(126, 34, 206, 0.02) 0%, rgba(255, 215, 0, 0.02) 100%);
    border-radius: 25px;
    z-index: -1;
}

/* رأس البطاقة */
.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-purple-dark);
    margin-bottom: 1rem;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.auth-subtitle {
    font-size: 1.1rem;
    color: var(--gray-dark);
    line-height: 1.6;
}

/* التنبيهات */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    border: 2px solid;
}

.alert-error {
    background: rgba(245, 101, 101, 0.1);
    color: var(--error);
    border-color: var(--error);
}

.alert-success {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success);
    border-color: var(--success);
}

.alert i {
    font-size: 1.2rem;
}

/* النموذج */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-purple-dark);
    margin-bottom: 0.5rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 1rem;
    color: var(--gold);
    font-size: 1.1rem;
    z-index: 2;
}

.form-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 15px;
    font-size: 1rem;
    background: var(--white);
    color: var(--black);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.form-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: var(--gray);
}

.password-toggle {
    position: absolute;
    left: 1rem;
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    z-index: 2;
}

.password-toggle:hover {
    color: var(--gold);
    background: rgba(255, 215, 0, 0.1);
}

.input-error {
    color: var(--error);
    font-size: 0.9rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* خيارات النموذج */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--gray-dark);
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-light);
    border-radius: 4px;
    position: relative;
    transition: var(--transition);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--gold);
    border-color: var(--gold);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-purple-dark);
    font-size: 0.8rem;
    font-weight: bold;
}

.forgot-link {
    color: var(--primary-purple);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--gold);
    text-shadow: 0 0 8px var(--gold);
}

/* الأزرار */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    color: var(--white);
    border: 2px solid var(--primary-purple);
    box-shadow: 0 4px 15px rgba(126, 34, 206, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-purple-dark) 0%, var(--primary-purple) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(126, 34, 206, 0.4);
}

.btn-full {
    width: 100%;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loading {
    display: none;
}

/* تذييل البطاقة */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-light);
}

.auth-text {
    color: var(--gray-dark);
    font-size: 1rem;
}

.auth-link {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-link:hover {
    color: var(--gold);
    text-shadow: 0 0 8px var(--gold);
}

/* صورة المصادقة */
.auth-image {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.auth-img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--gold);
}

/* تأثيرات إضافية */
.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* التجاوب */
@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .auth-title {
        font-size: 2rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .auth-image {
        order: -1;
    }
    
    .auth-img {
        max-width: 80%;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .auth-title {
        font-size: 1.8rem;
    }
    
    .auth-subtitle {
        font-size: 1rem;
    }
    
    .form-input {
        padding: 0.875rem 2.5rem 0.875rem 0.875rem;
    }
    
    .btn-full {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

/* تأثيرات الحركة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeInUp 0.6s ease-out;
}

.auth-image {
    animation: fadeInUp 0.8s ease-out;
}

/* تأثيرات خاصة للنجوم */
.auth-card::after {
    content: '✨';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    opacity: 0.3;
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.6; }
}