/* auth.css - نسخه فشرده و بهینه */

/* --- General Font Setup --- */
body,
.auth-container,
.auth-container button,
.auth-container input,
.auth-container textarea,
.auth-container select {
    font-family: var(--font-family, 'Vazirmatn', sans-serif);
}
.input-group input::placeholder {
    font-family: var(--font-family, 'Vazirmatn', sans-serif);
    opacity: 0.7;
}

/* --- Body & Background Effects --- */
body {
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 15px; /* کاهش padding کلی برای فضای بیشتر */
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    color: var(--text-light);
}

body::before, body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(70px); /* بلور کمی کمتر */
    opacity: 0.3;
    animation: neonGlow 15s infinite alternate;
    z-index: 1;
}

body::before {
    width: 350px; height: 350px; /* اندازه کوچکتر */
    background: linear-gradient(45deg, #00c6ff, #0072ff);
    top: -30px; left: -30px;
    animation-delay: 0s;
}

body::after {
    width: 450px; height: 450px; /* اندازه کوچکتر */
    background: linear-gradient(135deg, #ff00ea, #e400ff);
    bottom: -60px; right: -60px;
    animation-delay: 7s;
}

@keyframes neonGlow {
    0% { transform: scale(1) translate(0, 0); opacity: 0.3; }
    50% { transform: scale(1.05) translate(40px, -40px); opacity: 0.35; } /* حرکت و scale کمتر */
    100% { transform: scale(1) translate(0, 0); opacity: 0.3; }
}

/* --- Auth Wrapper & Container --- */
.auth-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 380px; /* کاهش حداکثر عرض فرم برای فشرده‌سازی */
}

.auth-container {
    background-color: var(--bg-medium);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 25px; /* کاهش پدینگ داخلی */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(47, 129, 247, 0.2); /* سایه کمی کمتر */
    width: 100%;
    text-align: center;
    transition: transform 0.3s ease-in-out; /* انیمیشن سریع‌تر */
}

/* حذف کامل استایل لوگو */
/* .auth-logo img {
    display: none; 
} */

/* --- Tabs --- */
.auth-tabs {
    display: flex;
    margin-bottom: 25px; /* کاهش فاصله */
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    flex: 1;
    padding: 12px 0; /* کاهش پدینگ تب‌ها */
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1rem; /* فونت کمی کوچکتر */
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-family: var(--font-family, 'Vazirmatn', sans-serif);
}

.tab-button.active {
    color: var(--primary-color);
    font-weight: bold;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* --- Forms --- */
.auth-form {
    display: none;
    text-align: right;
    padding: 5px 0; /* کاهش پدینگ فرم */
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    font-size: 1.8rem; /* فونت عنوان کوچکتر */
    color: white;
    margin-bottom: 25px; /* کاهش فاصله */
}

.input-group {
    margin-bottom: 15px; /* کاهش فاصله بین گروه‌های ورودی */
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 6px; /* کاهش فاصله از اینپوت */
    color: var(--text-dark);
    font-size: 0.9rem; /* فونت لیبل کوچکتر */
}

.input-group input[type="text"],
.input-group input[type="password"] {
    width: 100%;
    padding: 10px 12px; /* کاهش پدینگ اینپوت‌ها */
    background-color: #0d1117;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.95rem; /* فونت اینپوت کمی کوچکتر */
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(47, 129, 247, 0.3);
}

.forgot-password {
    display: block;
    text-align: left;
    font-size: 0.85rem; /* فونت کمی کوچکتر */
    color: var(--primary-color);
    margin-top: 8px; /* کاهش فاصله */
    cursor: pointer;
    transition: color 0.3s ease;
}
.forgot-password:hover {
    color: #58a6ff;
}

.auth-submit-btn {
    width: 100%;
    padding: 12px; /* کاهش پدینگ دکمه اصلی */
    font-size: 1rem; /* فونت کمی کوچکتر */
    margin-top: 20px;
    border: none;
    font-family: var(--font-family, 'Vazirmatn', sans-serif);
}

/* --- Social Login Divider --- */
.social-login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0; /* کاهش فاصله */
    color: var(--text-dark);
}

.social-login-divider::before,
.social-login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.social-login-divider:not(:empty)::before {
    margin-right: .25em;
}

.social-login-divider:not(:empty)::after {
    margin-left: .25em;
}

/* --- Google Button --- */
.btn-google {
    width: 100%;
    padding: 10px; /* کاهش پدینگ دکمه گوگل */
    background-color: #4285F4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem; /* فونت کمی کوچکتر */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    font-family: var(--font-family, 'Vazirmatn', sans-serif);
}
.btn-google i {
    margin-left: 8px; /* فاصله آیکون کمتر */
    font-size: 1.1rem; /* اندازه آیکون کمی کوچکتر */
}
.btn-google:hover {
    background-color: #357ae8;
}

/* --- Checkbox Group --- */
.checkbox-group {
    display: flex;
    align-items: flex-start; /* تغییر به flex-start برای تراز بهتر چک‌باکس */
    margin-top: 10px;
    margin-bottom: 15px; /* کاهش فاصله */
    text-align: right;
    justify-content: flex-end;
}

.checkbox-group input[type="checkbox"] {
    width: 16px; /* اندازه کوچکتر */
    height: 16px; /* اندازه کوچکتر */
    margin-left: 8px; /* فاصله کمتر */
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.checkbox-group label {
    margin-bottom: 0;
    font-size: 0.85rem; /* فونت کوچکتر */
    color: var(--text-dark);
    cursor: pointer;
    line-height: 1.4; /* خطوط فشرده‌تر */
}
.checkbox-group label a {
    color: var(--primary-color);
    text-decoration: none;
}
.checkbox-group label a:hover {
    text-decoration: underline;
}

/* --- Responsive Adjustments --- */
@media (max-width: 420px) { /* breakpoint کمی کوچکتر */
    .auth-container {
        padding: 18px;
    }
    .auth-form h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    .input-group label {
        font-size: 0.85rem;
    }
    .input-group input {
        font-size: 0.9rem;
        padding: 9px 10px;
    }
    .auth-submit-btn, .btn-google {
        font-size: 0.95rem;
        padding: 10px;
    }
    .tab-button {
        font-size: 0.95rem;
        padding: 10px 0;
    }
    .social-login-divider {
        margin: 20px 0;
    }
    .forgot-password {
        font-size: 0.8rem;
    }
    .checkbox-group label {
        font-size: 0.8rem;
    }
}