﻿/* الألوان الأساسية */
:root {
    --primary-color: #1B5E20;
    --primary-dark: #0D4B13;
    --primary-light: #C8E6C9;
    --accent-color: #FFD600;
    --text-primary: #212121;
    --text-secondary: #757575;
    --background-color: #F5F5F5;
    --card-background: #FFFFFF;
    --error-color: #F44336;
}

/* إعادة ضبط أساسي */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* تنسيق الجسم */
body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #1B5E20 0%, #388E3C 50%, #66BB6A 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    line-height: 1.5;
    direction: rtl;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    padding: 10px 0;
}

/* إضافة أنماط زخرفية في الخلفية */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(255, 214, 0, 0.15) 5%, transparent 20%),
        radial-gradient(circle at 85% 85%, rgba(255, 214, 0, 0.15) 5%, transparent 20%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 2%, transparent 5%);
    background-size: 100% 100%, 100% 100%, 50px 50px;
    background-repeat: no-repeat, no-repeat, repeat;
    z-index: -1;
}

/* الحاوية الرئيسية */
.container {
    width: 100%;
    padding: 10px 20px;
    max-width: 1000px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

/* الشعار */
.site-logo {
    text-align: center;
    margin-bottom: 15px;
}

.logo-text {
    color: white;
    font-size: 26px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* البطاقات */
.card {
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    animation: slideUp 0.8s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--accent-color);
}

.card-body {
    padding: 30px;
}

/* العناوين */
h2 {
    color: var(--primary-color);
    text-align: center;
    font-size: 24px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 3px;
    animation: widthGrow 1s ease;
}

@keyframes widthGrow {
    from { width: 0; }
    to { width: 60px; }
}

/* النماذج */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Cairo', sans-serif;
    transition: all 0.2s ease;
    background-color: #F9F9F9;
}

    .form-control:focus {
    border-color: var(--primary-color);
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
        outline: none;
    transform: translateY(-1px);
    }

/* تحسين مظهر select */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B5E20' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 10px center;
    background-size: 16px;
    padding-left: 30px;
}

/* الأزرار */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    text-decoration: none;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.btn:hover::before {
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
}

    .btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(27, 94, 32, 0.2);
    }

.home-btn {
    background-color: var(--accent-color);
    color: var(--primary-dark);
    margin-top: 10px;
}

.home-btn:hover {
    background-color: #e6c200;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 214, 0, 0.2);
}

/* الأيقونات */
.btn i {
    margin-left: 5px;
}

/* الروابط */
a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
}

a:hover {
    color: var(--primary-dark);
}

a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

a:not(.btn):hover::after {
    width: 100%;
    }

/* التنبيهات */
.text-danger {
    color: var(--error-color);
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.alert {
    position: relative;
    padding: 1rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: .25rem;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

/* خاص بتسجيل الدخول */
.login-form .card {
    max-width: 400px;
    margin: 0 auto;
}

/* خاص بإنشاء حساب */
.signup-form .card {
    max-width: 680px;
    margin: 0 auto;
}

.signup-form .form-group {
    margin-bottom: 10px;
}

.signup-form .form-control {
    padding: 6px 10px;
}

.signup-form .card-body {
    padding: 20px;
}

/* تأكد من أن الصفحة بأكملها تظهر بدون تمرير */
.signup-form {
    display: flex;
    flex-direction: column;
    padding-top: 5px;
    padding-bottom: 5px;
    height: 100%;
    justify-content: center;
}

.signup-form .site-logo {
    margin-bottom: 12px;
}

/* مركز النص */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 20px;
    }

/* الصفوف والأعمدة */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-md-6, .col-md-4, .col-md-12 {
    padding: 0 10px;
    margin-bottom: 16px;
}

.col-md-6 {
    width: 50%;
}

.col-md-4 {
    width: 33.333%;
}

.col-md-12 {
    width: 100%;
}

/* تنسيق خاص بالشاشات المختلفة */
@media (max-width: 768px) {
    .col-md-4, .col-md-6 {
        width: 100%;
    }
    
    .card-body {
        padding: 20px;
    }

    h2 {
        font-size: 22px;
    }

    .btn {
        padding: 9px 16px;
        font-size: 14px;
    }
    
    .logo-text {
        font-size: 24px;
    }
}

/* تنسيق checkbox */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.form-check-input {
    margin-left: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.form-check-label {
    font-size: 14px;
    cursor: pointer;
}

/* تنسيقات النموذج المضغوط */
.compact-form h2 {
    font-size: 22px;
    margin-bottom: 20px;
}

.compact-form .form-label {
    font-size: 12px;
    margin-bottom: 4px;
}

.compact-form .form-control {
    padding: 7px 10px;
    font-size: 13px;
    }

.compact-form .text-danger {
    font-size: 11px;
    margin-top: 2px;
}

.compact-form .form-group {
    margin-bottom: 10px;
}

.compact-form .btn {
    padding: 8px 16px;
    font-size: 14px;
    }

.compact-form .row {
    margin-bottom: 0;
}

.compact-form .text-center {
    margin-top: 12px;
}
