/* استایل‌های مودال ورود و ثبت نام */

.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.auth-modal.active {
    display: flex;
}

.auth-modal-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.auth-modal-close {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #64748b;
    transition: 0.3s;
    background: none;
    border: none;
}

.auth-modal-close:hover {
    color: #0A192F;
    transform: rotate(90deg);
}

.auth-modal h2 {
    color: #0A192F;
    margin-bottom: 10px;
    font-size: 24px;
    text-align: center;
}

.auth-modal .auth-subtitle {
    color: #64748b;
    text-align: center;
    margin-bottom: 25px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    color: #0A192F;
    font-weight: 500;
    font-size: 14px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.3s;
    background: #f8fafc;
}

.auth-form input:focus {
    border-color: #FFC107;
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.auth-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.auth-form .password-input {
    position: relative;
}

.auth-form .toggle-password {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #64748b;
    background: none;
    border: none;
    font-size: 18px;
}

.auth-form .form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
}

.auth-form .form-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
}

.auth-form .form-options a {
    color: #FFC107;
    text-decoration: none;
    font-size: 14px;
}

.auth-form .form-options a:hover {
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: #FFC107;
    color: #0A192F;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.auth-btn:hover {
    background: #ffca2c;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: #64748b;
}

.auth-switch a {
    color: #FFC107;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.auth-message.error {
    display: block;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-message.success {
    display: block;
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* استایل منوی کاربر */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-menu {
    position: relative;
    cursor: pointer;
}

.user-name {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    color: #FFC107;
    font-weight: 500;
}

.user-name::after {
    content: '▼';
    font-size: 10px;
    margin-right: 5px;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 150px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 5px 0;
    margin-top: 5px;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 10px 20px;
    color: #0A192F;
    text-decoration: none;
    transition: 0.3s;
}

.user-dropdown a:hover {
    background: #f8fafc;
    color: #FFC107;
}

.login-btn, .register-btn {
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s;
    font-weight: 500;
}

.login-btn {
    color: #ccd6f6;
    border: 2px solid #ccd6f6;
}

.login-btn:hover {
    background: #ccd6f6;
    color: #0A192F;
}

.register-btn {
    background: #FFC107;
    color: #0A192F;
}

.register-btn:hover {
    background: #ffca2c;
    transform: translateY(-2px);
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* واکنش‌گرایی */
@media (max-width: 768px) {
    .auth-modal-content {
        padding: 25px;
    }

    .auth-form .form-row {
        grid-template-columns: 1fr;
    }

    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .login-btn, .register-btn {
        padding: 6px 15px;
        font-size: 13px;
    }
}