/* استایل‌های اصلی برای صفحه ورود */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* ناوبری */
.auth-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #4f46e5;
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-logo i {
    font-size: 1.8rem;
}

.auth-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth-nav span {
    color: #666;
}

/* کانتینر اصلی */
.auth-container {
    padding-top: 100px;
    padding-bottom: 50px;
}

.auth-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
}

@media (max-width: 1024px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
    }
    
    .auth-sidebar {
        display: none;
    }
}

/* سایدبار */
.auth-sidebar {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sidebar-content h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.subtitle {
    opacity: 0.9;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 1.5rem;
    color: #fbbf24;
}

.feature-content h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: white;
}

.feature-content p {
    opacity: 0.8;
    font-size: 0.95rem;
    line-height: 1.5;
}

.stats-container {
    display: flex;
    gap: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* فرم ورود */
.auth-form-container {
    padding: 50px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-form-header h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.auth-form-header p {
    color: #666;
    font-size: 1rem;
}

/* دکمه‌های ورود اجتماعی */
.social-login-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 30px;
}

@media (max-width: 480px) {
    .social-login-buttons {
        grid-template-columns: 1fr;
    }
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.social-btn:hover {
    border-color: #999;
    background: #f8fafc;
}

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

.social-btn.google:hover {
    background: #ffeceb;
}

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

.social-btn.github:hover {
    background: #f3f3f3;
}

/* جداکننده */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: #666;
}

.divider:before,
.divider:after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.divider:before {
    margin-left: 15px;
}

.divider:after {
    margin-right: 15px;
}

/* فرم */
.auth-form {
    margin-top: 30px;
}

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

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
}

.form-label i {
    color: #4f46e5;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input.error {
    border-color: #ef4444;
}

/* رمز عبور */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-input {
    padding-left: 50px;
}

.toggle-password {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    z-index: 2;
}

/* گزینه‌های فرم */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #444;
    user-select: none;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.checkbox-container input:checked + .checkmark {
    background: #4f46e5;
    border-color: #4f46e5;
}

.checkbox-container input:checked + .checkmark:after {
    content: '✓';
    color: white;
    font-size: 0.9rem;
}

.forgot-password {
    color: #4f46e5;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* دکمه ورود */
.btn-login {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.btn-login i {
    margin-left: 8px;
}

/* ورود با موبایل */
.phone-login-option {
    margin-top: 25px;
}

.phone-login-option .btn {
    width: 100%;
}

/* فرم موبایل */
.auth-form .form-header {
    position: relative;
    margin-bottom: 30px;
    text-align: center;
}

.back-btn {
    position: absolute;
    right: 0;
    top: 0;
    background: none;
    border: none;
    color: #4f46e5;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px;
}

.form-header h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.3rem;
}

/* ورودی تلفن */
.phone-input {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.country-code {
    padding: 14px 16px;
    background: #f8fafc;
    border-left: 2px solid #ddd;
    color: #666;
    font-weight: 600;
    font-size: 0.95rem;
}

.phone-input .form-input {
    border: none;
    border-radius: 0;
    padding-right: 15px;
}

.phone-input .form-input:focus {
    box-shadow: none;
}

/* OTP */
.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
}

.otp-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.otp-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.otp-timer {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin: 15px 0;
}

.otp-timer span {
    color: #4f46e5;
    font-weight: 700;
}

.resend-otp {
    background: none;
    border: none;
    color: #4f46e5;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px;
    text-decoration: underline;
    display: block;
    margin: 0 auto;
}

.resend-otp:hover {
    color: #4338ca;
}

/* ثبت‌نام سریع */
.quick-signup {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    text-align: center;
}

.quick-signup p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1rem;
}

.quick-options {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.quick-options .btn {
    padding: 12px 25px;
    font-size: 0.95rem;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* پیغام خطا */
.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 5px;
    height: 20px;
    display: none;
}

/* فوتر */
.auth-footer {
    margin-top: 40px;
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.footer-content p {
    margin: 0;
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* مودال */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-icon {
    font-size: 5rem;
    color: #22c55e;
    margin-bottom: 25px;
}

.modal-content h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
}

.modal-content p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* واکنش‌گرا */
@media (max-width: 768px) {
    .auth-container {
        padding: 80px 0 30px;
    }
    
    .auth-wrapper {
        margin: 0 15px;
        border-radius: 15px;
    }
    
    .auth-form-container {
        padding: 40px 30px;
    }
    
    .auth-form-header h1 {
        font-size: 1.7rem;
    }
    
    .quick-options {
        flex-direction: column;
    }
    
    .quick-options .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-navbar .container {
        padding: 0 15px;
    }
    
    .auth-form-container {
        padding: 30px 20px;
    }
    
    .otp-inputs {
        gap: 5px;
    }
    
    .otp-input {
        width: 40px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
    
    .modal-icon {
        font-size: 4rem;
    }
    
    .modal-content h3 {
        font-size: 1.5rem;
    }
}