/* auth.css */

/* Модальное окно авторизации */
.auth-modal {
    max-width: 450px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.auth-tab:hover {
    color: #667eea;
}

.auth-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.auth-content {
    padding: 10px 0;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form .form-group {
    margin-bottom: 20px;
    position: relative;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
    font-size: 0.9rem;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 40px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 1.1rem;
}

.password-toggle:hover {
    color: #667eea;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
}

.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    text-decoration: underline;
    color: #764ba2;
}

.btn-block {
    width: 100%;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #666;
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.auth-divider span {
    padding: 0 15px;
}

.social-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-btn.google {
    color: #DB4437;
    border-color: #DB4437;
}

.social-btn.google:hover {
    background: #DB4437;
    color: white;
}

.social-btn.github {
    color: #333;
    border-color: #333;
}

.social-btn.github:hover {
    background: #333;
    color: white;
}

/* Выпадающее меню пользователя */
.user-dropdown {
    position: relative;
}

.user-avatar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    background: #764ba2;
    transform: scale(1.05);
}

.user-avatar i:first-child {
    font-size: 1.1rem;
}

.user-avatar i:last-child {
    font-size: 0.8rem;
    margin-left: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 250px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 15px 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 15px 15px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 10px;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.user-details {
    flex: 1;
}

.user-details strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.user-details span {
    font-size: 0.8rem;
    color: #666;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 10px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #444;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #667eea;
    padding-left: 20px;
}

.dropdown-item.logout-btn:hover {
    color: #f5576c;
}

.dropdown-item i {
    width: 20px;
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 576px) {
    .auth-modal {
        width: 95%;
        margin: 10px;
    }
    
    .social-auth {
        grid-template-columns: 1fr;
    }
    
    .dropdown-menu {
        width: 200px;
        right: -50px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Стили для уведомлений в авторизации */
.auth-message {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.auth-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4CAF50;
}

.auth-message.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.auth-message.warning {
    background: #fff3e0;
    color: #ef6c00;
    border-left: 4px solid #ff9800;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}