/* =============================================
   auth.css - استایل‌های عمومی صفحات احراز هویت
   مزرعه آنلاین - Font Awesome Pro 7.2.0
   ============================================= */

/* === ریست و پایه === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(135deg, #1a2e12 0%, #2d4a1e 30%, #3a5622 60%, #1a2e12 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* === پس‌زمینه تزئینی === */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -30%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(196,138,60,0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatBg 8s ease-in-out infinite;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -40%;
    left: -25%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139,195,74,0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatBg 10s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes floatBg {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* === کانتینر اصلی === */
.auth-wrapper {
    display: flex;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.7s ease;
}

.auth-wrapper.full-width {
    max-width: 500px;
}

.auth-wrapper.split-layout {
    max-width: 1050px;
    min-height: 700px;  /* از 600 به 700 */
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === بخش راست - بنر === */
.auth-banner {
    flex: 1;
    background: linear-gradient(135deg, rgba(196,138,60,0.15) 0%, rgba(139,90,43,0.2) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.auth-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' opacity='0.06'%3E%3Cpath fill='none' stroke='%23f7e5c2' stroke-width='1.5' d='M70,100 Q100,70 130,100 Q100,130 70,100'/%3E%3Ccircle cx='100' cy='100' r='6' fill='%23f7e5c2'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 55px 55px;
}

.banner-logo {
    width: 100px;
    height: 100px;
    background: linear-gradient(145deg, #c48a3c, #8b5a2b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    animation: floatIcon 3s infinite ease-in-out;
    position: relative;
    z-index: 1;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.banner-logo i {
    font-size: 45px;
    color: #f7e5c2;
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-content h2 {
    font-size: 2rem;
    color: #f9e2b7;
    margin-bottom: 12px;
    font-weight: 800;
}

.banner-content p {
    color: rgba(249, 226, 183, 0.7);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* === اصلاح استایل بنر ویژگی‌ها === */
.banner-features {
    display: flex;
    justify-content: center; /* وسط‌چین کردن کل آیتم‌ها */
    align-items: flex-start;
    gap: 25px; /* فاصله بین ستون‌ها */
    flex-wrap: wrap;
    margin-top: 35px;
}

.banner-feature {
    display: flex;
    flex-direction: column; /* چیدمان عمودی: آیکن بالا، متن پایین */
    align-items: center;    /* وسط‌چین افقی */
    justify-content: center;
    gap: 10px;             /* فاصله بین آیکن و متن */
    text-align: center;
    min-width: 80px;       /* حداقل عرض برای حفظ نظم */
}

.banner-feature i {
    font-size: 1.8rem;     /* آیکن‌ها کمی بزرگ‌تر */
    color: #f9e2b7;        /* رنگ کرم مطابق با پالت رنگی */
    display: block;
    width: auto;
    height: auto;
    line-height: 1;
    transition: transform 0.3s ease;
}

/* افکت هاور ملایم برای آیکن‌ها */
.banner-feature:hover i {
    transform: translateY(-3px);
}

.banner-feature span {
    font-size: 0.85rem;
    color: rgba(249, 226, 183, 0.85); /* متن کرم با شفافیت */
    font-weight: 500;
    line-height: 1.4;
}

/* === بخش چپ - فرم === */
.auth-form-section {
    flex: 1;
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.98);
}

.auth-form-section.full-width-form {
    flex: none;
    width: 100%;
}

.form-header {
    margin-bottom: 35px;
}

.form-header h1 {
    font-size: 2rem;
    color: #3b5522;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-header h1 i {
    color: #c48a3c;
    font-size: 1.8rem;
}

.form-header p {
    color: #8b7355;
    font-size: 0.9rem;
}

/* === تب‌ها === */
.tab-switcher {
    display: flex;
    background: #f5efe4;
    border-radius: 20px;
    padding: 5px;
    margin-bottom: 30px;
    gap: 5px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 16px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    color: #8b7355;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn i {
    font-size: 1rem;
    transition: 0.3s;
}

.tab-btn.active {
    background: linear-gradient(135deg, #4b6e2e, #3a5622);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 85, 34, 0.3);
}

.tab-btn.active i {
    color: #ffda9e;
}

.tab-btn:not(.active):hover {
    background: rgba(139, 115, 85, 0.1);
}

/* === المان‌های فرم === */
.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #5a4a35;
    margin-bottom: 8px;
}

.input-group label i {
    color: #c48a3c;
    width: 18px;
    text-align: center;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 45px 14px 18px;
    border: 2px solid #e8d9c2;
    border-radius: 16px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s;
    background: #fffdf9;
    color: #2c2a24;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #c48a3c;
    box-shadow: 0 0 0 4px rgba(196, 138, 60, 0.08);
    background: #fff;
}

.input-wrapper input::placeholder {
    color: #ccc;
}

.input-wrapper .input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #b8863b;
    font-size: 1.1rem;
    pointer-events: none;
    transition: 0.3s;
}

.input-wrapper input:focus ~ .input-icon {
    color: #c48a3c;
}

.toggle-password {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #b8863b;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    transition: 0.2s;
}

.toggle-password:hover {
    color: #c48a3c;
}

/* === دکمه اصلی === */
.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4b6e2e, #3a5622);
    border: none;
    border-radius: 16px;
    color: white;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(75, 110, 46, 0.35);
}

.submit-btn:active {
    transform: scale(0.97);
}

.submit-btn .spinner {
    display: none;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.submit-btn.loading .btn-text { display: none; }
.submit-btn.loading .spinner { display: block; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === لینک‌ها === */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #8b7355;
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 25px;
    transition: 0.2s;
}

.back-link:hover {
    color: #c48a3c;
    gap: 12px;
}

/* === جداکننده === */
.divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
    color: #b0a18a;
    font-size: 0.8rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8d9c2;
}

/* === ورود با شبکه‌های اجتماعی === */
.social-login {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e8d9c2;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.82rem;
    color: #5a4a35;
}

.social-btn:hover {
    border-color: #c48a3c;
    background: #fffdf7;
    transform: translateY(-2px);
}

.social-btn.google i { color: #ea4335; }
.social-btn.telegram i { color: #0088cc; }

/* === اعتبارسنجی === */
.error-input {
    border-color: #e74c3c !important;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.error-text {
    color: #e74c3c;
    font-size: 0.72rem;
    margin-top: 5px;
    display: none;
    align-items: center;
    gap: 5px;
}

.error-text.show {
    display: flex;
}

/* === شمارنده معکوس === */
.countdown-timer {
    text-align: center;
    margin: 15px 0;
    font-size: 0.85rem;
    color: #8b7355;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.countdown-timer i {
    color: #c48a3c;
}

.countdown-timer .time {
    font-weight: 700;
    color: #c48a3c;
    min-width: 30px;
    display: inline-block;
}

/* === لینک بازگشت به لاگین === */
.switch-text {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: #8b7355;
}

.switch-text a {
    color: #c48a3c;
    text-decoration: none;
    font-weight: 700;
    transition: 0.2s;
}

.switch-text a:hover {
    color: #3b5522;
}

/* === رسپانسیو === */
@media (max-width: 850px) {
    .auth-wrapper.split-layout {
        flex-direction: column;
        max-width: 500px;
        min-height: auto;
    }

    .auth-banner {
        padding: 35px 25px;
    }

    .banner-logo {
        width: 70px;
        height: 70px;
    }

    .banner-logo i {
        font-size: 32px;
    }

    .banner-content h2 {
        font-size: 1.5rem;
    }

    .banner-features {
        gap: 20px;
        margin-top: 20px;
    }

    .auth-form-section {
        padding: 35px 25px;
    }

    .form-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 400px) {
    .auth-wrapper {
        border-radius: 28px;
    }

    .auth-form-section {
        padding: 25px 18px;
    }

    .social-login {
        flex-direction: column;
    }

    .banner-features {
        flex-wrap: wrap;
        justify-content: center;
    }
}
