/* === Профиль пользователя === */
.profile-container {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Заголовок профиля */
.profile-header {
    text-align: center;
    margin-bottom: 40px;
}

.avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}


.profile-avatar {
    display: block;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 4px solid var(--btn-gradient-start);
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.2);

    margin: 0 auto; /* центрирование */
}

.edit-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: var(--btn-gradient-start);
    color: white;
    border: 2px solid var(--card-bg);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-avatar:hover {
    background: var(--btn-gradient-end);
    transform: scale(1.1);
}

.profile-name {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.profile-email {
    color: var(--text-primary);
    opacity: 0.7;
    font-size: 16px;
}

/* Статистика */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--btn-gradient-start);
}

.stat-card h3 {
    color: var(--text-primary);
    opacity: 0.8;
    font-size: 16px;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: var(--btn-gradient-start);
}

/* Действия */
.profile-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.action-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--btn-gradient-start), var(--btn-gradient-end));
    color: white;
    border: none;
    border-radius: 28px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
    text-decoration: none;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(106, 17, 203, 0.4);
}

.action-btn:active {
    transform: translateY(-1px);
}


/* === Блок погоды === */
.weather-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.weather-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.weather-icon {
    font-size: 36px;
}
.weather-icon-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.weather-info {
    line-height: 1.4;
}

.weather-temp {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-primary);
}

.weather-location {
    font-size: 14px;
    color: var(--text-primary);
    opacity: 0.7;
}
/* === Индикатор загрузки === */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--accent-color, #6e8efb);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
    margin-left: auto;
}

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

/* Показываем loader при загрузке */
.weather-card.loading .loader {
    display: block;
}

.weather-card:not(.loading) .loader {
    display: none;
}

@media (max-width: 768px) {
    .weather-card {
        flex-direction: row;
        justify-content: center;
        text-align: center;
        padding: 14px 16px;
    }

    .weather-info {
        font-size: 14px;
    }

    .weather-temp {
        font-size: 20px;
    }
}
/* Адаптивность */
@media (max-width: 768px) {
    .profile-stats {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        flex-direction: column;
        align-items: center;
    }

    .action-btn {
        width: 80%;
        max-width: 240px;
    }
}