
/* نظام الألوان المتطور */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-bg: #1a1a2e;
    --darker-bg: #16213e;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    --glow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.auth-container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    background: var(--dark-bg);
    position: relative;
    overflow: hidden;
}

/* البطاقة الرئيسية */
.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    margin: 40px;
    box-shadow: var(--shadow);
    z-index: 2;
}

/* رأس الصفحة */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow);
}

.auth-icon .icon {
    font-size: 2.5rem;
}

.auth-header h1 {
    font-size: 2.2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    font-weight: 700;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

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

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    font-size: 1.2rem;
    z-index: 2;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: var(--text-secondary);
}

/* زر إظهار كلمة المرور */
.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
}

/* خيارات النموذج */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input:checked + .checkmark {
    background: var(--primary-gradient);
    border-color: #667eea;
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* أزرار التسجيل */
.auth-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-btn.primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.auth-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.6);
}

/* الفاصل */
.auth-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 45%;
    height: 1px;
    background: var(--border-color);
}

.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 45%;
    height: 1px;
    background: var(--border-color);
}

/* وسائل التواصل الاجتماعي */
.social-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.social-btn {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
}

.social-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.social-btn.google:hover {
    border-color: #db4437;
}

.social-btn.github:hover {
    border-color: #333;
}

/* تذييل الصفحة */
.auth-footer {
    text-align: center;
    color: var(--text-secondary);
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: #764ba2;
}

.link-arrow {
    transition: transform 0.3s ease;
}

.auth-link:hover .link-arrow {
    transform: translateX(5px);
}

/* الجانب الجمالي */
.auth-decoration {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    overflow: hidden;
}

.floating-game {
    position: absolute;
    font-size: 4rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.7;
}

.floating-game:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.floating-game:nth-child(2) {
    top: 60%;
    right: 30%;
    animation-delay: 2s;
}

.floating-game:nth-child(3) {
    bottom: 20%;
    left: 40%;
    animation-delay: 4s;
}

.decoration-text {
    text-align: center;
    color: white;
    z-index: 2;
    padding: 40px;
}

.decoration-text h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.decoration-text p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* التنبيهات */
.alert {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #f8d7da;
}

.alert-icon {
    font-size: 1.5rem;
}

/* الرسوم المتحركة */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

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

.auth-card {
    animation: fadeInUp 0.8s ease-out;
}

/* التصميم المتجاوب */
@media (max-width: 968px) {
    .auth-container {
        grid-template-columns: 1fr;
    }
    
    .auth-decoration {
        display: none;
    }
    
    .auth-card {
        margin: 20px;
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        margin: 10px;
        padding: 20px;
    }
    
    .social-auth {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}
