/* 
 * auth.css - أنماط خاصة بصفحات المصادقة (تسجيل الدخول والتسجيل)
 * منصة فانز زون - النادي الرياضي دهوك
 */

/* ===== إخفاء العناصر الرئيسية عند عرض صفحة المصادقة ===== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    background-image: url('../images/pattern.png'), linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    background-blend-mode: overlay;
}

/* إخفاء الرأس والتذييل والشريط الرئيسي في صفحات المصادقة */
body.auth-page .main-header,
body.auth-page .main-footer,
body.auth-page .club-bar,
body.auth-page .progress-bar,
body.auth-page .mobile-menu {
    display: none !important;
}

body.auth-page .main-content {
    padding: 0 !important;
    margin: 0 !important;
}

body.auth-page .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ===== بطاقة المصادقة ===== */
.auth-card {
    width: 100%;
    max-width: 500px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.auth-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

/* ===== رأس بطاقة المصادقة ===== */
.auth-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--gray-light);
    background: linear-gradient(to bottom, var(--light) 0%, var(--white) 100%);
}

.auth-logo {
    margin-bottom: 1.5rem;
}

.auth-logo img {
    max-width: 140px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: var(--transition);
}

.auth-logo img:hover {
    transform: scale(1.05);
}

.auth-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.auth-subtitle {
    color: var(--gray);
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== جسم بطاقة المصادقة ===== */
.auth-body {
    padding: 2rem;
    background-color: var(--white);
}

/* ===== نموذج المصادقة ===== */
.auth-form {
    margin-bottom: 1.5rem;
}

/* ===== تنسيق حقول النموذج ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-dark);
    font-size: 0.95rem;
}

.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.input-group.input-focused {
    box-shadow: 0 0 0 3px rgba(30, 91, 148, 0.15);
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--gray);
    text-align: center;
    white-space: nowrap;
    background-color: var(--light);
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    border-left: none;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dark);
    background-color: var(--white);
    background-clip: padding-box;
    border: 1px solid var(--gray-light);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    transition: var(--transition);
    font-family: 'Tajawal', sans-serif;
}

.form-control:focus {
    color: var(--dark);
    background-color: var(--white);
    border-color: var(--primary-light);
    outline: none;
    box-shadow: none;
}

.toggle-password {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    border-right: none;
    color: var(--gray);
    background-color: var(--light);
    padding: 0.75rem 1rem;
}

.toggle-password:hover {
    background-color: var(--gray-light);
    color: var(--gray-dark);
}

.input-group > .form-control:not(:last-child) {
    border-left: 0;
    border-radius: 0;
}

/* ===== الزر الرئيسي ===== */
.btn-primary {
    color: var(--white);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    font-size: 1.05rem;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(30, 91, 148, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 5px 20px rgba(30, 91, 148, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(30, 91, 148, 0.3);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn i {
    margin-left: 0.5rem;
}

/* ===== منطقة المساعدة ===== */
.auth-help {
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid var(--gray-light);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.auth-help p {
    margin-bottom: 0.5rem;
    color: var(--gray);
}

.auth-help a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.auth-help a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== تذييل بطاقة المصادقة ===== */
.auth-footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--light);
    font-size: 0.85rem;
    color: var(--gray);
    border-top: 1px solid var(--gray-light);
}

.auth-footer .copyright {
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

/* ===== التنبيهات ===== */
.alert {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    animation: fadeInDown 0.5s ease-in-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert i {
    margin-left: 0.75rem;
    font-size: 1.2rem;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* ===== الرسوم المتحركة ===== */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* ===== التصميم المتجاوب ===== */
@media (max-width: 576px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-header, .auth-body {
        padding: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-subtitle {
        font-size: 0.85rem;
    }
    
    .form-control, .input-group-text, .toggle-password {
        padding: 0.6rem 0.8rem;
    }
    
    .btn-primary {
        padding: 0.6rem 1rem;
        font-size: 1rem;
    }
}

/* ===== تحسينات إضافية ===== */
/* بريق الخلفية للحقول عند التركيز */
.input-group.input-focused .form-control {
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    from { box-shadow: inset 0 0 2px var(--primary-light); }
    to { box-shadow: inset 0 0 8px var(--primary-light); }
}

/* تأثير نبض للزر عند التحويم */
.btn-primary:hover {
    animation: pulse 1.5s infinite;
}

/* تحسين شكل الأيقونات */
.input-group-text i, .toggle-password i {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

/* تحسين تأثير البطاقة عند التحميل */
.auth-card {
    will-change: transform, opacity;
}

/* شعار دهوك في خلفية الصفحة */
.auth-container:after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-image: url('../images/logo-watermark.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 40%;
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
}

/* تنسيق الهوامش بشكل أفضل */
.auth-form .form-group:last-child {
    margin-bottom: 0;
}